diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/CHANGELOG.md b/sdk/devcenter/Azure.ResourceManager.DevCenter/CHANGELOG.md index e73a6bea3590..f345d0a6382b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/CHANGELOG.md +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Updated api-version to 2025-07-01 + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.net8.0.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.net8.0.cs index 15de1a0e10fc..4d13079f473b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.net8.0.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.net8.0.cs @@ -18,6 +18,7 @@ protected AllowedEnvironmentTypeCollection() { } public partial class AllowedEnvironmentTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AllowedEnvironmentTypeData() { } + public string DisplayName { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -98,6 +99,51 @@ internal AzureResourceManagerDevCenterContext() { } public static Azure.ResourceManager.DevCenter.AzureResourceManagerDevCenterContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class CustomizationTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CustomizationTaskCollection() { } + public virtual Azure.Response Exists(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CustomizationTaskData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomizationTaskData() { } + public System.Collections.Generic.IReadOnlyDictionary Inputs { get { throw null; } } + public int? Timeout { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomizationTaskResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomizationTaskResource() { } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevBoxDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevBoxDefinitionCollection() { } @@ -126,6 +172,7 @@ public DevBoxDefinitionData(Azure.Core.AzureLocation location) { } public string OSStorageType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevBoxDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -179,10 +226,15 @@ public partial class DevCenterCatalogData : Azure.ResourceManager.Models.Resourc { public DevCenterCatalogData() { } public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogConnectionState? ConnectionState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } + public System.DateTimeOffset? LastConnectionOn { get { throw null; } } public System.DateTimeOffset? LastSyncOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncStats LastSyncStats { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? SyncState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncType? SyncType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,17 +242,139 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterCatalogEnvironmentDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogEnvironmentDefinitionCollection() { } + public virtual Azure.Response Exists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogEnvironmentDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogEnvironmentDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogImageDefinitionBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogImageDefinitionBuildCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogImageDefinitionBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogImageDefinitionBuildResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogImageDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogImageDefinitionCollection() { } + public virtual Azure.Response Exists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogImageDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogImageDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BuildImage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BuildImageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterCatalogImageDefinitionBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogImageDefinitionBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildCollection GetDevCenterCatalogImageDefinitionBuilds() { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected DevCenterCatalogResource() { } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Connect(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConnectAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCustomizationTask(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCustomizationTaskAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskCollection GetCustomizationTasks() { throw null; } + public virtual Azure.Response GetDevCenterCatalogEnvironmentDefinition(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionCollection GetDevCenterCatalogEnvironmentDefinitions() { throw null; } + public virtual Azure.Response GetDevCenterCatalogImageDefinition(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogImageDefinitionAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionCollection GetDevCenterCatalogImageDefinitions() { throw null; } + public virtual Azure.Response GetSyncErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSyncErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Sync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,8 +405,13 @@ protected DevCenterCollection() { } public partial class DevCenterData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningInstallAzureMonitorAgentEnableStatus { get { throw null; } set { } } public System.Uri DevCenterUri { get { throw null; } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +420,77 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterEncryptionSetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterEncryptionSetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string encryptionSetName, Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string encryptionSetName, Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterEncryptionSetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEncryptionSetData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEncryptionSetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterEncryptionSetResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DevCenterEnvironmentDefinitionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentDefinitionData() { } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } + public string TemplatePath { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterEnvironmentTypeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevCenterEnvironmentTypeCollection() { } @@ -261,6 +511,7 @@ protected DevCenterEnvironmentTypeCollection() { } public partial class DevCenterEnvironmentTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterEnvironmentTypeData() { } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -299,12 +550,19 @@ public static partial class DevCenterExtensions { public static Azure.Response CheckDevCenterNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckDevCenterNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteCheckScopedNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteCheckScopedNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.CustomizationTaskResource GetCustomizationTaskResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevBoxDefinitionResource GetDevBoxDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDevCenter(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string devCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevCenterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string devCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterCatalogResource GetDevCenterCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterGalleryResource GetDevCenterGalleryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterImageResource GetDevCenterImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -319,7 +577,14 @@ public static partial class DevCenterExtensions public static Azure.ResourceManager.DevCenter.DevCenterPoolResource GetDevCenterPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDevCenterProject(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevCenterProjectAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectImageResource GetDevCenterProjectImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectResource GetDevCenterProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectCollection GetDevCenterProjects(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDevCenterProjects(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -421,6 +686,42 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterImageDefinitionBuildData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterImageDefinitionBuildData() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterImageDefinitionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterImageDefinitionData() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ActiveImageReference { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus? AutoImageBuild { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference Extends { get { throw null; } set { } } + public System.Uri FileUri { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails ImageValidationErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? ImageValidationStatus { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.LatestImageBuild LatestBuild { get { throw null; } set { } } + public System.Collections.Generic.IList Tasks { get { throw null; } } + public System.Collections.Generic.IList UserTasks { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -525,14 +826,24 @@ protected DevCenterPoolCollection() { } public partial class DevCenterPoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterPoolData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration ActiveHoursConfiguration { get { throw null; } set { } } + public int? DevBoxCount { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBox DevBoxDefinition { get { throw null; } set { } } public string DevBoxDefinitionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? DevBoxDefinitionType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? HealthStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyList HealthStatusDetails { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? LicenseType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? LocalAdministrator { get { throw null; } set { } } + public System.Collections.Generic.IList ManagedVirtualNetworkRegions { get { throw null; } } public string NetworkConnectionName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration StopOnNoConnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -553,8 +864,12 @@ protected DevCenterPoolResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDevCenterSchedule(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response GetDevCenterSchedule(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterSchedule(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterScheduleCollection GetDevCenterSchedules() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -570,6 +885,163 @@ protected DevCenterPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DevCenterProjectCatalogCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.DevCenter.DevCenterCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.DevCenter.DevCenterCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogEnvironmentDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogEnvironmentDefinitionCollection() { } + public virtual Azure.Response Exists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogEnvironmentDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogEnvironmentDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetailsProjectCatalogEnvironmentDefinition(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsProjectCatalogEnvironmentDefinitionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogImageDefinitionBuildCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogImageDefinitionBuildResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogImageDefinitionCollection() { } + public virtual Azure.Response Exists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogImageDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BuildImage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BuildImageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogImageDefinitionBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogImageDefinitionBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildCollection GetDevCenterProjectCatalogImageDefinitionBuilds() { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Connect(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConnectAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogEnvironmentDefinition(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionCollection GetDevCenterProjectCatalogEnvironmentDefinitions() { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogImageDefinition(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogImageDefinitionAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionCollection GetDevCenterProjectCatalogImageDefinitions() { throw null; } + public virtual Azure.Response GetSyncErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSyncErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Sync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DevCenterProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevCenterProjectCollection() { } @@ -590,11 +1062,19 @@ protected DevCenterProjectCollection() { } public partial class DevCenterProjectData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterProjectData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? AzureAiServicesMode { get { throw null; } set { } } + public System.Collections.Generic.IList CatalogItemSyncTypes { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings CustomizationSettings { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier DevCenterId { get { throw null; } set { } } public System.Uri DevCenterUri { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public int? MaxDevBoxesPerUser { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? WorkspaceStorageMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -623,6 +1103,8 @@ public partial class DevCenterProjectEnvironmentData : Azure.ResourceManager.Mod { public DevCenterProjectEnvironmentData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public int? EnvironmentCount { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Roles { get { throw null; } } @@ -660,6 +1142,105 @@ protected DevCenterProjectEnvironmentResource() { } public virtual Azure.Response Update(Azure.ResourceManager.DevCenter.Models.DevCenterProjectEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.DevCenter.Models.DevCenterProjectEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DevCenterProjectImageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectImageCollection() { } + public virtual Azure.Response Exists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectImageResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectImageVersion(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectImageVersionAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionCollection GetDevCenterProjectImageVersions() { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectImageVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectImageVersionCollection() { } + public virtual Azure.Response Exists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectImageVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectImageVersionResource() { } + public virtual Azure.ResourceManager.DevCenter.ImageVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.ImageVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ImageVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectPolicyName, Azure.ResourceManager.DevCenter.ProjectPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectPolicyName, Azure.ResourceManager.DevCenter.ProjectPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectPolicyResource() { } + public virtual Azure.ResourceManager.DevCenter.ProjectPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DevCenterProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -679,15 +1260,25 @@ protected DevCenterProjectResource() { } public virtual Azure.Response GetDevCenterPool(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterPoolAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterPoolCollection GetDevCenterPools() { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogCollection GetDevCenterProjectCatalogs() { throw null; } public virtual Azure.Response GetDevCenterProjectEnvironment(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterProjectEnvironmentAsync(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentCollection GetDevCenterProjectEnvironments() { throw null; } + public virtual Azure.Response GetDevCenterProjectImage(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectImageAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageCollection GetDevCenterProjectImages() { throw null; } + public virtual Azure.Response GetInheritedSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInheritedSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetProjectAttachedNetworkConnection(string attachedNetworkConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProjectAttachedNetworkConnectionAsync(string attachedNetworkConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.ProjectAttachedNetworkConnectionCollection GetProjectAttachedNetworkConnections() { throw null; } public virtual Azure.Response GetProjectDevBoxDefinition(string devBoxDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProjectDevBoxDefinitionAsync(string devBoxDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.ProjectDevBoxDefinitionCollection GetProjectDevBoxDefinitions() { throw null; } + public virtual Azure.Pageable GetSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -722,14 +1313,22 @@ protected DevCenterResource() { } public virtual Azure.Response GetDevCenterCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogCollection GetDevCenterCatalogs() { throw null; } + public virtual Azure.Response GetDevCenterEncryptionSet(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterEncryptionSetAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetCollection GetDevCenterEncryptionSets() { throw null; } public virtual Azure.Response GetDevCenterEnvironmentType(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterEnvironmentTypeAsync(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeCollection GetDevCenterEnvironmentTypes() { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterGalleryCollection GetDevCenterGalleries() { throw null; } public virtual Azure.Response GetDevCenterGallery(string galleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterGalleryAsync(string galleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectPolicyCollection GetDevCenterProjectPolicies() { throw null; } + public virtual Azure.Response GetDevCenterProjectPolicy(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectPolicyAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetImages(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetImagesAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetImagesByDevCenter(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetImagesByDevCenterAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -747,14 +1346,26 @@ public partial class DevCenterScheduleCollection : Azure.ResourceManager.ArmColl protected DevCenterScheduleCollection() { } public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string scheduleName, Azure.ResourceManager.DevCenter.DevCenterScheduleData data, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string scheduleName, Azure.ResourceManager.DevCenter.DevCenterScheduleData data, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Exists(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.NullableResponse GetIfExists(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } @@ -784,8 +1395,12 @@ protected DevCenterScheduleResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.DevCenter.DevCenterScheduleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +1542,19 @@ protected ProjectDevBoxDefinitionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProjectPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectPolicyData() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList ResourcePolicies { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.DevCenter.Mocking { @@ -935,14 +1563,26 @@ public partial class MockableDevCenterArmClient : Azure.ResourceManager.ArmResou protected MockableDevCenterArmClient() { } public virtual Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskResource GetCustomizationTaskResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevBoxDefinitionResource GetDevBoxDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogResource GetDevCenterCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterGalleryResource GetDevCenterGalleryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterImageResource GetDevCenterImageResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterPoolResource GetDevCenterPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageResource GetDevCenterProjectImageResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectResource GetDevCenterProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterResource GetDevCenterResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterScheduleResource GetDevCenterScheduleResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -969,6 +1609,8 @@ public partial class MockableDevCenterSubscriptionResource : Azure.ResourceManag protected MockableDevCenterSubscriptionResource() { } public virtual Azure.Response CheckDevCenterNameAvailability(Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckDevCenterNameAvailabilityAsync(Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteCheckScopedNameAvailability(Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteCheckScopedNameAvailabilityAsync(Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevCenterNetworkConnections(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevCenterNetworkConnectionsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDevCenterOperationStatus(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -985,138 +1627,630 @@ protected MockableDevCenterSubscriptionResource() { } } namespace Azure.ResourceManager.DevCenter.Models { + public partial class ActiveHoursConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveHoursConfiguration() { } + public Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus? AutoStartEnableStatus { get { throw null; } set { } } + public int? DaysOfWeekLimit { get { throw null; } set { } } + public System.Collections.Generic.IList DefaultDaysOfWeek { get { throw null; } } + public int? DefaultEndTimeHour { get { throw null; } set { } } + public int? DefaultStartTimeHour { get { throw null; } set { } } + public string DefaultTimeZone { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus? KeepAwakeEnableStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmDevCenterModelFactory { - public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), string displayName = null) { throw null; } public static Azure.ResourceManager.DevCenter.AttachedNetworkConnectionData AttachedNetworkConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.Core.ResourceIdentifier networkConnectionId = null, Azure.Core.AzureLocation? networkConnectionLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? healthCheckStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), Azure.ResourceManager.DevCenter.Models.DomainJoinType? domainJoinType = default(Azure.ResourceManager.DevCenter.Models.DomainJoinType?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogConflictError CatalogConflictError(string path = null, string name = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails CatalogErrorDetails(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails CatalogResourceValidationErrorDetails(System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncError CatalogSyncError(string path = null, System.Collections.Generic.IEnumerable errorDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails CatalogSyncErrorDetails(Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails operationError = null, System.Collections.Generic.IEnumerable conflicts = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncStats CatalogSyncStats(int? added = default(int?), int? updated = default(int?), int? unchanged = default(int?), int? removed = default(int?), int? validationErrors = default(int?), int? synchronizationErrors = default(int?), System.Collections.Generic.IEnumerable syncedCatalogItemTypes = null) { throw null; } + public static Azure.ResourceManager.DevCenter.CustomizationTaskData CustomizationTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IReadOnlyDictionary inputs = null, int? timeout = default(int?), Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput CustomizationTaskInput(string description = null, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType? inputType = default(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType?), bool? isRequired = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterCapability DevCenterCapability(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState = default(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState?), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit = null, Azure.ResourceManager.DevCenter.Models.CatalogSyncType? syncType = default(Azure.ResourceManager.DevCenter.Models.CatalogSyncType?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState = default(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState?), Azure.ResourceManager.DevCenter.Models.CatalogSyncStats lastSyncStats = null, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState? connectionState = default(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState?), System.DateTimeOffset? lastConnectionOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState, System.DateTimeOffset? lastSyncOn) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption customerManagedKeyEncryption = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus?), Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus?), Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus? devBoxProvisioningInstallAzureMonitorAgentEnableStatus = default(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData DevCenterEncryptionSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus = default(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus?), System.Uri keyEncryptionKeyUri = null, Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity keyEncryptionKeyIdentity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail DevCenterEndpointDetail(int? port = default(int?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData DevCenterEnvironmentDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable parameters = null, string templatePath = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole DevCenterEnvironmentRole(string roleName = null, string description = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterGalleryData DevCenterGalleryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.Core.ResourceIdentifier galleryResourceId = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheck DevCenterHealthCheck(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? status = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), string displayName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string errorType = null, string recommendedAction = null, string additionalDetails = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatusDetail DevCenterHealthStatusDetail(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterImageData DevCenterImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string publisher = null, string offer = null, string sku = null, Azure.ResourceManager.DevCenter.Models.RecommendedMachineConfiguration recommendedMachineConfiguration = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData DevCenterImageDefinitionBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails errorDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData DevCenterImageDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, System.Uri fileUri = null, Azure.ResourceManager.DevCenter.Models.LatestImageBuild latestBuild = null, Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus? autoImageBuild = default(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus?), System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable userTasks = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference extends = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterImageReference DevCenterImageReference(Azure.Core.ResourceIdentifier id = null, string exactVersion = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityResult DevCenterNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.DevCenter.Models.DevCenterNameUnavailableReason? reason = default(Azure.ResourceManager.DevCenter.Models.DevCenterNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterNetworkConnectionData DevCenterNetworkConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier subnetId = null, string domainName = null, string organizationUnit = null, string domainUsername = null, string domainPassword = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? healthCheckStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), string networkingResourceGroupName = null, Azure.ResourceManager.DevCenter.Models.DomainJoinType? domainJoinType = default(Azure.ResourceManager.DevCenter.Models.DomainJoinType?)) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, Azure.Core.ResourceIdentifier resourceId = null, System.BinaryData properties = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string devBoxDefinitionName = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id, string name, string status, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, Azure.Core.ResourceIdentifier resourceId = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, System.BinaryData properties = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? devBoxDefinitionType = default(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType?), string devBoxDefinitionName = null, Azure.ResourceManager.DevCenter.Models.PoolDevBox devBoxDefinition = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration stopOnNoConnect = null, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? singleSignOnStatus = default(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus?), string displayName = null, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType?), System.Collections.Generic.IEnumerable managedVirtualNetworkRegions = null, Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration activeHoursConfiguration = null, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus = default(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, int? devBoxCount = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string devBoxDefinitionName = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), string displayName = null, System.Collections.Generic.IEnumerable catalogItemSyncTypes = null, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings customizationSettings = null, Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings devBoxAutoDeleteSettings = null, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? azureAiServicesMode = default(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode?), Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings serverlessGpuSessionsSettings = null, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? workspaceStorageMode = default(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), int? environmentCount = default(int?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange DevCenterResourceRange(int? min = default(int?), int? max = default(int?)) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterScheduleData DevCenterScheduleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterScheduledType? scheduledType = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduledType?), Azure.ResourceManager.DevCenter.Models.DevCenterScheduledFrequency? frequency = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduledFrequency?), string time = null, string timeZone = null, Azure.ResourceManager.DevCenter.Models.DevCenterScheduleEnableStatus? state = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduleEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterSkuDetails DevCenterSkuDetails(string name = null, Azure.ResourceManager.DevCenter.Models.DevCenterSkuTier? tier = default(Azure.ResourceManager.DevCenter.Models.DevCenterSkuTier?), string size = null, string family = null, int? capacity = default(int?), Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit = default(Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue, long? limit, Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit, Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit = default(Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name = null, Azure.Core.ResourceIdentifier id = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterUsageName DevCenterUsageName(string localizedValue = null, string value = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.EndpointDependency EndpointDependency(string domainName = null, string description = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent EnvironmentDefinitionContent(System.Guid? id = default(System.Guid?), string name = null, string description = null, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType? parameterType = default(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType?), bool? isReadOnly = default(bool?), bool? isRequired = default(bool?)) { throw null; } public static Azure.ResourceManager.DevCenter.HealthCheckStatusDetailData HealthCheckStatusDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable healthChecks = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ImageCreationErrorDetails(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails ImageDefinitionBuildDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails errorDetails = null, System.Collections.Generic.IEnumerable taskGroups = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask ImageDefinitionBuildTask(string name = null, System.Collections.Generic.IEnumerable parameters = null, string displayName = null, string id = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.Uri logUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup ImageDefinitionBuildTaskGroup(string name = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable tasks = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem ImageDefinitionBuildTaskParametersItem(string key = null, string value = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails ImageValidationErrorDetails(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.ImageVersionData ImageVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string namePropertiesName = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), bool? isExcludedFromLatest = default(bool?), int? osDiskImageSizeInGB = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject InheritedSettingsForProject(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus?), Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.LatestImageBuild LatestImageBuild(string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBox PoolDevBox(Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.ProjectPolicyData ProjectPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable resourcePolicies = null, System.Collections.Generic.IEnumerable scopes = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.RecommendedMachineConfiguration RecommendedMachineConfiguration(Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange memory = null, Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange vCpus = null) { throw null; } } - public partial class DevBoxDefinitionPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DevBoxDefinitionPatch() { } - public Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? HibernateSupport { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } - public string OSStorageType { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DevCenterCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoImageBuildStatus : System.IEquatable { - internal DevCenterCapability() { } - public string Name { get { throw null; } } - public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoImageBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus 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.ResourceManager.DevCenter.Models.AutoImageBuildStatus left, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus left, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus right) { throw null; } + public override string ToString() { throw null; } } - public partial class DevCenterCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoStartEnableStatus : System.IEquatable { - public DevCenterCatalogPatch() { } - public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoStartEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus 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.ResourceManager.DevCenter.Models.AutoStartEnableStatus left, Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus left, Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DevCenterCatalogSyncState : System.IEquatable + public readonly partial struct AzureAiServicesMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public DevCenterCatalogSyncState(string value) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Canceled { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Failed { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState InProgress { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState other) { throw null; } + public AzureAiServicesMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode 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.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } - public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode left, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode left, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode right) { throw null; } public override string ToString() { throw null; } } - public partial class DevCenterEndpointDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CatalogConflictError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal DevCenterEndpointDetail() { } - public int? Port { get { throw null; } } + internal CatalogConflictError() { } + public string Name { get { throw null; } } + public string Path { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DevCenter.Models.CatalogConflictError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogConflictError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DevCenterEnvironmentRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogConnectionState : System.IEquatable { - public DevCenterEnvironmentRole() { } - public string Description { get { throw null; } } - public string RoleName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogConnectionState(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogConnectionState Connected { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogConnectionState Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState 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.ResourceManager.DevCenter.Models.CatalogConnectionState left, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogConnectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState left, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState right) { throw null; } + public override string ToString() { throw null; } } - public partial class DevCenterEnvironmentTypePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CatalogErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DevCenterEnvironmentTypePatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + internal CatalogErrorDetails() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DevCenterGitCatalog : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogItemSyncEnableStatus : System.IEquatable { - public DevCenterGitCatalog() { } - public string Branch { get { throw null; } set { } } - public string Path { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogItemSyncEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus 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.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus left, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus left, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogItemType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogItemType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemType EnvironmentDefinition { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemType ImageDefinition { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogItemType 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.ResourceManager.DevCenter.Models.CatalogItemType left, Azure.ResourceManager.DevCenter.Models.CatalogItemType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogItemType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogItemType left, Azure.ResourceManager.DevCenter.Models.CatalogItemType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CatalogResourceValidationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogResourceValidationErrorDetails() { } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogResourceValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogResourceValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Pending { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus 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.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus left, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus left, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CatalogSyncError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncError() { } + public System.Collections.Generic.IReadOnlyList ErrorDetails { get { throw null; } } + public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CatalogSyncErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncErrorDetails() { } + public System.Collections.Generic.IReadOnlyList Conflicts { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails OperationError { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CatalogSyncStats : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncStats() { } + public int? Added { get { throw null; } } + public int? Removed { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SyncedCatalogItemTypes { get { throw null; } } + public int? SynchronizationErrors { get { throw null; } } + public int? Unchanged { get { throw null; } } + public int? Updated { get { throw null; } } + public int? ValidationErrors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncStats System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncStats System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogSyncType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogSyncType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncType Manual { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncType Scheduled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogSyncType 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.ResourceManager.DevCenter.Models.CatalogSyncType left, Azure.ResourceManager.DevCenter.Models.CatalogSyncType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogSyncType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogSyncType left, Azure.ResourceManager.DevCenter.Models.CatalogSyncType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckScopedNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckScopedNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CmkIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CmkIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CmkIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CmkIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CmkIdentityType 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.ResourceManager.DevCenter.Models.CmkIdentityType left, Azure.ResourceManager.DevCenter.Models.CmkIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CmkIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CmkIdentityType left, Azure.ResourceManager.DevCenter.Models.CmkIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomerManagedKeyEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryption() { } + public Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomerManagedKeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryptionKeyIdentity() { } + public System.Guid? DelegatedIdentityClientId { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.IdentityType? IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomizationTaskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomizationTaskInput() { } + public string Description { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType? InputType { get { throw null; } } + public bool? IsRequired { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomizationTaskInputType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomizationTaskInputType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType Boolean { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType Number { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType 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.ResourceManager.DevCenter.Models.CustomizationTaskInputType left, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType left, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomizationTaskInstance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomizationTaskInstance(string name) { } + public string Condition { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Parameters { get { throw null; } } + public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInstance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInstance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public enum DayOfWeek + { + Monday = 0, + Tuesday = 1, + Wednesday = 2, + Thursday = 3, + Friday = 4, + Saturday = 5, + Sunday = 6, + } + public partial class DefinitionParametersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefinitionParametersItem(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DefinitionParametersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DefinitionParametersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevBoxAutoDeleteSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevBoxAutoDeleteSettings() { } + public Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode? DeleteMode { get { throw null; } set { } } + public string GracePeriod { get { throw null; } set { } } + public string InactiveThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevBoxDefinitionPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevBoxDefinitionPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? HibernateSupport { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public string OSStorageType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevBoxDeleteMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevBoxDeleteMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode Auto { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode 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.ResourceManager.DevCenter.Models.DevBoxDeleteMode left, Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode left, Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevboxDisksEncryptionEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevboxDisksEncryptionEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus 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.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevBoxTunnelEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevBoxTunnelEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus 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.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevCenterCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DevCenterCapability() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterCatalogPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncType? SyncType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevCenterCatalogSyncState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevCenterCatalogSyncState(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Canceled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState InProgress { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState 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.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevCenterEncryptionSetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEncryptionSetPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEndpointDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DevCenterEndpointDetail() { } + public int? Port { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEnvironmentRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentRole() { } + public string Description { get { throw null; } } + public string RoleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEnvironmentTypePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentTypePatch() { } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterGitCatalog : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterGitCatalog() { } + public string Branch { get { throw null; } set { } } + public string Path { get { throw null; } set { } } public string SecretIdentifier { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1150,6 +2284,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public DevCenterHealthCheckStatus(string value) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Informational { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Passed { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Pending { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Running { get { throw null; } } @@ -1329,11 +2464,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevCenterPoolPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterPoolPatch() { } + public Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration ActiveHoursConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBox DevBoxDefinition { get { throw null; } set { } } public string DevBoxDefinitionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? DevBoxDefinitionType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? LicenseType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? LocalAdministrator { get { throw null; } set { } } + public System.Collections.Generic.IList ManagedVirtualNetworkRegions { get { throw null; } } public string NetworkConnectionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration StopOnNoConnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1345,6 +2489,7 @@ public partial class DevCenterProjectEnvironmentPatch : System.ClientModel.Primi { public DevCenterProjectEnvironmentPatch() { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Roles { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? Status { get { throw null; } set { } } @@ -1360,9 +2505,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DevCenterProjectPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterProjectPatch() { } + public Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? AzureAiServicesMode { get { throw null; } set { } } + public System.Collections.Generic.IList CatalogItemSyncTypes { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings CustomizationSettings { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier DevCenterId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public int? MaxDevBoxesPerUser { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? WorkspaceStorageMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.Models.DevCenterProjectPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1370,6 +2522,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterProjectPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterProjectPolicyPatch() { } + public System.Collections.Generic.IList ResourcePolicies { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevCenterProvisioningState : System.IEquatable { @@ -1415,6 +2579,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevCenterResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevCenterResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType AttachedNetworks { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType Images { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType Skus { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterResourceType 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.ResourceManager.DevCenter.Models.DevCenterResourceType left, Azure.ResourceManager.DevCenter.Models.DevCenterResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterResourceType left, Azure.ResourceManager.DevCenter.Models.DevCenterResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevCenterScheduledFrequency : System.IEquatable { private readonly object _dummy; @@ -1532,6 +2715,7 @@ public partial class DevCenterUsage : System.ClientModel.Primitives.IJsonModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EnvironmentDefinitionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EnvironmentDefinitionContent() { } + public string Description { get { throw null; } } + public System.Guid? Id { get { throw null; } } + public bool? IsReadOnly { get { throw null; } } + public bool? IsRequired { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType? ParameterType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnvironmentDefinitionParameterType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnvironmentDefinitionParameterType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Array { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Boolean { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Integer { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Number { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Object { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType 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.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType left, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType left, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EnvironmentTypeEnableStatus : System.IEquatable { @@ -1631,6 +2854,132 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus left, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.IdentityType DelegatedResourceIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.IdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.IdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.IdentityType 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.ResourceManager.DevCenter.Models.IdentityType left, Azure.ResourceManager.DevCenter.Models.IdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.IdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.IdentityType left, Azure.ResourceManager.DevCenter.Models.IdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImageCreationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageCreationErrorDetails() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildDetails : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageDefinitionBuildDetails() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TaskGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageDefinitionBuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageDefinitionBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Cancelled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Running { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus TimedOut { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus ValidationFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus 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.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus left, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus left, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImageDefinitionBuildTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTask() { } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Id { get { throw null; } } + public System.Uri LogUri { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildTaskGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTaskGroup() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildTaskParametersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTaskParametersItem() { } + public string Key { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageDefinitionReference(string imageDefinition) { } + public string ImageDefinition { get { throw null; } set { } } + public System.Collections.Generic.IList Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ImageValidationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ImageValidationErrorDetails() { } @@ -1664,6 +3013,80 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus left, Azure.ResourceManager.DevCenter.Models.ImageValidationStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class InheritedSettingsForProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InheritedSettingsForProject() { } + public Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstallAzureMonitorAgentEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstallAzureMonitorAgentEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus 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.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus left, Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus left, Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KeepAwakeEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KeepAwakeEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus 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.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus left, Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus left, Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyEncryptionKeyIdentity() { } + public Azure.ResourceManager.DevCenter.Models.CmkIdentityType? CmkIdentityType { get { throw null; } set { } } + public string UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LatestImageBuild : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LatestImageBuild() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.LatestImageBuild System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.LatestImageBuild System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LocalAdminStatus : System.IEquatable { @@ -1682,6 +3105,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus left, Azure.ResourceManager.DevCenter.Models.LocalAdminStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MicrosoftHostedNetworkEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MicrosoftHostedNetworkEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus 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.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus left, Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus left, Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class OutboundEnvironmentEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OutboundEnvironmentEndpoint() { } @@ -1694,6 +3135,129 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyAction(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PolicyAction Allow { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PolicyAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PolicyAction 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.ResourceManager.DevCenter.Models.PolicyAction left, Azure.ResourceManager.DevCenter.Models.PolicyAction right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PolicyAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PolicyAction left, Azure.ResourceManager.DevCenter.Models.PolicyAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PoolDevBox : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PoolDevBox() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ActiveImageReference { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.PoolDevBox System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.PoolDevBox System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PoolDevBoxDefinitionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PoolDevBoxDefinitionType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType Reference { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType Value { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType 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.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType left, Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType left, Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PoolUpdateSingleSignOnStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PoolUpdateSingleSignOnStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus 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.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus left, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus left, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectCustomizationIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectCustomizationIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType 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.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType left, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType left, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectCustomizationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectCustomizationManagedIdentity() { } + public Azure.Core.ResourceIdentifier IdentityResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType? IdentityType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectCustomizationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectCustomizationSettings() { } + public System.Collections.Generic.IList Identities { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectPolicyUpdateResourcePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectPolicyUpdateResourcePolicy() { } + public Azure.ResourceManager.DevCenter.Models.PolicyAction? Action { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + public string Resources { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectPolicyUpdateResourcePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectPolicyUpdateResourcePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RecommendedMachineConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RecommendedMachineConfiguration() { } @@ -1706,6 +3270,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServerlessGpuSessionsMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServerlessGpuSessionsMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode 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.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode left, Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode left, Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServerlessGpuSessionsSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServerlessGpuSessionsSettings() { } + public int? MaxConcurrentSessionsPerProject { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StopOnDisconnectConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StopOnDisconnectConfiguration() { } @@ -1736,4 +3330,88 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.StopOnDisconnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnDisconnectEnableStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class StopOnNoConnectConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StopOnNoConnectConfiguration() { } + public int? GracePeriodMinutes { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StopOnNoConnectEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StopOnNoConnectEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus 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.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UserCustomizationsEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UserCustomizationsEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus 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.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus left, Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus left, Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VirtualNetworkType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VirtualNetworkType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.VirtualNetworkType Managed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.VirtualNetworkType Unmanaged { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType 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.ResourceManager.DevCenter.Models.VirtualNetworkType left, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.VirtualNetworkType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType left, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkspaceStorageMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkspaceStorageMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode 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.ResourceManager.DevCenter.Models.WorkspaceStorageMode left, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode left, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.netstandard2.0.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.netstandard2.0.cs index 15de1a0e10fc..4d13079f473b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.netstandard2.0.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/api/Azure.ResourceManager.DevCenter.netstandard2.0.cs @@ -18,6 +18,7 @@ protected AllowedEnvironmentTypeCollection() { } public partial class AllowedEnvironmentTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AllowedEnvironmentTypeData() { } + public string DisplayName { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -98,6 +99,51 @@ internal AzureResourceManagerDevCenterContext() { } public static Azure.ResourceManager.DevCenter.AzureResourceManagerDevCenterContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class CustomizationTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CustomizationTaskCollection() { } + public virtual Azure.Response Exists(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CustomizationTaskData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomizationTaskData() { } + public System.Collections.Generic.IReadOnlyDictionary Inputs { get { throw null; } } + public int? Timeout { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomizationTaskResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomizationTaskResource() { } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.CustomizationTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevBoxDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevBoxDefinitionCollection() { } @@ -126,6 +172,7 @@ public DevBoxDefinitionData(Azure.Core.AzureLocation location) { } public string OSStorageType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevBoxDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -179,10 +226,15 @@ public partial class DevCenterCatalogData : Azure.ResourceManager.Models.Resourc { public DevCenterCatalogData() { } public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogConnectionState? ConnectionState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } + public System.DateTimeOffset? LastConnectionOn { get { throw null; } } public System.DateTimeOffset? LastSyncOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncStats LastSyncStats { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? SyncState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncType? SyncType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,17 +242,139 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterCatalogEnvironmentDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogEnvironmentDefinitionCollection() { } + public virtual Azure.Response Exists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogEnvironmentDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogEnvironmentDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogImageDefinitionBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogImageDefinitionBuildCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogImageDefinitionBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogImageDefinitionBuildResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogImageDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterCatalogImageDefinitionCollection() { } + public virtual Azure.Response Exists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterCatalogImageDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterCatalogImageDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BuildImage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BuildImageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterCatalogImageDefinitionBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogImageDefinitionBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildCollection GetDevCenterCatalogImageDefinitionBuilds() { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected DevCenterCatalogResource() { } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Connect(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConnectAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCustomizationTask(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCustomizationTaskAsync(string taskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskCollection GetCustomizationTasks() { throw null; } + public virtual Azure.Response GetDevCenterCatalogEnvironmentDefinition(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionCollection GetDevCenterCatalogEnvironmentDefinitions() { throw null; } + public virtual Azure.Response GetDevCenterCatalogImageDefinition(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterCatalogImageDefinitionAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionCollection GetDevCenterCatalogImageDefinitions() { throw null; } + public virtual Azure.Response GetSyncErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSyncErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Sync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,8 +405,13 @@ protected DevCenterCollection() { } public partial class DevCenterData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningInstallAzureMonitorAgentEnableStatus { get { throw null; } set { } } public System.Uri DevCenterUri { get { throw null; } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +420,77 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterEncryptionSetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterEncryptionSetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string encryptionSetName, Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string encryptionSetName, Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterEncryptionSetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEncryptionSetData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEncryptionSetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterEncryptionSetResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DevCenterEnvironmentDefinitionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentDefinitionData() { } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } + public string TemplatePath { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterEnvironmentTypeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevCenterEnvironmentTypeCollection() { } @@ -261,6 +511,7 @@ protected DevCenterEnvironmentTypeCollection() { } public partial class DevCenterEnvironmentTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterEnvironmentTypeData() { } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -299,12 +550,19 @@ public static partial class DevCenterExtensions { public static Azure.Response CheckDevCenterNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckDevCenterNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteCheckScopedNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteCheckScopedNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.CustomizationTaskResource GetCustomizationTaskResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevBoxDefinitionResource GetDevBoxDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDevCenter(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string devCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevCenterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string devCenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterCatalogResource GetDevCenterCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterGalleryResource GetDevCenterGalleryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterImageResource GetDevCenterImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -319,7 +577,14 @@ public static partial class DevCenterExtensions public static Azure.ResourceManager.DevCenter.DevCenterPoolResource GetDevCenterPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDevCenterProject(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevCenterProjectAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectImageResource GetDevCenterProjectImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectResource GetDevCenterProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterProjectCollection GetDevCenterProjects(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDevCenterProjects(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -421,6 +686,42 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterImageDefinitionBuildData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterImageDefinitionBuildData() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterImageDefinitionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterImageDefinitionData() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ActiveImageReference { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus? AutoImageBuild { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference Extends { get { throw null; } set { } } + public System.Uri FileUri { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails ImageValidationErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? ImageValidationStatus { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.LatestImageBuild LatestBuild { get { throw null; } set { } } + public System.Collections.Generic.IList Tasks { get { throw null; } } + public System.Collections.Generic.IList UserTasks { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? ValidationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevCenterImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -525,14 +826,24 @@ protected DevCenterPoolCollection() { } public partial class DevCenterPoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterPoolData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration ActiveHoursConfiguration { get { throw null; } set { } } + public int? DevBoxCount { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBox DevBoxDefinition { get { throw null; } set { } } public string DevBoxDefinitionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? DevBoxDefinitionType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? HealthStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyList HealthStatusDetails { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? LicenseType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? LocalAdministrator { get { throw null; } set { } } + public System.Collections.Generic.IList ManagedVirtualNetworkRegions { get { throw null; } } public string NetworkConnectionName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration StopOnNoConnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -553,8 +864,12 @@ protected DevCenterPoolResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDevCenterSchedule(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response GetDevCenterSchedule(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterSchedule(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterScheduleAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterScheduleCollection GetDevCenterSchedules() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -570,6 +885,163 @@ protected DevCenterPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DevCenterProjectCatalogCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.DevCenter.DevCenterCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.DevCenter.DevCenterCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogEnvironmentDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogEnvironmentDefinitionCollection() { } + public virtual Azure.Response Exists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogEnvironmentDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogEnvironmentDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetErrorDetailsProjectCatalogEnvironmentDefinition(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsProjectCatalogEnvironmentDefinitionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogImageDefinitionBuildCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogImageDefinitionBuildResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectCatalogImageDefinitionCollection() { } + public virtual Azure.Response Exists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectCatalogImageDefinitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogImageDefinitionResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BuildImage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BuildImageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogImageDefinitionBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogImageDefinitionBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildCollection GetDevCenterProjectCatalogImageDefinitionBuilds() { throw null; } + public virtual Azure.Response GetErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectCatalogResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Connect(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConnectAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogEnvironmentDefinition(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionCollection GetDevCenterProjectCatalogEnvironmentDefinitions() { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalogImageDefinition(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogImageDefinitionAsync(string imageDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionCollection GetDevCenterProjectCatalogImageDefinitions() { throw null; } + public virtual Azure.Response GetSyncErrorDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSyncErrorDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Sync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterCatalogData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DevCenterProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DevCenterProjectCollection() { } @@ -590,11 +1062,19 @@ protected DevCenterProjectCollection() { } public partial class DevCenterProjectData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterProjectData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? AzureAiServicesMode { get { throw null; } set { } } + public System.Collections.Generic.IList CatalogItemSyncTypes { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings CustomizationSettings { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier DevCenterId { get { throw null; } set { } } public System.Uri DevCenterUri { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public int? MaxDevBoxesPerUser { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? WorkspaceStorageMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -623,6 +1103,8 @@ public partial class DevCenterProjectEnvironmentData : Azure.ResourceManager.Mod { public DevCenterProjectEnvironmentData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public int? EnvironmentCount { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Roles { get { throw null; } } @@ -660,6 +1142,105 @@ protected DevCenterProjectEnvironmentResource() { } public virtual Azure.Response Update(Azure.ResourceManager.DevCenter.Models.DevCenterProjectEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.DevCenter.Models.DevCenterProjectEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DevCenterProjectImageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectImageCollection() { } + public virtual Azure.Response Exists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectImageResource() { } + public virtual Azure.ResourceManager.DevCenter.DevCenterImageData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevCenterProjectImageVersion(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectImageVersionAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionCollection GetDevCenterProjectImageVersions() { throw null; } + Azure.ResourceManager.DevCenter.DevCenterImageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.DevCenterImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectImageVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectImageVersionCollection() { } + public virtual Azure.Response Exists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectImageVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectImageVersionResource() { } + public virtual Azure.ResourceManager.DevCenter.ImageVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.ImageVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ImageVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterProjectPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevCenterProjectPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectPolicyName, Azure.ResourceManager.DevCenter.ProjectPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectPolicyName, Azure.ResourceManager.DevCenter.ProjectPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevCenterProjectPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevCenterProjectPolicyResource() { } + public virtual Azure.ResourceManager.DevCenter.ProjectPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DevCenterProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -679,15 +1260,25 @@ protected DevCenterProjectResource() { } public virtual Azure.Response GetDevCenterPool(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterPoolAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterPoolCollection GetDevCenterPools() { throw null; } + public virtual Azure.Response GetDevCenterProjectCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogCollection GetDevCenterProjectCatalogs() { throw null; } public virtual Azure.Response GetDevCenterProjectEnvironment(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterProjectEnvironmentAsync(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentCollection GetDevCenterProjectEnvironments() { throw null; } + public virtual Azure.Response GetDevCenterProjectImage(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectImageAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageCollection GetDevCenterProjectImages() { throw null; } + public virtual Azure.Response GetInheritedSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInheritedSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetProjectAttachedNetworkConnection(string attachedNetworkConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProjectAttachedNetworkConnectionAsync(string attachedNetworkConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.ProjectAttachedNetworkConnectionCollection GetProjectAttachedNetworkConnections() { throw null; } public virtual Azure.Response GetProjectDevBoxDefinition(string devBoxDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProjectDevBoxDefinitionAsync(string devBoxDefinitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.ProjectDevBoxDefinitionCollection GetProjectDevBoxDefinitions() { throw null; } + public virtual Azure.Pageable GetSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -722,14 +1313,22 @@ protected DevCenterResource() { } public virtual Azure.Response GetDevCenterCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogCollection GetDevCenterCatalogs() { throw null; } + public virtual Azure.Response GetDevCenterEncryptionSet(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterEncryptionSetAsync(string encryptionSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetCollection GetDevCenterEncryptionSets() { throw null; } public virtual Azure.Response GetDevCenterEnvironmentType(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterEnvironmentTypeAsync(string environmentTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeCollection GetDevCenterEnvironmentTypes() { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterGalleryCollection GetDevCenterGalleries() { throw null; } public virtual Azure.Response GetDevCenterGallery(string galleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDevCenterGalleryAsync(string galleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectPolicyCollection GetDevCenterProjectPolicies() { throw null; } + public virtual Azure.Response GetDevCenterProjectPolicy(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevCenterProjectPolicyAsync(string projectPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetImages(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetImagesAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetImagesByDevCenter(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetImagesByDevCenterAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -747,14 +1346,26 @@ public partial class DevCenterScheduleCollection : Azure.ResourceManager.ArmColl protected DevCenterScheduleCollection() { } public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string scheduleName, Azure.ResourceManager.DevCenter.DevCenterScheduleData data, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string scheduleName, Azure.ResourceManager.DevCenter.DevCenterScheduleData data, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Exists(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.NullableResponse GetIfExists(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } @@ -784,8 +1395,12 @@ protected DevCenterScheduleResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(int? top, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.DevCenter.DevCenterScheduleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.DevCenterScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +1542,19 @@ protected ProjectDevBoxDefinitionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProjectPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectPolicyData() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList ResourcePolicies { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.ProjectPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.DevCenter.Mocking { @@ -935,14 +1563,26 @@ public partial class MockableDevCenterArmClient : Azure.ResourceManager.ArmResou protected MockableDevCenterArmClient() { } public virtual Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.CustomizationTaskResource GetCustomizationTaskResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevBoxDefinitionResource GetDevBoxDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterCatalogResource GetDevCenterCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterGalleryResource GetDevCenterGalleryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterImageResource GetDevCenterImageResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterPoolResource GetDevCenterPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageResource GetDevCenterProjectImageResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DevCenter.DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterProjectResource GetDevCenterProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterResource GetDevCenterResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DevCenter.DevCenterScheduleResource GetDevCenterScheduleResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -969,6 +1609,8 @@ public partial class MockableDevCenterSubscriptionResource : Azure.ResourceManag protected MockableDevCenterSubscriptionResource() { } public virtual Azure.Response CheckDevCenterNameAvailability(Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckDevCenterNameAvailabilityAsync(Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteCheckScopedNameAvailability(Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteCheckScopedNameAvailabilityAsync(Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevCenterNetworkConnections(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevCenterNetworkConnectionsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDevCenterOperationStatus(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -985,138 +1627,630 @@ protected MockableDevCenterSubscriptionResource() { } } namespace Azure.ResourceManager.DevCenter.Models { + public partial class ActiveHoursConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveHoursConfiguration() { } + public Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus? AutoStartEnableStatus { get { throw null; } set { } } + public int? DaysOfWeekLimit { get { throw null; } set { } } + public System.Collections.Generic.IList DefaultDaysOfWeek { get { throw null; } } + public int? DefaultEndTimeHour { get { throw null; } set { } } + public int? DefaultStartTimeHour { get { throw null; } set { } } + public string DefaultTimeZone { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus? KeepAwakeEnableStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmDevCenterModelFactory { - public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.DevCenter.AllowedEnvironmentTypeData AllowedEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), string displayName = null) { throw null; } public static Azure.ResourceManager.DevCenter.AttachedNetworkConnectionData AttachedNetworkConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.Core.ResourceIdentifier networkConnectionId = null, Azure.Core.AzureLocation? networkConnectionLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? healthCheckStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), Azure.ResourceManager.DevCenter.Models.DomainJoinType? domainJoinType = default(Azure.ResourceManager.DevCenter.Models.DomainJoinType?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogConflictError CatalogConflictError(string path = null, string name = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails CatalogErrorDetails(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails CatalogResourceValidationErrorDetails(System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncError CatalogSyncError(string path = null, System.Collections.Generic.IEnumerable errorDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails CatalogSyncErrorDetails(Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails operationError = null, System.Collections.Generic.IEnumerable conflicts = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncStats CatalogSyncStats(int? added = default(int?), int? updated = default(int?), int? unchanged = default(int?), int? removed = default(int?), int? validationErrors = default(int?), int? synchronizationErrors = default(int?), System.Collections.Generic.IEnumerable syncedCatalogItemTypes = null) { throw null; } + public static Azure.ResourceManager.DevCenter.CustomizationTaskData CustomizationTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IReadOnlyDictionary inputs = null, int? timeout = default(int?), Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput CustomizationTaskInput(string description = null, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType? inputType = default(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType?), bool? isRequired = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevBoxDefinitionData DevBoxDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, string osStorageType = null, Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterCapability DevCenterCapability(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState = default(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState?), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub = null, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit = null, Azure.ResourceManager.DevCenter.Models.CatalogSyncType? syncType = default(Azure.ResourceManager.DevCenter.Models.CatalogSyncType?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState = default(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState?), Azure.ResourceManager.DevCenter.Models.CatalogSyncStats lastSyncStats = null, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState? connectionState = default(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState?), System.DateTimeOffset? lastConnectionOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterCatalogData DevCenterCatalogData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog gitHub, Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog adoGit, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState? syncState, System.DateTimeOffset? lastSyncOn) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption customerManagedKeyEncryption = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus?), Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus?), Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus? devBoxProvisioningInstallAzureMonitorAgentEnableStatus = default(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterData DevCenterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEncryptionSetData DevCenterEncryptionSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus = default(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus?), System.Uri keyEncryptionKeyUri = null, Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity keyEncryptionKeyIdentity = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail DevCenterEndpointDetail(int? port = default(int?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentDefinitionData DevCenterEnvironmentDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable parameters = null, string templatePath = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole DevCenterEnvironmentRole(string roleName = null, string description = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterGalleryData DevCenterGalleryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.Core.ResourceIdentifier galleryResourceId = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheck DevCenterHealthCheck(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? status = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), string displayName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string errorType = null, string recommendedAction = null, string additionalDetails = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatusDetail DevCenterHealthStatusDetail(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterImageData DevCenterImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string publisher = null, string offer = null, string sku = null, Azure.ResourceManager.DevCenter.Models.RecommendedMachineConfiguration recommendedMachineConfiguration = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? hibernateSupport = default(Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterImageDefinitionBuildData DevCenterImageDefinitionBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails errorDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterImageDefinitionData DevCenterImageDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, System.Uri fileUri = null, Azure.ResourceManager.DevCenter.Models.LatestImageBuild latestBuild = null, Azure.ResourceManager.DevCenter.Models.ImageValidationStatus? imageValidationStatus = default(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus?), Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails imageValidationErrorDetails = null, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus? validationStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus? autoImageBuild = default(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus?), System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable userTasks = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference extends = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterImageReference DevCenterImageReference(Azure.Core.ResourceIdentifier id = null, string exactVersion = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterNameAvailabilityResult DevCenterNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.DevCenter.Models.DevCenterNameUnavailableReason? reason = default(Azure.ResourceManager.DevCenter.Models.DevCenterNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterNetworkConnectionData DevCenterNetworkConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier subnetId = null, string domainName = null, string organizationUnit = null, string domainUsername = null, string domainPassword = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus? healthCheckStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus?), string networkingResourceGroupName = null, Azure.ResourceManager.DevCenter.Models.DomainJoinType? domainJoinType = default(Azure.ResourceManager.DevCenter.Models.DomainJoinType?)) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, Azure.Core.ResourceIdentifier resourceId = null, System.BinaryData properties = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string devBoxDefinitionName = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } - public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id, string name, string status, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, Azure.Core.ResourceIdentifier resourceId = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterOperationStatus DevCenterOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, System.BinaryData properties = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? devBoxDefinitionType = default(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType?), string devBoxDefinitionName = null, Azure.ResourceManager.DevCenter.Models.PoolDevBox devBoxDefinition = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration stopOnNoConnect = null, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? singleSignOnStatus = default(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus?), string displayName = null, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType?), System.Collections.Generic.IEnumerable managedVirtualNetworkRegions = null, Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration activeHoursConfiguration = null, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus = default(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, int? devBoxCount = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterPoolData DevCenterPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string devBoxDefinitionName = null, string networkConnectionName = null, Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? licenseType = default(Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType?), Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? localAdministrator = default(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus?), Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration stopOnDisconnect = null, Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus? healthStatus = default(Azure.ResourceManager.DevCenter.Models.DevCenterHealthStatus?), System.Collections.Generic.IEnumerable healthStatusDetails = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectData DevCenterProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = default(int?), string displayName = null, System.Collections.Generic.IEnumerable catalogItemSyncTypes = null, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings customizationSettings = null, Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings devBoxAutoDeleteSettings = null, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? azureAiServicesMode = default(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode?), Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings serverlessGpuSessionsSettings = null, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? workspaceStorageMode = default(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), System.Uri devCenterUri = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DevCenter.DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier deploymentTargetId = null, string displayName = null, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? status = default(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus?), System.Collections.Generic.IDictionary roles = null, System.Collections.Generic.IDictionary userRoleAssignments = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?), int? environmentCount = default(int?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange DevCenterResourceRange(int? min = default(int?), int? max = default(int?)) { throw null; } public static Azure.ResourceManager.DevCenter.DevCenterScheduleData DevCenterScheduleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterScheduledType? scheduledType = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduledType?), Azure.ResourceManager.DevCenter.Models.DevCenterScheduledFrequency? frequency = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduledFrequency?), string time = null, string timeZone = null, Azure.ResourceManager.DevCenter.Models.DevCenterScheduleEnableStatus? state = default(Azure.ResourceManager.DevCenter.Models.DevCenterScheduleEnableStatus?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterSkuDetails DevCenterSkuDetails(string name = null, Azure.ResourceManager.DevCenter.Models.DevCenterSkuTier? tier = default(Azure.ResourceManager.DevCenter.Models.DevCenterSkuTier?), string size = null, string family = null, int? capacity = default(int?), Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit = default(Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue, long? limit, Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit, Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterUsage DevCenterUsage(long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit? unit = default(Azure.ResourceManager.DevCenter.Models.DevCenterUsageUnit?), Azure.ResourceManager.DevCenter.Models.DevCenterUsageName name = null, Azure.Core.ResourceIdentifier id = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterUsageName DevCenterUsageName(string localizedValue = null, string value = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.EndpointDependency EndpointDependency(string domainName = null, string description = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent EnvironmentDefinitionContent(System.Guid? id = default(System.Guid?), string name = null, string description = null, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType? parameterType = default(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType?), bool? isReadOnly = default(bool?), bool? isRequired = default(bool?)) { throw null; } public static Azure.ResourceManager.DevCenter.HealthCheckStatusDetailData HealthCheckStatusDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable healthChecks = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ImageCreationErrorDetails(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails ImageDefinitionBuildDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails errorDetails = null, System.Collections.Generic.IEnumerable taskGroups = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask ImageDefinitionBuildTask(string name = null, System.Collections.Generic.IEnumerable parameters = null, string displayName = null, string id = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.Uri logUri = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup ImageDefinitionBuildTaskGroup(string name = null, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable tasks = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem ImageDefinitionBuildTaskParametersItem(string key = null, string value = null) { throw null; } public static Azure.ResourceManager.DevCenter.Models.ImageValidationErrorDetails ImageValidationErrorDetails(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.DevCenter.ImageVersionData ImageVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string namePropertiesName = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), bool? isExcludedFromLatest = default(bool?), int? osDiskImageSizeInGB = default(int?), Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject InheritedSettingsForProject(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = default(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus?), Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus?)) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.LatestImageBuild LatestImageBuild(string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? status = default(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBox PoolDevBox(Azure.ResourceManager.DevCenter.Models.DevCenterImageReference imageReference = null, Azure.ResourceManager.DevCenter.Models.DevCenterSku sku = null, Azure.ResourceManager.DevCenter.Models.DevCenterImageReference activeImageReference = null) { throw null; } + public static Azure.ResourceManager.DevCenter.ProjectPolicyData ProjectPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable resourcePolicies = null, System.Collections.Generic.IEnumerable scopes = null, Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState? provisioningState = default(Azure.ResourceManager.DevCenter.Models.DevCenterProvisioningState?)) { throw null; } public static Azure.ResourceManager.DevCenter.Models.RecommendedMachineConfiguration RecommendedMachineConfiguration(Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange memory = null, Azure.ResourceManager.DevCenter.Models.DevCenterResourceRange vCpus = null) { throw null; } } - public partial class DevBoxDefinitionPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DevBoxDefinitionPatch() { } - public Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? HibernateSupport { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } - public string OSStorageType { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DevCenterCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoImageBuildStatus : System.IEquatable { - internal DevCenterCapability() { } - public string Name { get { throw null; } } - public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoImageBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus 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.ResourceManager.DevCenter.Models.AutoImageBuildStatus left, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus left, Azure.ResourceManager.DevCenter.Models.AutoImageBuildStatus right) { throw null; } + public override string ToString() { throw null; } } - public partial class DevCenterCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoStartEnableStatus : System.IEquatable { - public DevCenterCatalogPatch() { } - public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } - public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoStartEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus 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.ResourceManager.DevCenter.Models.AutoStartEnableStatus left, Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus left, Azure.ResourceManager.DevCenter.Models.AutoStartEnableStatus right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DevCenterCatalogSyncState : System.IEquatable + public readonly partial struct AzureAiServicesMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public DevCenterCatalogSyncState(string value) { throw null; } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Canceled { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Failed { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState InProgress { get { throw null; } } - public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState other) { throw null; } + public AzureAiServicesMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode 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.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } - public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode left, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode left, Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode right) { throw null; } public override string ToString() { throw null; } } - public partial class DevCenterEndpointDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CatalogConflictError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal DevCenterEndpointDetail() { } - public int? Port { get { throw null; } } + internal CatalogConflictError() { } + public string Name { get { throw null; } } + public string Path { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DevCenter.Models.CatalogConflictError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogConflictError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DevCenterEnvironmentRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogConnectionState : System.IEquatable { - public DevCenterEnvironmentRole() { } - public string Description { get { throw null; } } - public string RoleName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogConnectionState(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogConnectionState Connected { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogConnectionState Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState 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.ResourceManager.DevCenter.Models.CatalogConnectionState left, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogConnectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogConnectionState left, Azure.ResourceManager.DevCenter.Models.CatalogConnectionState right) { throw null; } + public override string ToString() { throw null; } } - public partial class DevCenterEnvironmentTypePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CatalogErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DevCenterEnvironmentTypePatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + internal CatalogErrorDetails() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DevCenterGitCatalog : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogItemSyncEnableStatus : System.IEquatable { - public DevCenterGitCatalog() { } - public string Branch { get { throw null; } set { } } - public string Path { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogItemSyncEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus 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.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus left, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus left, Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogItemType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogItemType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemType EnvironmentDefinition { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogItemType ImageDefinition { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogItemType 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.ResourceManager.DevCenter.Models.CatalogItemType left, Azure.ResourceManager.DevCenter.Models.CatalogItemType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogItemType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogItemType left, Azure.ResourceManager.DevCenter.Models.CatalogItemType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CatalogResourceValidationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogResourceValidationErrorDetails() { } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogResourceValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogResourceValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Pending { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus 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.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus left, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus left, Azure.ResourceManager.DevCenter.Models.CatalogResourceValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CatalogSyncError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncError() { } + public System.Collections.Generic.IReadOnlyList ErrorDetails { get { throw null; } } + public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CatalogSyncErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncErrorDetails() { } + public System.Collections.Generic.IReadOnlyList Conflicts { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CatalogErrorDetails OperationError { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CatalogSyncStats : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CatalogSyncStats() { } + public int? Added { get { throw null; } } + public int? Removed { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SyncedCatalogItemTypes { get { throw null; } } + public int? SynchronizationErrors { get { throw null; } } + public int? Unchanged { get { throw null; } } + public int? Updated { get { throw null; } } + public int? ValidationErrors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncStats System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CatalogSyncStats System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogSyncType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogSyncType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncType Manual { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CatalogSyncType Scheduled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CatalogSyncType 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.ResourceManager.DevCenter.Models.CatalogSyncType left, Azure.ResourceManager.DevCenter.Models.CatalogSyncType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CatalogSyncType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CatalogSyncType left, Azure.ResourceManager.DevCenter.Models.CatalogSyncType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckScopedNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckScopedNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CheckScopedNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CmkIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CmkIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CmkIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CmkIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CmkIdentityType 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.ResourceManager.DevCenter.Models.CmkIdentityType left, Azure.ResourceManager.DevCenter.Models.CmkIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CmkIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CmkIdentityType left, Azure.ResourceManager.DevCenter.Models.CmkIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomerManagedKeyEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryption() { } + public Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomerManagedKeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryptionKeyIdentity() { } + public System.Guid? DelegatedIdentityClientId { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.IdentityType? IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomizationTaskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomizationTaskInput() { } + public string Description { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType? InputType { get { throw null; } } + public bool? IsRequired { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomizationTaskInputType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomizationTaskInputType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType Boolean { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType Number { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType 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.ResourceManager.DevCenter.Models.CustomizationTaskInputType left, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType left, Azure.ResourceManager.DevCenter.Models.CustomizationTaskInputType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomizationTaskInstance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomizationTaskInstance(string name) { } + public string Condition { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Parameters { get { throw null; } } + public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInstance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.CustomizationTaskInstance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public enum DayOfWeek + { + Monday = 0, + Tuesday = 1, + Wednesday = 2, + Thursday = 3, + Friday = 4, + Saturday = 5, + Sunday = 6, + } + public partial class DefinitionParametersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefinitionParametersItem(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DefinitionParametersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DefinitionParametersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevBoxAutoDeleteSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevBoxAutoDeleteSettings() { } + public Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode? DeleteMode { get { throw null; } set { } } + public string GracePeriod { get { throw null; } set { } } + public string InactiveThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevBoxDefinitionPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevBoxDefinitionPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterHibernateSupport? HibernateSupport { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public string OSStorageType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevBoxDefinitionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevBoxDeleteMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevBoxDeleteMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode Auto { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode 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.ResourceManager.DevCenter.Models.DevBoxDeleteMode left, Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode left, Azure.ResourceManager.DevCenter.Models.DevBoxDeleteMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevboxDisksEncryptionEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevboxDisksEncryptionEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus 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.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevBoxTunnelEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevBoxTunnelEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus 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.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus left, Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevCenterCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DevCenterCapability() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterCatalogPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog AdoGit { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterGitCatalog GitHub { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.CatalogSyncType? SyncType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterCatalogPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevCenterCatalogSyncState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevCenterCatalogSyncState(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Canceled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState InProgress { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState 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.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState left, Azure.ResourceManager.DevCenter.Models.DevCenterCatalogSyncState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevCenterEncryptionSetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEncryptionSetPatch() { } + public Azure.ResourceManager.DevCenter.Models.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEncryptionSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEndpointDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DevCenterEndpointDetail() { } + public int? Port { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEndpointDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEnvironmentRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentRole() { } + public string Description { get { throw null; } } + public string RoleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterEnvironmentTypePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterEnvironmentTypePatch() { } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterEnvironmentTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DevCenterGitCatalog : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterGitCatalog() { } + public string Branch { get { throw null; } set { } } + public string Path { get { throw null; } set { } } public string SecretIdentifier { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1150,6 +2284,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public DevCenterHealthCheckStatus(string value) { throw null; } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Informational { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Passed { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Pending { get { throw null; } } public static Azure.ResourceManager.DevCenter.Models.DevCenterHealthCheckStatus Running { get { throw null; } } @@ -1329,11 +2464,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevCenterPoolPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterPoolPatch() { } + public Azure.ResourceManager.DevCenter.Models.ActiveHoursConfiguration ActiveHoursConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBox DevBoxDefinition { get { throw null; } set { } } public string DevBoxDefinitionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType? DevBoxDefinitionType { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.DevCenterLicenseType? LicenseType { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.LocalAdminStatus? LocalAdministrator { get { throw null; } set { } } + public System.Collections.Generic.IList ManagedVirtualNetworkRegions { get { throw null; } } public string NetworkConnectionName { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get { throw null; } set { } } public Azure.ResourceManager.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration StopOnNoConnect { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.Models.DevCenterPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1345,6 +2489,7 @@ public partial class DevCenterProjectEnvironmentPatch : System.ClientModel.Primi { public DevCenterProjectEnvironmentPatch() { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Roles { get { throw null; } } public Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus? Status { get { throw null; } set { } } @@ -1360,9 +2505,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DevCenterProjectPatch : Azure.ResourceManager.DevCenter.Models.DevCenterTrackedResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevCenterProjectPatch() { } + public Azure.ResourceManager.DevCenter.Models.AzureAiServicesMode? AzureAiServicesMode { get { throw null; } set { } } + public System.Collections.Generic.IList CatalogItemSyncTypes { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings CustomizationSettings { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier DevCenterId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } public int? MaxDevBoxesPerUser { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode? WorkspaceStorageMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevCenter.Models.DevCenterProjectPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1370,6 +2522,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevCenterProjectPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevCenterProjectPolicyPatch() { } + public System.Collections.Generic.IList ResourcePolicies { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.DevCenterProjectPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevCenterProvisioningState : System.IEquatable { @@ -1415,6 +2579,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevCenterResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevCenterResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType AttachedNetworks { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType Images { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.DevCenterResourceType Skus { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.DevCenterResourceType 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.ResourceManager.DevCenter.Models.DevCenterResourceType left, Azure.ResourceManager.DevCenter.Models.DevCenterResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.DevCenterResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.DevCenterResourceType left, Azure.ResourceManager.DevCenter.Models.DevCenterResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevCenterScheduledFrequency : System.IEquatable { private readonly object _dummy; @@ -1532,6 +2715,7 @@ public partial class DevCenterUsage : System.ClientModel.Primitives.IJsonModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EnvironmentDefinitionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EnvironmentDefinitionContent() { } + public string Description { get { throw null; } } + public System.Guid? Id { get { throw null; } } + public bool? IsReadOnly { get { throw null; } } + public bool? IsRequired { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType? ParameterType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnvironmentDefinitionParameterType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnvironmentDefinitionParameterType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Array { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Boolean { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Integer { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Number { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType Object { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType 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.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType left, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType left, Azure.ResourceManager.DevCenter.Models.EnvironmentDefinitionParameterType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EnvironmentTypeEnableStatus : System.IEquatable { @@ -1631,6 +2854,132 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus left, Azure.ResourceManager.DevCenter.Models.EnvironmentTypeEnableStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.IdentityType DelegatedResourceIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.IdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.IdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.IdentityType 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.ResourceManager.DevCenter.Models.IdentityType left, Azure.ResourceManager.DevCenter.Models.IdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.IdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.IdentityType left, Azure.ResourceManager.DevCenter.Models.IdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImageCreationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageCreationErrorDetails() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildDetails : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageDefinitionBuildDetails() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageCreationErrorDetails ErrorDetails { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TaskGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageDefinitionBuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageDefinitionBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Cancelled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Running { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus TimedOut { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus ValidationFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus 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.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus left, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus left, Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImageDefinitionBuildTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTask() { } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Id { get { throw null; } } + public System.Uri LogUri { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildTaskGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTaskGroup() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionBuildTaskParametersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImageDefinitionBuildTaskParametersItem() { } + public string Key { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildTaskParametersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageDefinitionReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageDefinitionReference(string imageDefinition) { } + public string ImageDefinition { get { throw null; } set { } } + public System.Collections.Generic.IList Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ImageDefinitionReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ImageValidationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ImageValidationErrorDetails() { } @@ -1664,6 +3013,80 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ImageValidationStatus left, Azure.ResourceManager.DevCenter.Models.ImageValidationStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class InheritedSettingsForProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InheritedSettingsForProject() { } + public Azure.ResourceManager.DevCenter.Models.CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.InheritedSettingsForProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstallAzureMonitorAgentEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstallAzureMonitorAgentEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus 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.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus left, Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus left, Azure.ResourceManager.DevCenter.Models.InstallAzureMonitorAgentEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KeepAwakeEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KeepAwakeEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus 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.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus left, Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus left, Azure.ResourceManager.DevCenter.Models.KeepAwakeEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyEncryptionKeyIdentity() { } + public Azure.ResourceManager.DevCenter.Models.CmkIdentityType? CmkIdentityType { get { throw null; } set { } } + public string UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.KeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LatestImageBuild : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LatestImageBuild() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.ImageDefinitionBuildStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.LatestImageBuild System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.LatestImageBuild System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LocalAdminStatus : System.IEquatable { @@ -1682,6 +3105,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.LocalAdminStatus left, Azure.ResourceManager.DevCenter.Models.LocalAdminStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MicrosoftHostedNetworkEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MicrosoftHostedNetworkEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus 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.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus left, Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus left, Azure.ResourceManager.DevCenter.Models.MicrosoftHostedNetworkEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class OutboundEnvironmentEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OutboundEnvironmentEndpoint() { } @@ -1694,6 +3135,129 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyAction(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PolicyAction Allow { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PolicyAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PolicyAction 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.ResourceManager.DevCenter.Models.PolicyAction left, Azure.ResourceManager.DevCenter.Models.PolicyAction right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PolicyAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PolicyAction left, Azure.ResourceManager.DevCenter.Models.PolicyAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PoolDevBox : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PoolDevBox() { } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ActiveImageReference { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.DevCenterImageReference ImageReference { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.PoolDevBox System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.PoolDevBox System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PoolDevBoxDefinitionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PoolDevBoxDefinitionType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType Reference { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType Value { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType 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.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType left, Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType left, Azure.ResourceManager.DevCenter.Models.PoolDevBoxDefinitionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PoolUpdateSingleSignOnStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PoolUpdateSingleSignOnStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus 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.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus left, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus left, Azure.ResourceManager.DevCenter.Models.PoolUpdateSingleSignOnStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectCustomizationIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectCustomizationIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType 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.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType left, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType left, Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectCustomizationManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectCustomizationManagedIdentity() { } + public Azure.Core.ResourceIdentifier IdentityResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ProjectCustomizationIdentityType? IdentityType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectCustomizationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectCustomizationSettings() { } + public System.Collections.Generic.IList Identities { get { throw null; } } + public Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectCustomizationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectPolicyUpdateResourcePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectPolicyUpdateResourcePolicy() { } + public Azure.ResourceManager.DevCenter.Models.PolicyAction? Action { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + public string Resources { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.DevCenterResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectPolicyUpdateResourcePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ProjectPolicyUpdateResourcePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RecommendedMachineConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RecommendedMachineConfiguration() { } @@ -1706,6 +3270,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServerlessGpuSessionsMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServerlessGpuSessionsMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode 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.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode left, Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode left, Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServerlessGpuSessionsSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServerlessGpuSessionsSettings() { } + public int? MaxConcurrentSessionsPerProject { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.ServerlessGpuSessionsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StopOnDisconnectConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StopOnDisconnectConfiguration() { } @@ -1736,4 +3330,88 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DevCenter.Models.StopOnDisconnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnDisconnectEnableStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class StopOnNoConnectConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StopOnNoConnectConfiguration() { } + public int? GracePeriodMinutes { get { throw null; } set { } } + public Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevCenter.Models.StopOnNoConnectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StopOnNoConnectEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StopOnNoConnectEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus 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.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus left, Azure.ResourceManager.DevCenter.Models.StopOnNoConnectEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UserCustomizationsEnableStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UserCustomizationsEnableStatus(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus 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.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus left, Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus left, Azure.ResourceManager.DevCenter.Models.UserCustomizationsEnableStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VirtualNetworkType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VirtualNetworkType(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.VirtualNetworkType Managed { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.VirtualNetworkType Unmanaged { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType 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.ResourceManager.DevCenter.Models.VirtualNetworkType left, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.VirtualNetworkType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.VirtualNetworkType left, Azure.ResourceManager.DevCenter.Models.VirtualNetworkType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkspaceStorageMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkspaceStorageMode(string value) { throw null; } + public static Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode AutoDeploy { get { throw null; } } + public static Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode 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.ResourceManager.DevCenter.Models.WorkspaceStorageMode left, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode left, Azure.ResourceManager.DevCenter.Models.WorkspaceStorageMode right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/ArmDevCenterModelFactory.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/ArmDevCenterModelFactory.cs new file mode 100644 index 000000000000..2d592e8a1e89 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/ArmDevCenterModelFactory.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public static partial class ArmDevCenterModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identity properties. + /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. + /// Defines whether this Environment Type can be used in this Project. + /// The role definition assigned to the environment creator on backing resources. + /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity = null, ResourceIdentifier deploymentTargetId = null, EnvironmentTypeEnableStatus? status = null, IDictionary roles = null, IDictionary userRoleAssignments = null, DevCenterProvisioningState? provisioningState = null) + { + return DevCenterProjectEnvironmentData(id, name, resourceType, systemData, tags, location, identity, deploymentTargetId, default, status, roles, userRoleAssignments, provisioningState, default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AllowedEnvironmentTypeData AllowedEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterProvisioningState? provisioningState) + { + return AllowedEnvironmentTypeData(id, name, resourceType, systemData, provisioningState, default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Image reference information. + /// The SKU for Dev Boxes created using this definition. + /// The storage type used for the Operating System disk of Dev Boxes created using this definition. + /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. + /// The provisioning state of the resource. + /// Validation status of the configured image. + /// Details for image validator error. Populated when the image validation is not successful. + /// Image reference information for the currently active image (only populated during updates). + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevBoxDefinitionData DevBoxDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DevCenterImageReference imageReference = null, DevCenterSku sku = null, string osStorageType = null, DevCenterHibernateSupport? hibernateSupport = null, DevCenterProvisioningState? provisioningState = null, ImageValidationStatus? imageValidationStatus = null, ImageValidationErrorDetails imageValidationErrorDetails = null, DevCenterImageReference activeImageReference = null) + { + return DevBoxDefinitionData(id, name, resourceType, systemData, tags, location, imageReference, sku, osStorageType, hibernateSupport, provisioningState, imageValidationStatus, imageValidationErrorDetails, default, activeImageReference); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties for a GitHub catalog type. + /// Properties for an Azure DevOps catalog type. + /// The provisioning state of the resource. + /// The synchronization state of the catalog. + /// When the catalog was last synced. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterCatalogData DevCenterCatalogData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterGitCatalog gitHub, DevCenterGitCatalog adoGit, DevCenterProvisioningState? provisioningState, DevCenterCatalogSyncState? syncState, DateTimeOffset? lastSyncOn) + { + return DevCenterCatalogData(id, name, resourceType, systemData, gitHub, adoGit, syncType: default, tags: default, provisioningState, syncState, lastSyncStats: default, connectionState: default, lastConnectionOn: default, lastSyncOn); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identity properties. + /// The provisioning state of the resource. + /// The URI of the Dev Center. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterData DevCenterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) + { + return DevCenterData(id, name, resourceType, systemData, tags, location, identity, customerManagedKeyEncryption: default, displayName: default, catalogItemSyncEnableStatus: default, microsoftHostedNetworkEnableStatus: default, devBoxProvisioningInstallAzureMonitorAgentEnableStatus: default, provisioningState, devCenterUri); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource tags. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, DevCenterProvisioningState? provisioningState) + { + return DevCenterEnvironmentTypeData(id, name, resourceType, systemData, tags, displayName: default, provisioningState); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// The id of the resource. + /// Custom operation properties, populated only for a successful operation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterOperationStatus DevCenterOperationStatus(ResourceIdentifier id, string name, string status, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, ResourceIdentifier resourceId = null, BinaryData properties = null) + { + return DevCenterOperationStatus(id, name, status, percentComplete, startOn, endOn, operations, error, properties, resourceId); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Name of a Dev Box definition in parent Project of this Pool. + /// Name of a Network Connection in parent Project of this Pool. + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterPoolData DevCenterPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string devBoxDefinitionName = null, string networkConnectionName = null, DevCenterLicenseType? licenseType = null, LocalAdminStatus? localAdministrator = null, StopOnDisconnectConfiguration stopOnDisconnect = null, DevCenterHealthStatus? healthStatus = null, IEnumerable healthStatusDetails = null, DevCenterProvisioningState? provisioningState = null) + { + return DevCenterPoolData(id, name, resourceType, systemData, tags, location, devBoxDefinitionType: default, devBoxDefinitionName, devBoxDefinition: default, networkConnectionName, licenseType, localAdministrator, stopOnDisconnect, stopOnNoConnect: default, singleSignOnStatus: default, displayName: default, virtualNetworkType: default, managedVirtualNetworkRegions: default, activeHoursConfiguration: default, devBoxTunnelEnableStatus: default, healthStatus, healthStatusDetails, devBoxCount: default, provisioningState); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Resource Id of an associated DevCenter. + /// Description of the project. + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + /// The provisioning state of the resource. + /// The URI of the Dev Center resource this project is associated with. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterProjectData DevCenterProjectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) + { + return DevCenterProjectData(id, name, resourceType, systemData, tags, location, identity: default, devCenterId, description, maxDevBoxesPerUser, displayName: default, catalogItemSyncTypes: default, customizationSettings: default, devBoxAutoDeleteSettings: default, azureAiServicesMode: default, serverlessGpuSessionsSettings: default, workspaceStorageMode: default, provisioningState, devCenterUri); + } + + /// Initializes a new instance of . + /// The current usage. + /// The limit integer. + /// The unit details. + /// The name. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DevCenterUsage DevCenterUsage(long? currentValue, long? limit, DevCenterUsageUnit? unit, DevCenterUsageName name) + { + return DevCenterUsage(currentValue, limit, unit, name, id: default); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterPoolResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterPoolResource.cs new file mode 100644 index 000000000000..90b163d45cb7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterPoolResource.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter +{ + // Because the parameter 'int? top' is missing, the related methods are added back in this way. + public partial class DevCenterPoolResource + { + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [EditorBrowsable(EditorBrowsableState.Never)] + [ForwardsClientCalls] + public virtual async Task> GetDevCenterScheduleAsync(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return await GetDevCenterScheduleAsync(scheduleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [EditorBrowsable(EditorBrowsableState.Never)] + [ForwardsClientCalls] + public virtual Response GetDevCenterSchedule(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return GetDevCenterSchedule(scheduleName, cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterResource.cs new file mode 100644 index 000000000000..693a185c6700 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterResource.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter +{ + // Due to the breaking change that caused a change in the return type, the method name has been renamed and the required method for the API has been added back. + public partial class DevCenterResource + { + /// + /// Lists images for a devcenter. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images + /// + /// + /// Operation Id + /// Images_ListByDevCenter + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetImagesAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken); + } + + /// + /// Lists images for a devcenter. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images + /// + /// + /// Operation Id + /// Images_ListByDevCenter + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetImages(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleCollection.cs new file mode 100644 index 000000000000..39c92b5dd859 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleCollection.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DevCenter +{ + // Because the parameter 'int? top' is missing, the related methods are added back in this way. + public partial class DevCenterScheduleCollection + { + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetAsync(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return await GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Get(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return Get(scheduleName, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> ExistsAsync(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return await ExistsAsync(scheduleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Exists(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return Exists(scheduleName, cancellationToken); + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetIfExistsAsync(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return await GetIfExistsAsync(scheduleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the schedule that uniquely identifies it. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual NullableResponse GetIfExists(string scheduleName, int? top, CancellationToken cancellationToken = default) + { + return GetIfExists(scheduleName, cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleResource.cs new file mode 100644 index 000000000000..e77ab4550c02 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Custom/DevCenterScheduleResource.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DevCenter +{ + // Because the parameter 'int? top' is missing, the related methods are added back in this way. + public partial class DevCenterScheduleResource + { + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetAsync(int? top, CancellationToken cancellationToken = default) + { + return await GetAsync(cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a schedule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedules_Get + /// + /// + /// Default Api Version + /// 2023-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Get(int? top, CancellationToken cancellationToken = default) + { + return Get(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeCollection.cs index 27ff81c347f5..32dd2d58e070 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string environmentTy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(int? to /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(int? top = null, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string environmentTypeName /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string environmentTypeName, CancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.Serialization.cs index eb03075817bb..b42e03cb1017 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.Serialization.cs @@ -45,6 +45,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } writer.WriteEndObject(); } @@ -73,6 +78,7 @@ internal static AllowedEnvironmentTypeData DeserializeAllowedEnvironmentTypeData ResourceType type = default; SystemData systemData = default; DevCenterProvisioningState? provisioningState = default; + string displayName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -119,6 +125,11 @@ internal static AllowedEnvironmentTypeData DeserializeAllowedEnvironmentTypeData provisioningState = new DevCenterProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } } continue; } @@ -134,6 +145,7 @@ internal static AllowedEnvironmentTypeData DeserializeAllowedEnvironmentTypeData type, systemData, provisioningState, + displayName, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.cs index 15fe0fb2b8ec..1ae6313d3168 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeData.cs @@ -62,14 +62,18 @@ public AllowedEnvironmentTypeData() /// The resourceType. /// The systemData. /// The provisioning state of the resource. + /// The display name of the allowed environment type. /// Keeps track of any properties unknown to the library. - internal AllowedEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AllowedEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterProvisioningState? provisioningState, string displayName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; + DisplayName = displayName; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } + /// The display name of the allowed environment type. + public string DisplayName { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.cs index 1b0a09e09b56..56a2c60aa344 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ArmDevCenterModelFactory.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ArmDevCenterModelFactory.cs index f15f8536e4a0..917377b2f7f3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ArmDevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ArmDevCenterModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -16,6 +17,16 @@ namespace Azure.ResourceManager.DevCenter.Models /// Model factory for models. public static partial class ArmDevCenterModelFactory { + /// Initializes a new instance of . + /// Indicates if the resource name is available. + /// The reason why the given name is not available. + /// Detailed reason why the given name is available. + /// A new instance for mocking. + public static DevCenterNameAvailabilityResult DevCenterNameAvailabilityResult(bool? isNameAvailable = null, DevCenterNameUnavailableReason? reason = null, string message = null) + { + return new DevCenterNameAvailabilityResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -24,10 +35,15 @@ public static partial class ArmDevCenterModelFactory /// The tags. /// The location. /// Managed identity properties. + /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). + /// The display name of the devcenter. + /// Dev Center settings to be used when associating a project with a catalog. + /// Network settings that will be enforced on network resources associated with the Dev Center. + /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// The provisioning state of the resource. /// The URI of the Dev Center. /// A new instance for mocking. - public static DevCenterData DevCenterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) + public static DevCenterData DevCenterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, CustomerManagedKeyEncryption customerManagedKeyEncryption = null, string displayName = null, CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = null, MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = null, InstallAzureMonitorAgentEnableStatus? devBoxProvisioningInstallAzureMonitorAgentEnableStatus = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) { tags ??= new Dictionary(); @@ -39,160 +55,221 @@ public static DevCenterData DevCenterData(ResourceIdentifier id = null, string n tags, location, identity, + customerManagedKeyEncryption != null ? new Encryption(customerManagedKeyEncryption, serializedAdditionalRawData: null) : null, + displayName, + catalogItemSyncEnableStatus != null ? new DevCenterProjectCatalogSettings(catalogItemSyncEnableStatus, serializedAdditionalRawData: null) : null, + microsoftHostedNetworkEnableStatus != null ? new DevCenterNetworkSettings(microsoftHostedNetworkEnableStatus, serializedAdditionalRawData: null) : null, + devBoxProvisioningInstallAzureMonitorAgentEnableStatus != null ? new DevBoxProvisioningSettings(devBoxProvisioningInstallAzureMonitorAgentEnableStatus, serializedAdditionalRawData: null) : null, provisioningState, devCenterUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Resource Id of an associated DevCenter. - /// Description of the project. - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. - /// The provisioning state of the resource. - /// The URI of the Dev Center resource this project is associated with. - /// A new instance for mocking. - public static DevCenterProjectData DevCenterProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Custom operation properties, populated only for a successful operation. + /// The resource ID of the resource being operated on. + /// A new instance for mocking. + public static DevCenterOperationStatus DevCenterOperationStatus(ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, BinaryData properties = null, ResourceIdentifier resourceId = null) { - tags ??= new Dictionary(); + operations ??= new List(); - return new DevCenterProjectData( + return new DevCenterOperationStatus( id, name, - resourceType, - systemData, - tags, - location, - devCenterId, - description, - maxDevBoxesPerUser, - provisioningState, - devCenterUri, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + properties, + resourceId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. + /// Initializes a new instance of . + /// The current usage. + /// The limit integer. + /// The unit details. /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the resource. - /// The resource ID of the NetworkConnection you want to attach. - /// The geo-location where the NetworkConnection resource specified in 'networkConnectionResourceId' property lives. - /// Health check status values. - /// AAD Join type of the network. This is populated based on the referenced Network Connection. - /// A new instance for mocking. - public static AttachedNetworkConnectionData AttachedNetworkConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null, ResourceIdentifier networkConnectionId = null, AzureLocation? networkConnectionLocation = null, DevCenterHealthCheckStatus? healthCheckStatus = null, DomainJoinType? domainJoinType = null) + /// The fully qualified arm resource id. + /// A new instance for mocking. + public static DevCenterUsage DevCenterUsage(long? currentValue = null, long? limit = null, DevCenterUsageUnit? unit = null, DevCenterUsageName name = null, ResourceIdentifier id = null) { - return new AttachedNetworkConnectionData( - id, + return new DevCenterUsage( + currentValue, + limit, + unit, name, - resourceType, - systemData, - provisioningState, - networkConnectionId, - networkConnectionLocation, - healthCheckStatus, - domainJoinType, + id, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The localized name of the resource. + /// The name of the resource. + /// A new instance for mocking. + public static DevCenterUsageName DevCenterUsageName(string localizedValue = null, string value = null) + { + return new DevCenterUsageName(localizedValue, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. + /// The tags. + /// The location. + /// The subnet to attach Virtual Machines to. + /// Active Directory domain name. + /// Active Directory domain Organization Unit (OU). + /// The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. Required format: admin@contoso.com. + /// The password for the account used to join domain. /// The provisioning state of the resource. - /// The resource ID of the backing Azure Compute Gallery. - /// A new instance for mocking. - public static DevCenterGalleryData DevCenterGalleryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null, ResourceIdentifier galleryResourceId = null) + /// Overall health status of the network connection. Health checks are run on creation, update, and periodically to validate the network connection. + /// The name for resource group where NICs will be placed. + /// AAD Join type. + /// A new instance for mocking. + public static DevCenterNetworkConnectionData DevCenterNetworkConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier subnetId = null, string domainName = null, string organizationUnit = null, string domainUsername = null, string domainPassword = null, DevCenterProvisioningState? provisioningState = null, DevCenterHealthCheckStatus? healthCheckStatus = null, string networkingResourceGroupName = null, DomainJoinType? domainJoinType = null) { - return new DevCenterGalleryData( + tags ??= new Dictionary(); + + return new DevCenterNetworkConnectionData( id, name, resourceType, systemData, + tags, + location, + subnetId, + domainName, + organizationUnit, + domainUsername, + domainPassword, provisioningState, - galleryResourceId, + healthCheckStatus, + networkingResourceGroupName, + domainJoinType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The description of the image. - /// The publisher of the image. - /// The name of the image offer. - /// The SKU name for the image. - /// The recommended machine configuration to use with the image. + /// The tags. + /// The location. + /// Managed identity properties. + /// Resource Id of an associated DevCenter. + /// Description of the project. + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + /// The display name of the project. + /// Settings to be used when associating a project with a catalog. + /// Settings to be used for customizations. + /// Dev Box Auto Delete settings. + /// Indicates whether Azure AI services are enabled for a project. + /// Settings to be used for serverless GPU. + /// Settings to be used for workspace storage. /// The provisioning state of the resource. - /// Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. - /// A new instance for mocking. - public static DevCenterImageData DevCenterImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string publisher = null, string offer = null, string sku = null, RecommendedMachineConfiguration recommendedMachineConfiguration = null, DevCenterProvisioningState? provisioningState = null, DevCenterHibernateSupport? hibernateSupport = null) + /// The URI of the Dev Center resource this project is associated with. + /// A new instance for mocking. + public static DevCenterProjectData DevCenterProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier devCenterId = null, string description = null, int? maxDevBoxesPerUser = null, string displayName = null, IEnumerable catalogItemSyncTypes = null, ProjectCustomizationSettings customizationSettings = null, DevBoxAutoDeleteSettings devBoxAutoDeleteSettings = null, AzureAiServicesMode? azureAiServicesMode = null, ServerlessGpuSessionsSettings serverlessGpuSessionsSettings = null, WorkspaceStorageMode? workspaceStorageMode = null, DevCenterProvisioningState? provisioningState = null, Uri devCenterUri = null) { - return new DevCenterImageData( + tags ??= new Dictionary(); + catalogItemSyncTypes ??= new List(); + + return new DevCenterProjectData( id, name, resourceType, systemData, + tags, + location, + identity, + devCenterId, description, - publisher, - offer, - sku, - recommendedMachineConfiguration, + maxDevBoxesPerUser, + displayName, + catalogItemSyncTypes != null ? new ProjectCatalogSettings(catalogItemSyncTypes?.ToList(), serializedAdditionalRawData: null) : null, + customizationSettings, + devBoxAutoDeleteSettings, + azureAiServicesMode != null ? new AzureAiServicesSettings(azureAiServicesMode, serializedAdditionalRawData: null) : null, + serverlessGpuSessionsSettings, + workspaceStorageMode != null ? new WorkspaceStorageSettings(workspaceStorageMode, serializedAdditionalRawData: null) : null, provisioningState, - hibernateSupport, + devCenterUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Recommended memory range. - /// Recommended vCPU range. - /// A new instance for mocking. - public static RecommendedMachineConfiguration RecommendedMachineConfiguration(DevCenterResourceRange memory = null, DevCenterResourceRange vCpus = null) + /// Initializes a new instance of . + /// The name of the SKU. E.g. P3. It is typically a letter+number code. + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + /// The name of the resource type. + /// SKU supported locations. + /// Collection of name/value pairs to describe the SKU capabilities. + /// A new instance for mocking. + public static DevCenterSkuDetails DevCenterSkuDetails(string name = null, DevCenterSkuTier? tier = null, string size = null, string family = null, int? capacity = null, ResourceType? resourceType = null, IEnumerable locations = null, IEnumerable capabilities = null) { - return new RecommendedMachineConfiguration(memory, vCpus, serializedAdditionalRawData: null); + locations ??= new List(); + capabilities ??= new List(); + + return new DevCenterSkuDetails( + name, + tier, + size, + family, + capacity, + serializedAdditionalRawData: null, + resourceType, + locations?.ToList(), + capabilities?.ToList()); } - /// Initializes a new instance of . - /// Minimum value. - /// Maximum value. - /// A new instance for mocking. - public static DevCenterResourceRange DevCenterResourceRange(int? min = null, int? max = null) + /// Initializes a new instance of . + /// Name of the capability. + /// Value of the capability. + /// A new instance for mocking. + public static DevCenterCapability DevCenterCapability(string name = null, string value = null) { - return new DevCenterResourceRange(min, max, serializedAdditionalRawData: null); + return new DevCenterCapability(name, value, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The semantic version string. - /// The datetime that the backing image version was published. - /// If the version should be excluded from being treated as the latest version. - /// The size of the OS disk image, in GB. /// The provisioning state of the resource. - /// A new instance for mocking. - public static ImageVersionData ImageVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string namePropertiesName = null, DateTimeOffset? publishedOn = null, bool? isExcludedFromLatest = null, int? osDiskImageSizeInGB = null, DevCenterProvisioningState? provisioningState = null) + /// The resource ID of the NetworkConnection you want to attach. + /// The geo-location where the NetworkConnection resource specified in 'networkConnectionResourceId' property lives. + /// Health check status values. + /// AAD Join type of the network. This is populated based on the referenced Network Connection. + /// A new instance for mocking. + public static AttachedNetworkConnectionData AttachedNetworkConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null, ResourceIdentifier networkConnectionId = null, AzureLocation? networkConnectionLocation = null, DevCenterHealthCheckStatus? healthCheckStatus = null, DomainJoinType? domainJoinType = null) { - return new ImageVersionData( + return new AttachedNetworkConnectionData( id, name, resourceType, systemData, - namePropertiesName, - publishedOn, - isExcludedFromLatest, - osDiskImageSizeInGB, provisioningState, + networkConnectionId, + networkConnectionLocation, + healthCheckStatus, + domainJoinType, serializedAdditionalRawData: null); } @@ -203,12 +280,19 @@ public static ImageVersionData ImageVersionData(ResourceIdentifier id = null, st /// The systemData. /// Properties for a GitHub catalog type. /// Properties for an Azure DevOps catalog type. + /// Indicates the type of sync that is configured for the catalog. + /// Resource tags. /// The provisioning state of the resource. /// The synchronization state of the catalog. + /// Stats of the latest synchronization. + /// The connection state of the catalog. + /// When the catalog was last connected. /// When the catalog was last synced. /// A new instance for mocking. - public static DevCenterCatalogData DevCenterCatalogData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterGitCatalog gitHub = null, DevCenterGitCatalog adoGit = null, DevCenterProvisioningState? provisioningState = null, DevCenterCatalogSyncState? syncState = null, DateTimeOffset? lastSyncOn = null) + public static DevCenterCatalogData DevCenterCatalogData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterGitCatalog gitHub = null, DevCenterGitCatalog adoGit = null, CatalogSyncType? syncType = null, IDictionary tags = null, DevCenterProvisioningState? provisioningState = null, DevCenterCatalogSyncState? syncState = null, CatalogSyncStats lastSyncStats = null, CatalogConnectionState? connectionState = null, DateTimeOffset? lastConnectionOn = null, DateTimeOffset? lastSyncOn = null) { + tags ??= new Dictionary(); + return new DevCenterCatalogData( id, name, @@ -216,135 +300,200 @@ public static DevCenterCatalogData DevCenterCatalogData(ResourceIdentifier id = systemData, gitHub, adoGit, + syncType, + tags, provisioningState, syncState, + lastSyncStats, + connectionState, + lastConnectionOn, lastSyncOn, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Count of catalog items added during synchronization. + /// Count of catalog items updated during synchronization. + /// Count of catalog items that were unchanged during synchronization. + /// Count of catalog items removed during synchronization. + /// Count of catalog items that had validation errors during synchronization. + /// Count of synchronization errors that occured during synchronization. + /// Indicates catalog item types that were synced. + /// A new instance for mocking. + public static CatalogSyncStats CatalogSyncStats(int? added = null, int? updated = null, int? unchanged = null, int? removed = null, int? validationErrors = null, int? synchronizationErrors = null, IEnumerable syncedCatalogItemTypes = null) + { + syncedCatalogItemTypes ??= new List(); + + return new CatalogSyncStats( + added, + updated, + unchanged, + removed, + validationErrors, + synchronizationErrors, + syncedCatalogItemTypes?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Resource tags. - /// The provisioning state of the resource. - /// A new instance for mocking. - public static DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, DevCenterProvisioningState? provisioningState = null) + /// A short description of the environment definition. + /// Input parameters passed to an environment. + /// Path to the Environment Definition entrypoint file. + /// Validation status for the environment definition. + /// A new instance for mocking. + public static DevCenterEnvironmentDefinitionData DevCenterEnvironmentDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable parameters = null, string templatePath = null, CatalogResourceValidationStatus? validationStatus = null) { - tags ??= new Dictionary(); + parameters ??= new List(); - return new DevCenterEnvironmentTypeData( + return new DevCenterEnvironmentDefinitionData( id, name, resourceType, systemData, - tags, - provisioningState, + description, + parameters?.ToList(), + templatePath, + validationStatus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the resource. - /// A new instance for mocking. - public static AllowedEnvironmentTypeData AllowedEnvironmentTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Unique ID of the parameter. + /// Display name of the parameter. + /// Description of the parameter. + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string). + /// Whether or not this parameter is read-only. If true, default should have a value. + /// Whether or not this parameter is required. + /// A new instance for mocking. + public static EnvironmentDefinitionContent EnvironmentDefinitionContent(Guid? id = null, string name = null, string description = null, EnvironmentDefinitionParameterType? parameterType = null, bool? isReadOnly = null, bool? isRequired = null) { - return new AllowedEnvironmentTypeData( + return new EnvironmentDefinitionContent( id, name, - resourceType, - systemData, - provisioningState, + description, + parameterType, + isReadOnly, + isRequired, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed identity properties. - /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. - /// Defines whether this Environment Type can be used in this Project. - /// The role definition assigned to the environment creator on backing resources. - /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. - /// The provisioning state of the resource. - /// A new instance for mocking. - public static DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier deploymentTargetId = null, EnvironmentTypeEnableStatus? status = null, IDictionary roles = null, IDictionary userRoleAssignments = null, DevCenterProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Errors associated with resources synchronized from the catalog. + /// A new instance for mocking. + public static CatalogResourceValidationErrorDetails CatalogResourceValidationErrorDetails(IEnumerable errors = null) { - tags ??= new Dictionary(); - roles ??= new Dictionary(); - userRoleAssignments ??= new Dictionary(); + errors ??= new List(); - return new DevCenterProjectEnvironmentData( - id, - name, - resourceType, - systemData, - tags, - location, - identity, - deploymentTargetId, - status, - roles != null ? new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(roles, serializedAdditionalRawData: null) : null, - userRoleAssignments, - provisioningState, - serializedAdditionalRawData: null); + return new CatalogResourceValidationErrorDetails(errors?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The common name of the Role Assignment. This is a descriptive name such as 'AcrPush'. - /// This is a description of the Role Assignment. - /// A new instance for mocking. - public static DevCenterEnvironmentRole DevCenterEnvironmentRole(string roleName = null, string description = null) + /// Initializes a new instance of . + /// An identifier for the error. + /// A message describing the error. + /// A new instance for mocking. + public static CatalogErrorDetails CatalogErrorDetails(string code = null, string message = null) { - return new DevCenterEnvironmentRole(roleName, description, serializedAdditionalRawData: null); + return new CatalogErrorDetails(code, message, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Error information for the overall synchronization operation. + /// Catalog items that have conflicting names. + /// Errors that occured during synchronization. + /// A new instance for mocking. + public static CatalogSyncErrorDetails CatalogSyncErrorDetails(CatalogErrorDetails operationError = null, IEnumerable conflicts = null, IEnumerable errors = null) + { + conflicts ??= new List(); + errors ??= new List(); + + return new CatalogSyncErrorDetails(operationError, conflicts?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The path of the file that has a conflicting name. + /// Name of the conflicting catalog item. + /// A new instance for mocking. + public static CatalogConflictError CatalogConflictError(string path = null, string name = null) + { + return new CatalogConflictError(path, name, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The path of the file the error is associated with. + /// Errors associated with the file. + /// A new instance for mocking. + public static CatalogSyncError CatalogSyncError(string path = null, IEnumerable errorDetails = null) + { + errorDetails ??= new List(); + + return new CatalogSyncError(path, errorDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. /// Image reference information. - /// The SKU for Dev Boxes created using this definition. - /// The storage type used for the Operating System disk of Dev Boxes created using this definition. - /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. - /// The provisioning state of the resource. + /// The URL to the repository file containing the image definition. + /// Details about the latest build. /// Validation status of the configured image. /// Details for image validator error. Populated when the image validation is not successful. + /// Validation status for the Image Definition. /// Image reference information for the currently active image (only populated during updates). - /// A new instance for mocking. - public static DevBoxDefinitionData DevBoxDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevCenterImageReference imageReference = null, DevCenterSku sku = null, string osStorageType = null, DevCenterHibernateSupport? hibernateSupport = null, DevCenterProvisioningState? provisioningState = null, ImageValidationStatus? imageValidationStatus = null, ImageValidationErrorDetails imageValidationErrorDetails = null, DevCenterImageReference activeImageReference = null) + /// Indicates if automatic image builds will be triggered for image definition updates. + /// Tasks to run at Dev Box provisioning time. + /// Tasks to run when a user first logs into a Dev Box. + /// Another Image Definition that this one extends. + /// A new instance for mocking. + public static DevCenterImageDefinitionData DevCenterImageDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterImageReference imageReference = null, Uri fileUri = null, LatestImageBuild latestBuild = null, ImageValidationStatus? imageValidationStatus = null, ImageValidationErrorDetails imageValidationErrorDetails = null, CatalogResourceValidationStatus? validationStatus = null, DevCenterImageReference activeImageReference = null, AutoImageBuildStatus? autoImageBuild = null, IEnumerable tasks = null, IEnumerable userTasks = null, ImageDefinitionReference extends = null) { - tags ??= new Dictionary(); + tasks ??= new List(); + userTasks ??= new List(); - return new DevBoxDefinitionData( + return new DevCenterImageDefinitionData( id, name, resourceType, systemData, - tags, - location, imageReference, - sku, - osStorageType, - hibernateSupport, - provisioningState, + fileUri, + latestBuild, imageValidationStatus, imageValidationErrorDetails, + validationStatus, activeImageReference, + autoImageBuild, + tasks?.ToList(), + userTasks?.ToList(), + extends, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use. + /// A new instance for mocking. + public static DevCenterImageReference DevCenterImageReference(ResourceIdentifier id = null, string exactVersion = null) + { + return new DevCenterImageReference(id, exactVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Identifier of a build. + /// Start time of the task group. + /// End time of the task group. + /// The state of an Image Definition Build. + /// A new instance for mocking. + public static LatestImageBuild LatestImageBuild(string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ImageDefinitionBuildStatus? status = null) + { + return new LatestImageBuild(name, startOn, endOn, status, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// An identifier for the error. /// A message describing the error. @@ -354,224 +503,372 @@ public static ImageValidationErrorDetails ImageValidationErrorDetails(string cod return new ImageValidationErrorDetails(code, message, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. - /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use. - /// A new instance for mocking. - public static DevCenterImageReference DevCenterImageReference(ResourceIdentifier id = null, string exactVersion = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The specific image version used by the build. + /// The status of the build. + /// Start time of the task group. + /// End time of the task group. + /// Details for image creation error. Populated when the image creation is not successful. + /// A new instance for mocking. + public static DevCenterImageDefinitionBuildData DevCenterImageDefinitionBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterImageReference imageReference = null, ImageDefinitionBuildStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ImageCreationErrorDetails errorDetails = null) { - return new DevCenterImageReference(id, exactVersion, serializedAdditionalRawData: null); + return new DevCenterImageDefinitionBuildData( + id, + name, + resourceType, + systemData, + imageReference, + status, + startOn, + endOn, + errorDetails, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Fully qualified ID for the async operation. - /// Name of the async operation. - /// Operation status. - /// Percent of the operation that is complete. - /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. - /// The id of the resource. - /// Custom operation properties, populated only for a successful operation. - /// A new instance for mocking. - public static DevCenterOperationStatus DevCenterOperationStatus(ResourceIdentifier id = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, ResourceIdentifier resourceId = null, BinaryData properties = null) + /// Initializes a new instance of . + /// An identifier for the error. + /// A message describing the error. + /// A new instance for mocking. + public static ImageCreationErrorDetails ImageCreationErrorDetails(string code = null, string message = null) { - operations ??= new List(); + return new ImageCreationErrorDetails(code, message, serializedAdditionalRawData: null); + } - return new DevCenterOperationStatus( + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The specific image version used by the build. + /// The status of the build. + /// Start time of the task group. + /// End time of the task group. + /// Details for image creation error. Populated when the image creation is not successful. + /// The list of task groups executed during the image definition build. + /// A new instance for mocking. + public static ImageDefinitionBuildDetails ImageDefinitionBuildDetails(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterImageReference imageReference = null, ImageDefinitionBuildStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ImageCreationErrorDetails errorDetails = null, IEnumerable taskGroups = null) + { + taskGroups ??= new List(); + + return new ImageDefinitionBuildDetails( id, name, + resourceType, + systemData, + imageReference, status, - percentComplete, startOn, endOn, - operations?.ToList(), - error, - resourceId, - properties, + errorDetails, + taskGroups?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The current usage. - /// The limit integer. - /// The unit details. + /// Initializes a new instance of . + /// The name of the task group. + /// The status of the task group. + /// Start time of the task group. + /// End time of the task group. + /// The list of tasks executed during the task group. + /// A new instance for mocking. + public static ImageDefinitionBuildTaskGroup ImageDefinitionBuildTaskGroup(string name = null, ImageDefinitionBuildStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable tasks = null) + { + tasks ??= new List(); + + return new ImageDefinitionBuildTaskGroup( + name, + status, + startOn, + endOn, + tasks?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the task. + /// Parameters for the task. + /// Display name to help differentiate multiple instances of the same task. + /// ID of the task instance. + /// Start time of the task. + /// End time of the task. + /// The status of the task. + /// The URI for retrieving logs for the task execution. + /// A new instance for mocking. + public static ImageDefinitionBuildTask ImageDefinitionBuildTask(string name = null, IEnumerable parameters = null, string displayName = null, string id = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ImageDefinitionBuildStatus? status = null, Uri logUri = null) + { + parameters ??= new List(); + + return new ImageDefinitionBuildTask( + name, + parameters?.ToList(), + displayName, + id, + startOn, + endOn, + status, + logUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Key of the parameter. + /// Value of the parameter. + /// A new instance for mocking. + public static ImageDefinitionBuildTaskParametersItem ImageDefinitionBuildTaskParametersItem(string key = null, string value = null) + { + return new ImageDefinitionBuildTaskParametersItem(key, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. /// The name. - /// A new instance for mocking. - public static DevCenterUsage DevCenterUsage(long? currentValue = null, long? limit = null, DevCenterUsageUnit? unit = null, DevCenterUsageName name = null) + /// The resourceType. + /// The systemData. + /// Inputs to the task. + /// The default timeout for the task. + /// Validation status for the Task. + /// A new instance for mocking. + public static CustomizationTaskData CustomizationTaskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IReadOnlyDictionary inputs = null, int? timeout = null, CatalogResourceValidationStatus? validationStatus = null) { - return new DevCenterUsage(currentValue, limit, unit, name, serializedAdditionalRawData: null); + inputs ??= new Dictionary(); + + return new CustomizationTaskData( + id, + name, + resourceType, + systemData, + inputs, + timeout, + validationStatus, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The localized name of the resource. - /// The name of the resource. - /// A new instance for mocking. - public static DevCenterUsageName DevCenterUsageName(string localizedValue = null, string value = null) + /// Initializes a new instance of . + /// Description of the input. + /// Type of the input. + /// Whether or not the input is required. + /// A new instance for mocking. + public static CustomizationTaskInput CustomizationTaskInput(string description = null, CustomizationTaskInputType? inputType = null, bool? isRequired = null) { - return new DevCenterUsageName(localizedValue, value, serializedAdditionalRawData: null); + return new CustomizationTaskInput(description, inputType, isRequired, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Indicates if the resource name is available. - /// The reason why the given name is not available. - /// Detailed reason why the given name is available. - /// A new instance for mocking. - public static DevCenterNameAvailabilityResult DevCenterNameAvailabilityResult(bool? isNameAvailable = null, DevCenterNameUnavailableReason? reason = null, string message = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Image reference information. + /// The SKU for Dev Boxes created using this definition. + /// The storage type used for the Operating System disk of Dev Boxes created using this definition. + /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. + /// The provisioning state of the resource. + /// Validation status of the configured image. + /// Details for image validator error. Populated when the image validation is not successful. + /// Validation status for the Dev Box Definition. + /// Image reference information for the currently active image (only populated during updates). + /// A new instance for mocking. + public static DevBoxDefinitionData DevBoxDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DevCenterImageReference imageReference = null, DevCenterSku sku = null, string osStorageType = null, DevCenterHibernateSupport? hibernateSupport = null, DevCenterProvisioningState? provisioningState = null, ImageValidationStatus? imageValidationStatus = null, ImageValidationErrorDetails imageValidationErrorDetails = null, CatalogResourceValidationStatus? validationStatus = null, DevCenterImageReference activeImageReference = null) { - return new DevCenterNameAvailabilityResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); + tags ??= new Dictionary(); + + return new DevBoxDefinitionData( + id, + name, + resourceType, + systemData, + tags, + location, + imageReference, + sku, + osStorageType, + hibernateSupport, + provisioningState, + imageValidationStatus, + imageValidationErrorDetails, + validationStatus, + activeImageReference, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name of the SKU. Ex - P3. It is typically a letter+number code. - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - /// The name of the resource type. - /// SKU supported locations. - /// Collection of name/value pairs to describe the SKU capabilities. - /// A new instance for mocking. - public static DevCenterSkuDetails DevCenterSkuDetails(string name = null, DevCenterSkuTier? tier = null, string size = null, string family = null, int? capacity = null, ResourceType? resourceType = null, IEnumerable locations = null, IEnumerable capabilities = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identity properties. + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + /// The managed identity configuration used for key vault access. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static DevCenterEncryptionSetData DevCenterEncryptionSetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus = null, Uri keyEncryptionKeyUri = null, KeyEncryptionKeyIdentity keyEncryptionKeyIdentity = null, DevCenterProvisioningState? provisioningState = null) { - locations ??= new List(); - capabilities ??= new List(); + tags ??= new Dictionary(); - return new DevCenterSkuDetails( + return new DevCenterEncryptionSetData( + id, name, - tier, - size, - family, - capacity, - serializedAdditionalRawData: null, resourceType, - locations?.ToList(), - capabilities?.ToList()); + systemData, + tags, + location, + identity, + devboxDisksEncryptionEnableStatus, + keyEncryptionKeyUri, + keyEncryptionKeyIdentity, + provisioningState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Name of the capability. - /// Value of the capability. - /// A new instance for mocking. - public static DevCenterCapability DevCenterCapability(string name = null, string value = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource tags. + /// The display name of the environment type. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static DevCenterEnvironmentTypeData DevCenterEnvironmentTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, string displayName = null, DevCenterProvisioningState? provisioningState = null) { - return new DevCenterCapability(name, value, serializedAdditionalRawData: null); + tags ??= new Dictionary(); + + return new DevCenterEnvironmentTypeData( + id, + name, + resourceType, + systemData, + tags, + displayName, + provisioningState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The provisioning state of the resource. + /// The resource ID of the backing Azure Compute Gallery. + /// A new instance for mocking. + public static DevCenterGalleryData DevCenterGalleryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null, ResourceIdentifier galleryResourceId = null) + { + return new DevCenterGalleryData( + id, + name, + resourceType, + systemData, + provisioningState, + galleryResourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Name of a Dev Box definition in parent Project of this Pool. - /// Name of a Network Connection in parent Project of this Pool. - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state. + /// The description of the image. + /// The publisher of the image. + /// The name of the image offer. + /// The SKU name for the image. + /// The recommended machine configuration to use with the image. /// The provisioning state of the resource. - /// A new instance for mocking. - public static DevCenterPoolData DevCenterPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string devBoxDefinitionName = null, string networkConnectionName = null, DevCenterLicenseType? licenseType = null, LocalAdminStatus? localAdministrator = null, StopOnDisconnectConfiguration stopOnDisconnect = null, DevCenterHealthStatus? healthStatus = null, IEnumerable healthStatusDetails = null, DevCenterProvisioningState? provisioningState = null) + /// Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. + /// A new instance for mocking. + public static DevCenterImageData DevCenterImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string publisher = null, string offer = null, string sku = null, RecommendedMachineConfiguration recommendedMachineConfiguration = null, DevCenterProvisioningState? provisioningState = null, DevCenterHibernateSupport? hibernateSupport = null) { - tags ??= new Dictionary(); - healthStatusDetails ??= new List(); - - return new DevCenterPoolData( + return new DevCenterImageData( id, name, resourceType, systemData, - tags, - location, - devBoxDefinitionName, - networkConnectionName, - licenseType, - localAdministrator, - stopOnDisconnect, - healthStatus, - healthStatusDetails?.ToList(), + description, + publisher, + offer, + sku, + recommendedMachineConfiguration, provisioningState, + hibernateSupport, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// An identifier for the issue. - /// A message describing the issue, intended to be suitable for display in a user interface. - /// A new instance for mocking. - public static DevCenterHealthStatusDetail DevCenterHealthStatusDetail(string code = null, string message = null) + /// Initializes a new instance of . + /// Recommended memory range. + /// Recommended vCPU range. + /// A new instance for mocking. + public static RecommendedMachineConfiguration RecommendedMachineConfiguration(DevCenterResourceRange memory = null, DevCenterResourceRange vCpus = null) { - return new DevCenterHealthStatusDetail(code, message, serializedAdditionalRawData: null); + return new RecommendedMachineConfiguration(memory, vCpus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Minimum value. + /// Maximum value. + /// A new instance for mocking. + public static DevCenterResourceRange DevCenterResourceRange(int? min = null, int? max = null) + { + return new DevCenterResourceRange(min, max, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Supported type this scheduled task represents. - /// The frequency of this scheduled task. - /// The target time to trigger the action. The format is HH:MM. - /// The IANA timezone id at which the schedule should execute. - /// Indicates whether or not this scheduled task is enabled. + /// The semantic version string. + /// The datetime that the backing image version was published. + /// If the version should be excluded from being treated as the latest version. + /// The size of the OS disk image, in GB. /// The provisioning state of the resource. - /// A new instance for mocking. - public static DevCenterScheduleData DevCenterScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterScheduledType? scheduledType = null, DevCenterScheduledFrequency? frequency = null, string time = null, string timeZone = null, DevCenterScheduleEnableStatus? state = null, DevCenterProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static ImageVersionData ImageVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string namePropertiesName = null, DateTimeOffset? publishedOn = null, bool? isExcludedFromLatest = null, int? osDiskImageSizeInGB = null, DevCenterProvisioningState? provisioningState = null) { - return new DevCenterScheduleData( + return new ImageVersionData( id, name, resourceType, systemData, - scheduledType, - frequency, - time, - timeZone, - state, + namePropertiesName, + publishedOn, + isExcludedFromLatest, + osDiskImageSizeInGB, provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// The subnet to attach Virtual Machines to. - /// Active Directory domain name. - /// Active Directory domain Organization Unit (OU). - /// The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. Required format: admin@contoso.com. - /// The password for the account used to join domain. + /// Resource policies that are a part of this project policy. + /// Resources that have access to the shared resources that are a part of this project policy. /// The provisioning state of the resource. - /// Overall health status of the network connection. Health checks are run on creation, update, and periodically to validate the network connection. - /// The name for resource group where NICs will be placed. - /// AAD Join type. - /// A new instance for mocking. - public static DevCenterNetworkConnectionData DevCenterNetworkConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier subnetId = null, string domainName = null, string organizationUnit = null, string domainUsername = null, string domainPassword = null, DevCenterProvisioningState? provisioningState = null, DevCenterHealthCheckStatus? healthCheckStatus = null, string networkingResourceGroupName = null, DomainJoinType? domainJoinType = null) + /// A new instance for mocking. + public static ProjectPolicyData ProjectPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable resourcePolicies = null, IEnumerable scopes = null, DevCenterProvisioningState? provisioningState = null) { - tags ??= new Dictionary(); + resourcePolicies ??= new List(); + scopes ??= new List(); - return new DevCenterNetworkConnectionData( + return new ProjectPolicyData( id, name, resourceType, systemData, - tags, - location, - subnetId, - domainName, - organizationUnit, - domainUsername, - domainPassword, + resourcePolicies?.ToList(), + scopes?.ToList(), provisioningState, - healthCheckStatus, - networkingResourceGroupName, - domainJoinType, serializedAdditionalRawData: null); } @@ -651,5 +948,190 @@ public static DevCenterEndpointDetail DevCenterEndpointDetail(int? port = null) { return new DevCenterEndpointDetail(port, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The provisioning state of the resource. + /// The display name of the allowed environment type. + /// A new instance for mocking. + public static AllowedEnvironmentTypeData AllowedEnvironmentTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterProvisioningState? provisioningState = null, string displayName = null) + { + return new AllowedEnvironmentTypeData( + id, + name, + resourceType, + systemData, + provisioningState, + displayName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identity properties. + /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. + /// The display name of the project environment type. + /// Defines whether this Environment Type can be used in this Project. + /// The role definition assigned to the environment creator on backing resources. + /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. + /// The provisioning state of the resource. + /// The number of environments of this type. + /// A new instance for mocking. + public static DevCenterProjectEnvironmentData DevCenterProjectEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier deploymentTargetId = null, string displayName = null, EnvironmentTypeEnableStatus? status = null, IDictionary roles = null, IDictionary userRoleAssignments = null, DevCenterProvisioningState? provisioningState = null, int? environmentCount = null) + { + tags ??= new Dictionary(); + roles ??= new Dictionary(); + userRoleAssignments ??= new Dictionary(); + + return new DevCenterProjectEnvironmentData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + deploymentTargetId, + displayName, + status, + roles != null ? new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(roles, serializedAdditionalRawData: null) : null, + userRoleAssignments, + provisioningState, + environmentCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The common name of the Role Assignment. This is a descriptive name such as 'AcrPush'. + /// This is a description of the Role Assignment. + /// A new instance for mocking. + public static DevCenterEnvironmentRole DevCenterEnvironmentRole(string roleName = null, string description = null) + { + return new DevCenterEnvironmentRole(roleName, description, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Dev Center settings to be used when associating a project with a catalog. + /// Network settings that will be enforced on this project. + /// A new instance for mocking. + public static InheritedSettingsForProject InheritedSettingsForProject(CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = null, MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = null) + { + return new InheritedSettingsForProject(catalogItemSyncEnableStatus != null ? new DevCenterProjectCatalogSettings(catalogItemSyncEnableStatus, serializedAdditionalRawData: null) : null, microsoftHostedNetworkEnableStatus != null ? new ProjectNetworkSettings(microsoftHostedNetworkEnableStatus, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or not provided. + /// Name of a Network Connection in parent Project of this Pool. + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant. + /// The display name of the pool. + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// Active hours configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state. + /// Indicates the number of provisioned Dev Boxes in this pool. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static DevCenterPoolData DevCenterPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PoolDevBoxDefinitionType? devBoxDefinitionType = null, string devBoxDefinitionName = null, PoolDevBox devBoxDefinition = null, string networkConnectionName = null, DevCenterLicenseType? licenseType = null, LocalAdminStatus? localAdministrator = null, StopOnDisconnectConfiguration stopOnDisconnect = null, StopOnNoConnectConfiguration stopOnNoConnect = null, PoolUpdateSingleSignOnStatus? singleSignOnStatus = null, string displayName = null, VirtualNetworkType? virtualNetworkType = null, IEnumerable managedVirtualNetworkRegions = null, ActiveHoursConfiguration activeHoursConfiguration = null, DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus = null, DevCenterHealthStatus? healthStatus = null, IEnumerable healthStatusDetails = null, int? devBoxCount = null, DevCenterProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + managedVirtualNetworkRegions ??= new List(); + healthStatusDetails ??= new List(); + + return new DevCenterPoolData( + id, + name, + resourceType, + systemData, + tags, + location, + devBoxDefinitionType, + devBoxDefinitionName, + devBoxDefinition, + networkConnectionName, + licenseType, + localAdministrator, + stopOnDisconnect, + stopOnNoConnect, + singleSignOnStatus, + displayName, + virtualNetworkType, + managedVirtualNetworkRegions?.ToList(), + activeHoursConfiguration, + devBoxTunnelEnableStatus, + healthStatus, + healthStatusDetails?.ToList(), + devBoxCount, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the issue. + /// A message describing the issue, intended to be suitable for display in a user interface. + /// A new instance for mocking. + public static DevCenterHealthStatusDetail DevCenterHealthStatusDetail(string code = null, string message = null) + { + return new DevCenterHealthStatusDetail(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Image reference information. + /// The SKU for Dev Boxes created from the Pool. + /// Image reference information for the currently active image (only populated during updates). + /// A new instance for mocking. + public static PoolDevBox PoolDevBox(DevCenterImageReference imageReference = null, DevCenterSku sku = null, DevCenterImageReference activeImageReference = null) + { + return new PoolDevBox(imageReference, sku, activeImageReference, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Supported type this scheduled task represents. + /// The frequency of this scheduled task. + /// The target time to trigger the action. The format is HH:MM. + /// The IANA timezone id at which the schedule should execute. + /// Indicates whether or not this scheduled task is enabled. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static DevCenterScheduleData DevCenterScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevCenterScheduledType? scheduledType = null, DevCenterScheduledFrequency? frequency = null, string time = null, string timeZone = null, DevCenterScheduleEnableStatus? state = null, DevCenterProvisioningState? provisioningState = null) + { + return new DevCenterScheduleData( + id, + name, + resourceType, + systemData, + scheduledType, + frequency, + time, + timeZone, + state, + provisioningState, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionCollection.cs index 5fb796ca19b1..86bff6df6ae6 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string attachedNe /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string attachedNetworkConn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string attachedNetworkConnectionName, Cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.cs index bf15185de218..af1f970d82cb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _attachedNetworkConnectionAttachedNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_attachedNetworkConnectionAttachedNetworksClientDiagnostics, Pipeline, _attachedNetworkConnectionAttachedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_attachedNetworkConnectionAttachedNetworksClientDiagnostics, Pipeline, _attachedNetworkConnectionAttachedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _attachedNetworkConnectionAttachedNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_attachedNetworkConnectionAttachedNetworksClientDiagnostics, Pipeline, _attachedNetworkConnectionAttachedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_attachedNetworkConnectionAttachedNetworksClientDiagnostics, Pipeline, _attachedNetworkConnectionAttachedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskCollection.cs new file mode 100644 index 000000000000..3b0a0843a690 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCustomizationTasks method from an instance of . + /// + public partial class CustomizationTaskCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _customizationTaskClientDiagnostics; + private readonly CustomizationTasksRestOperations _customizationTaskRestClient; + + /// Initializes a new instance of the class for mocking. + protected CustomizationTaskCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal CustomizationTaskCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customizationTaskClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", CustomizationTaskResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CustomizationTaskResource.ResourceType, out string customizationTaskApiVersion); + _customizationTaskRestClient = new CustomizationTasksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customizationTaskApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterCatalogResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterCatalogResource.ResourceType), nameof(id)); + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.Get"); + scope.Start(); + try + { + var response = await _customizationTaskRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.Get"); + scope.Start(); + try + { + var response = _customizationTaskRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Tasks in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks + /// + /// + /// Operation Id + /// CustomizationTasks_ListByCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _customizationTaskRestClient.CreateListByCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customizationTaskRestClient.CreateListByCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomizationTaskResource(Client, CustomizationTaskData.DeserializeCustomizationTaskData(e)), _customizationTaskClientDiagnostics, Pipeline, "CustomizationTaskCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Tasks in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks + /// + /// + /// Operation Id + /// CustomizationTasks_ListByCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _customizationTaskRestClient.CreateListByCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customizationTaskRestClient.CreateListByCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomizationTaskResource(Client, CustomizationTaskData.DeserializeCustomizationTaskData(e)), _customizationTaskClientDiagnostics, Pipeline, "CustomizationTaskCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.Exists"); + scope.Start(); + try + { + var response = await _customizationTaskRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.Exists"); + scope.Start(); + try + { + var response = _customizationTaskRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _customizationTaskRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskCollection.GetIfExists"); + scope.Start(); + try + { + var response = _customizationTaskRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, taskName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.Serialization.cs new file mode 100644 index 000000000000..1001b7182e78 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class CustomizationTaskData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteNumberValue(Timeout.Value); + } + if (options.Format != "W" && Optional.IsDefined(ValidationStatus)) + { + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus.Value.ToString()); + } + writer.WriteEndObject(); + } + + CustomizationTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomizationTaskData(document.RootElement, options); + } + + internal static CustomizationTaskData DeserializeCustomizationTaskData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IReadOnlyDictionary inputs = default; + int? timeout = default; + CatalogResourceValidationStatus? validationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("inputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, CustomizationTaskInput.DeserializeCustomizationTaskInput(property1.Value, options)); + } + inputs = dictionary; + continue; + } + if (property0.NameEquals("timeout"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("validationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validationStatus = new CatalogResourceValidationStatus(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomizationTaskData( + id, + name, + type, + systemData, + inputs ?? new ChangeTrackingDictionary(), + timeout, + validationStatus, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomizationTaskData)} does not support writing '{options.Format}' format."); + } + } + + CustomizationTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomizationTaskData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomizationTaskData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.cs new file mode 100644 index 000000000000..c2a70ade0d52 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskData.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the CustomizationTask data model. + /// Represents a Task to be used in customizing a Dev Box. + /// + public partial class CustomizationTaskData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomizationTaskData() + { + Inputs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Inputs to the task. + /// The default timeout for the task. + /// Validation status for the Task. + /// Keeps track of any properties unknown to the library. + internal CustomizationTaskData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyDictionary inputs, int? timeout, CatalogResourceValidationStatus? validationStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Inputs = inputs; + Timeout = timeout; + ValidationStatus = validationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Inputs to the task. + public IReadOnlyDictionary Inputs { get; } + /// The default timeout for the task. + public int? Timeout { get; } + /// Validation status for the Task. + public CatalogResourceValidationStatus? ValidationStatus { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.Serialization.cs new file mode 100644 index 000000000000..60fca69d0017 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class CustomizationTaskResource : IJsonModel + { + private static CustomizationTaskData s_dataDeserializationInstance; + private static CustomizationTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CustomizationTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + CustomizationTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.cs new file mode 100644 index 000000000000..e796d7b913ff --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/CustomizationTaskResource.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a CustomizationTask along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCustomizationTaskResource method. + /// Otherwise you can get one from its parent resource using the GetCustomizationTask method. + /// + public partial class CustomizationTaskResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The catalogName. + /// The taskName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _customizationTaskClientDiagnostics; + private readonly CustomizationTasksRestOperations _customizationTaskRestClient; + private readonly CustomizationTaskData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/catalogs/tasks"; + + /// Initializes a new instance of the class for mocking. + protected CustomizationTaskResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CustomizationTaskResource(ArmClient client, CustomizationTaskData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CustomizationTaskResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customizationTaskClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string customizationTaskApiVersion); + _customizationTaskRestClient = new CustomizationTasksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customizationTaskApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CustomizationTaskData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskResource.Get"); + scope.Start(); + try + { + var response = await _customizationTaskRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskResource.Get"); + scope.Start(); + try + { + var response = _customizationTaskRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizationTaskResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Customization Task error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails + /// + /// + /// Operation Id + /// CustomizationTasks_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskResource.GetErrorDetails"); + scope.Start(); + try + { + var response = await _customizationTaskRestClient.GetErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Customization Task error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails + /// + /// + /// Operation Id + /// CustomizationTasks_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _customizationTaskClientDiagnostics.CreateScope("CustomizationTaskResource.GetErrorDetails"); + scope.Start(); + try + { + var response = _customizationTaskRestClient.GetErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionCollection.cs index 2f36bc41c1d7..1c8d84c8c437 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w } /// - /// Gets a Dev Box definition + /// Gets a Dev Box definition. /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string de } /// - /// Gets a Dev Box definition + /// Gets a Dev Box definition. /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string de /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string devBoxDefinitionNam /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(int? top = null, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string devBoxDefinitionNam /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string devBoxDefinitionName, CancellationTo /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.Serialization.cs index 1fd68100d0b6..67ddd94e15f1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.Serialization.cs @@ -75,6 +75,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("imageValidationErrorDetails"u8); writer.WriteObjectValue(ImageValidationErrorDetails, options); } + if (options.Format != "W" && Optional.IsDefined(ValidationStatus)) + { + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(ActiveImageReference)) { writer.WritePropertyName("activeImageReference"u8); @@ -116,6 +121,7 @@ internal static DevBoxDefinitionData DeserializeDevBoxDefinitionData(JsonElement DevCenterProvisioningState? provisioningState = default; ImageValidationStatus? imageValidationStatus = default; ImageValidationErrorDetails imageValidationErrorDetails = default; + CatalogResourceValidationStatus? validationStatus = default; DevCenterImageReference activeImageReference = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -232,6 +238,15 @@ internal static DevBoxDefinitionData DeserializeDevBoxDefinitionData(JsonElement imageValidationErrorDetails = ImageValidationErrorDetails.DeserializeImageValidationErrorDetails(property0.Value, options); continue; } + if (property0.NameEquals("validationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validationStatus = new CatalogResourceValidationStatus(property0.Value.GetString()); + continue; + } if (property0.NameEquals("activeImageReference"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -264,6 +279,7 @@ internal static DevBoxDefinitionData DeserializeDevBoxDefinitionData(JsonElement provisioningState, imageValidationStatus, imageValidationErrorDetails, + validationStatus, activeImageReference, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.cs index 1940a2c020b3..babac0ae47d2 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionData.cs @@ -71,9 +71,10 @@ public DevBoxDefinitionData(AzureLocation location) : base(location) /// The provisioning state of the resource. /// Validation status of the configured image. /// Details for image validator error. Populated when the image validation is not successful. + /// Validation status for the Dev Box Definition. /// Image reference information for the currently active image (only populated during updates). /// Keeps track of any properties unknown to the library. - internal DevBoxDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DevCenterImageReference imageReference, DevCenterSku sku, string osStorageType, DevCenterHibernateSupport? hibernateSupport, DevCenterProvisioningState? provisioningState, ImageValidationStatus? imageValidationStatus, ImageValidationErrorDetails imageValidationErrorDetails, DevCenterImageReference activeImageReference, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DevBoxDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DevCenterImageReference imageReference, DevCenterSku sku, string osStorageType, DevCenterHibernateSupport? hibernateSupport, DevCenterProvisioningState? provisioningState, ImageValidationStatus? imageValidationStatus, ImageValidationErrorDetails imageValidationErrorDetails, CatalogResourceValidationStatus? validationStatus, DevCenterImageReference activeImageReference, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ImageReference = imageReference; Sku = sku; @@ -82,6 +83,7 @@ internal DevBoxDefinitionData(ResourceIdentifier id, string name, ResourceType r ProvisioningState = provisioningState; ImageValidationStatus = imageValidationStatus; ImageValidationErrorDetails = imageValidationErrorDetails; + ValidationStatus = validationStatus; ActiveImageReference = activeImageReference; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -105,6 +107,8 @@ internal DevBoxDefinitionData() public ImageValidationStatus? ImageValidationStatus { get; } /// Details for image validator error. Populated when the image validation is not successful. public ImageValidationErrorDetails ImageValidationErrorDetails { get; } + /// Validation status for the Dev Box Definition. + public CatalogResourceValidationStatus? ValidationStatus { get; } /// Image reference information for the currently active image (only populated during updates). public DevCenterImageReference ActiveImageReference { get; } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.cs index 94386be64cf8..07d7b1a6cc6e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.cs @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets a Dev Box definition + /// Gets a Dev Box definition. /// /// /// Request Path @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -131,7 +131,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Gets a Dev Box definition + /// Gets a Dev Box definition. /// /// /// Request Path @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response Get(CancellationToken cancella } /// - /// Deletes a Dev Box definition + /// Deletes a Dev Box definition. /// /// /// Request Path @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devBoxDefinitionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -213,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes a Dev Box definition + /// Deletes a Dev Box definition. /// /// /// Request Path @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -242,7 +242,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devBoxDefinitionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> UpdateAsync(Wa try { var response = await _devBoxDefinitionRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevBoxDefinitionOperationSource(Client), _devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevBoxDefinitionOperationSource(Client), _devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil try { var response = _devBoxDefinitionRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevBoxDefinitionOperationSource(Client), _devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevBoxDefinitionOperationSource(Client), _devBoxDefinitionClientDiagnostics, Pipeline, _devBoxDefinitionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogCollection.cs index 2e13a2110de6..724d66ce3009 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w } /// - /// Gets a catalog + /// Gets a catalog. /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string ca } /// - /// Gets a catalog + /// Gets a catalog. /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ca /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string catalogName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(int? top = null, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string catalogName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string catalogName, CancellationToken cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.Serialization.cs index 19cb1739fccc..5d500f5e21f8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.Serialization.cs @@ -50,6 +50,22 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("adoGit"u8); writer.WriteObjectValue(AdoGit, options); } + if (Optional.IsDefined(SyncType)) + { + writer.WritePropertyName("syncType"u8); + writer.WriteStringValue(SyncType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -60,6 +76,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("syncState"u8); writer.WriteStringValue(SyncState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(LastSyncStats)) + { + writer.WritePropertyName("lastSyncStats"u8); + writer.WriteObjectValue(LastSyncStats, options); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionState)) + { + writer.WritePropertyName("connectionState"u8); + writer.WriteStringValue(ConnectionState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastConnectionOn)) + { + writer.WritePropertyName("lastConnectionTime"u8); + writer.WriteStringValue(LastConnectionOn.Value, "O"); + } if (options.Format != "W" && Optional.IsDefined(LastSyncOn)) { writer.WritePropertyName("lastSyncTime"u8); @@ -94,8 +125,13 @@ internal static DevCenterCatalogData DeserializeDevCenterCatalogData(JsonElement SystemData systemData = default; DevCenterGitCatalog gitHub = default; DevCenterGitCatalog adoGit = default; + CatalogSyncType? syncType = default; + IDictionary tags = default; DevCenterProvisioningState? provisioningState = default; DevCenterCatalogSyncState? syncState = default; + CatalogSyncStats lastSyncStats = default; + CatalogConnectionState? connectionState = default; + DateTimeOffset? lastConnectionTime = default; DateTimeOffset? lastSyncTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -152,6 +188,29 @@ internal static DevCenterCatalogData DeserializeDevCenterCatalogData(JsonElement adoGit = DevCenterGitCatalog.DeserializeDevCenterGitCatalog(property0.Value, options); continue; } + if (property0.NameEquals("syncType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + syncType = new CatalogSyncType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("tags"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + tags = dictionary; + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -170,6 +229,33 @@ internal static DevCenterCatalogData DeserializeDevCenterCatalogData(JsonElement syncState = new DevCenterCatalogSyncState(property0.Value.GetString()); continue; } + if (property0.NameEquals("lastSyncStats"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSyncStats = CatalogSyncStats.DeserializeCatalogSyncStats(property0.Value, options); + continue; + } + if (property0.NameEquals("connectionState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionState = new CatalogConnectionState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("lastConnectionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastConnectionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } if (property0.NameEquals("lastSyncTime"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -195,8 +281,13 @@ internal static DevCenterCatalogData DeserializeDevCenterCatalogData(JsonElement systemData, gitHub, adoGit, + syncType, + tags ?? new ChangeTrackingDictionary(), provisioningState, syncState, + lastSyncStats, + connectionState, + lastConnectionTime, lastSyncTime, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.cs index c302a1b0179d..a0bd4cc0264e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogData.cs @@ -54,6 +54,7 @@ public partial class DevCenterCatalogData : ResourceData /// Initializes a new instance of . public DevCenterCatalogData() { + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -63,16 +64,26 @@ public DevCenterCatalogData() /// The systemData. /// Properties for a GitHub catalog type. /// Properties for an Azure DevOps catalog type. + /// Indicates the type of sync that is configured for the catalog. + /// Resource tags. /// The provisioning state of the resource. /// The synchronization state of the catalog. + /// Stats of the latest synchronization. + /// The connection state of the catalog. + /// When the catalog was last connected. /// When the catalog was last synced. /// Keeps track of any properties unknown to the library. - internal DevCenterCatalogData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterGitCatalog gitHub, DevCenterGitCatalog adoGit, DevCenterProvisioningState? provisioningState, DevCenterCatalogSyncState? syncState, DateTimeOffset? lastSyncOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DevCenterCatalogData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterGitCatalog gitHub, DevCenterGitCatalog adoGit, CatalogSyncType? syncType, IDictionary tags, DevCenterProvisioningState? provisioningState, DevCenterCatalogSyncState? syncState, CatalogSyncStats lastSyncStats, CatalogConnectionState? connectionState, DateTimeOffset? lastConnectionOn, DateTimeOffset? lastSyncOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { GitHub = gitHub; AdoGit = adoGit; + SyncType = syncType; + Tags = tags; ProvisioningState = provisioningState; SyncState = syncState; + LastSyncStats = lastSyncStats; + ConnectionState = connectionState; + LastConnectionOn = lastConnectionOn; LastSyncOn = lastSyncOn; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -81,10 +92,20 @@ internal DevCenterCatalogData(ResourceIdentifier id, string name, ResourceType r public DevCenterGitCatalog GitHub { get; set; } /// Properties for an Azure DevOps catalog type. public DevCenterGitCatalog AdoGit { get; set; } + /// Indicates the type of sync that is configured for the catalog. + public CatalogSyncType? SyncType { get; set; } + /// Resource tags. + public IDictionary Tags { get; } /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } /// The synchronization state of the catalog. public DevCenterCatalogSyncState? SyncState { get; } + /// Stats of the latest synchronization. + public CatalogSyncStats LastSyncStats { get; } + /// The connection state of the catalog. + public CatalogConnectionState? ConnectionState { get; } + /// When the catalog was last connected. + public DateTimeOffset? LastConnectionOn { get; } /// When the catalog was last synced. public DateTimeOffset? LastSyncOn { get; } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionCollection.cs new file mode 100644 index 000000000000..078b7e549055 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterCatalogEnvironmentDefinitions method from an instance of . + /// + public partial class DevCenterCatalogEnvironmentDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics; + private readonly EnvironmentDefinitionsRestOperations _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogEnvironmentDefinitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterCatalogEnvironmentDefinitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterCatalogEnvironmentDefinitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterCatalogEnvironmentDefinitionResource.ResourceType, out string devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); + _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient = new EnvironmentDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterCatalogResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterCatalogResource.ResourceType), nameof(id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List environment definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions + /// + /// + /// Operation Id + /// EnvironmentDefinitions_ListByCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogEnvironmentDefinitionResource(Client, DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(e)), _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics, Pipeline, "DevCenterCatalogEnvironmentDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List environment definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions + /// + /// + /// Operation Id + /// EnvironmentDefinitions_ListByCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogEnvironmentDefinitionResource(Client, DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(e)), _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics, Pipeline, "DevCenterCatalogEnvironmentDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.Serialization.cs new file mode 100644 index 000000000000..e96d60ba2c32 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterCatalogEnvironmentDefinitionResource : IJsonModel + { + private static DevCenterEnvironmentDefinitionData s_dataDeserializationInstance; + private static DevCenterEnvironmentDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterEnvironmentDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterEnvironmentDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.cs new file mode 100644 index 000000000000..06ab4355beca --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogEnvironmentDefinitionResource.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterCatalogEnvironmentDefinition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterCatalogEnvironmentDefinitionResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterCatalogEnvironmentDefinition method. + /// + public partial class DevCenterCatalogEnvironmentDefinitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The catalogName. + /// The environmentDefinitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics; + private readonly EnvironmentDefinitionsRestOperations _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient; + private readonly DevCenterEnvironmentDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/catalogs/environmentDefinitions"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogEnvironmentDefinitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterCatalogEnvironmentDefinitionResource(ArmClient client, DevCenterEnvironmentDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterCatalogEnvironmentDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); + _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient = new EnvironmentDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterEnvironmentDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionResource.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionResource.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Environment Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = await _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Environment Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterCatalogEnvironmentDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = _devCenterCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildCollection.cs new file mode 100644 index 000000000000..922ee6057344 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterCatalogImageDefinitionBuilds method from an instance of . + /// + public partial class DevCenterCatalogImageDefinitionBuildCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterCatalogImageDefinitionBuildClientDiagnostics; + private readonly DevCenterCatalogImageDefinitionBuildRestOperations _devCenterCatalogImageDefinitionBuildRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogImageDefinitionBuildCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterCatalogImageDefinitionBuildCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogImageDefinitionBuildClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterCatalogImageDefinitionBuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterCatalogImageDefinitionBuildResource.ResourceType, out string devCenterCatalogImageDefinitionBuildApiVersion); + _devCenterCatalogImageDefinitionBuildRestClient = new DevCenterCatalogImageDefinitionBuildRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogImageDefinitionBuildApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterCatalogImageDefinitionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterCatalogImageDefinitionResource.ResourceType), nameof(id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists builds for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_ListByImageDefinition + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogImageDefinitionBuildResource(Client, DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(e)), _devCenterCatalogImageDefinitionBuildClientDiagnostics, Pipeline, "DevCenterCatalogImageDefinitionBuildCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists builds for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_ListByImageDefinition + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogImageDefinitionBuildResource(Client, DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(e)), _devCenterCatalogImageDefinitionBuildClientDiagnostics, Pipeline, "DevCenterCatalogImageDefinitionBuildCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.Serialization.cs new file mode 100644 index 000000000000..6df9daf7f1a0 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterCatalogImageDefinitionBuildResource : IJsonModel + { + private static DevCenterImageDefinitionBuildData s_dataDeserializationInstance; + private static DevCenterImageDefinitionBuildData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterImageDefinitionBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterImageDefinitionBuildData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.cs new file mode 100644 index 000000000000..b0e6b511d664 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionBuildResource.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterCatalogImageDefinitionBuild along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterCatalogImageDefinitionBuildResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterCatalogImageDefinitionBuild method. + /// + public partial class DevCenterCatalogImageDefinitionBuildResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The catalogName. + /// The imageDefinitionName. + /// The buildName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterCatalogImageDefinitionBuildClientDiagnostics; + private readonly DevCenterCatalogImageDefinitionBuildRestOperations _devCenterCatalogImageDefinitionBuildRestClient; + private readonly DevCenterImageDefinitionBuildData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/catalogs/imageDefinitions/builds"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogImageDefinitionBuildResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterCatalogImageDefinitionBuildResource(ArmClient client, DevCenterImageDefinitionBuildData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterCatalogImageDefinitionBuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogImageDefinitionBuildClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterCatalogImageDefinitionBuildApiVersion); + _devCenterCatalogImageDefinitionBuildRestClient = new DevCenterCatalogImageDefinitionBuildRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogImageDefinitionBuildApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterImageDefinitionBuildData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels the specified build for an image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Cancel + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.Cancel"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterCatalogImageDefinitionBuildClientDiagnostics, Pipeline, _devCenterCatalogImageDefinitionBuildRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels the specified build for an image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Cancel + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.Cancel"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterCatalogImageDefinitionBuildClientDiagnostics, Pipeline, _devCenterCatalogImageDefinitionBuildRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Build details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_GetBuildDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBuildDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.GetBuildDetails"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionBuildRestClient.GetBuildDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Build details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_GetBuildDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBuildDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionBuildResource.GetBuildDetails"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionBuildRestClient.GetBuildDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionCollection.cs new file mode 100644 index 000000000000..23286ddc1934 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterCatalogImageDefinitions method from an instance of . + /// + public partial class DevCenterCatalogImageDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterCatalogImageDefinitionClientDiagnostics; + private readonly DevCenterCatalogImageDefinitionsRestOperations _devCenterCatalogImageDefinitionRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogImageDefinitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterCatalogImageDefinitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogImageDefinitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterCatalogImageDefinitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterCatalogImageDefinitionResource.ResourceType, out string devCenterCatalogImageDefinitionApiVersion); + _devCenterCatalogImageDefinitionRestClient = new DevCenterCatalogImageDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogImageDefinitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterCatalogResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterCatalogResource.ResourceType), nameof(id)); + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Image Definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_ListByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogImageDefinitionRestClient.CreateListByDevCenterCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogImageDefinitionRestClient.CreateListByDevCenterCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogImageDefinitionResource(Client, DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(e)), _devCenterCatalogImageDefinitionClientDiagnostics, Pipeline, "DevCenterCatalogImageDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Image Definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_ListByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterCatalogImageDefinitionRestClient.CreateListByDevCenterCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterCatalogImageDefinitionRestClient.CreateListByDevCenterCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterCatalogImageDefinitionResource(Client, DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(e)), _devCenterCatalogImageDefinitionClientDiagnostics, Pipeline, "DevCenterCatalogImageDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.Serialization.cs new file mode 100644 index 000000000000..2b4de113f60c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterCatalogImageDefinitionResource : IJsonModel + { + private static DevCenterImageDefinitionData s_dataDeserializationInstance; + private static DevCenterImageDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterImageDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterImageDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.cs new file mode 100644 index 000000000000..bb4009cb86f6 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogImageDefinitionResource.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterCatalogImageDefinition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterCatalogImageDefinitionResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterCatalogImageDefinition method. + /// + public partial class DevCenterCatalogImageDefinitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The catalogName. + /// The imageDefinitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterCatalogImageDefinitionClientDiagnostics; + private readonly DevCenterCatalogImageDefinitionsRestOperations _devCenterCatalogImageDefinitionRestClient; + private readonly DevCenterImageDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/catalogs/imageDefinitions"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterCatalogImageDefinitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterCatalogImageDefinitionResource(ArmClient client, DevCenterImageDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterCatalogImageDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterCatalogImageDefinitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterCatalogImageDefinitionApiVersion); + _devCenterCatalogImageDefinitionRestClient = new DevCenterCatalogImageDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterCatalogImageDefinitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterImageDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DevCenterCatalogImageDefinitionBuildResources in the DevCenterCatalogImageDefinition. + /// An object representing collection of DevCenterCatalogImageDefinitionBuildResources and their operations over a DevCenterCatalogImageDefinitionBuildResource. + public virtual DevCenterCatalogImageDefinitionBuildCollection GetDevCenterCatalogImageDefinitionBuilds() + { + return GetCachedClient(client => new DevCenterCatalogImageDefinitionBuildCollection(client, Id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterCatalogImageDefinitionBuildAsync(string buildName, CancellationToken cancellationToken = default) + { + return await GetDevCenterCatalogImageDefinitionBuilds().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterCatalogImageDefinitionBuild(string buildName, CancellationToken cancellationToken = default) + { + return GetDevCenterCatalogImageDefinitionBuilds().Get(buildName, cancellationToken); + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.Get"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.Get"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.GetByDevCenterCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Builds an image for the specified Image Definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_BuildImage + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task BuildImageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.BuildImage"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.BuildImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterCatalogImageDefinitionClientDiagnostics, Pipeline, _devCenterCatalogImageDefinitionRestClient.CreateBuildImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Builds an image for the specified Image Definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_BuildImage + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation BuildImage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.BuildImage"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.BuildImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterCatalogImageDefinitionClientDiagnostics, Pipeline, _devCenterCatalogImageDefinitionRestClient.CreateBuildImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Image Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = await _devCenterCatalogImageDefinitionRestClient.GetErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Image Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogImageDefinitionClientDiagnostics.CreateScope("DevCenterCatalogImageDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = _devCenterCatalogImageDefinitionRestClient.GetErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.cs index d5fa116e11ff..1797f7adbaf8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -89,8 +90,215 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of DevCenterCatalogEnvironmentDefinitionResources in the DevCenterCatalog. + /// An object representing collection of DevCenterCatalogEnvironmentDefinitionResources and their operations over a DevCenterCatalogEnvironmentDefinitionResource. + public virtual DevCenterCatalogEnvironmentDefinitionCollection GetDevCenterCatalogEnvironmentDefinitions() + { + return GetCachedClient(client => new DevCenterCatalogEnvironmentDefinitionCollection(client, Id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + return await GetDevCenterCatalogEnvironmentDefinitions().GetAsync(environmentDefinitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterCatalogEnvironmentDefinition(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + return GetDevCenterCatalogEnvironmentDefinitions().Get(environmentDefinitionName, cancellationToken); + } + + /// Gets a collection of DevCenterCatalogImageDefinitionResources in the DevCenterCatalog. + /// An object representing collection of DevCenterCatalogImageDefinitionResources and their operations over a DevCenterCatalogImageDefinitionResource. + public virtual DevCenterCatalogImageDefinitionCollection GetDevCenterCatalogImageDefinitions() + { + return GetCachedClient(client => new DevCenterCatalogImageDefinitionCollection(client, Id)); + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterCatalogImageDefinitionAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + return await GetDevCenterCatalogImageDefinitions().GetAsync(imageDefinitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an Image Definition from the catalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// DevCenterCatalogImageDefinitions_GetByDevCenterCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterCatalogImageDefinition(string imageDefinitionName, CancellationToken cancellationToken = default) + { + return GetDevCenterCatalogImageDefinitions().Get(imageDefinitionName, cancellationToken); + } + + /// Gets a collection of CustomizationTaskResources in the DevCenterCatalog. + /// An object representing collection of CustomizationTaskResources and their operations over a CustomizationTaskResource. + public virtual CustomizationTaskCollection GetCustomizationTasks() + { + return GetCachedClient(client => new CustomizationTaskCollection(client, Id)); + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetCustomizationTaskAsync(string taskName, CancellationToken cancellationToken = default) + { + return await GetCustomizationTasks().GetAsync(taskName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Task from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName} + /// + /// + /// Operation Id + /// CustomizationTasks_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Customization Task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCustomizationTask(string taskName, CancellationToken cancellationToken = default) + { + return GetCustomizationTasks().Get(taskName, cancellationToken); + } + /// - /// Gets a catalog + /// Gets a catalog. /// /// /// Request Path @@ -102,7 +310,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -130,7 +338,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Gets a catalog + /// Gets a catalog. /// /// /// Request Path @@ -142,7 +350,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -182,7 +390,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -199,7 +407,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterCatalogCatalogsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -224,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -241,7 +449,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterCatalogCatalogsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -266,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -287,7 +495,7 @@ public virtual async Task> UpdateAsync(Wa try { var response = await _devCenterCatalogCatalogsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterCatalogOperationSource(Client), _devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterCatalogOperationSource(Client), _devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +520,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -333,7 +541,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil try { var response = _devCenterCatalogCatalogsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterCatalogOperationSource(Client), _devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterCatalogOperationSource(Client), _devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -345,6 +553,166 @@ public virtual ArmOperation Update(WaitUntil waitUntil } } + /// + /// Connects a catalog to enable syncing. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect + /// + /// + /// Operation Id + /// Catalogs_Connect + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ConnectAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.Connect"); + scope.Start(); + try + { + var response = await _devCenterCatalogCatalogsRestClient.ConnectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateConnectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Connects a catalog to enable syncing. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect + /// + /// + /// Operation Id + /// Catalogs_Connect + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Connect(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.Connect"); + scope.Start(); + try + { + var response = _devCenterCatalogCatalogsRestClient.Connect(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateConnectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets catalog synchronization error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails + /// + /// + /// Operation Id + /// Catalogs_GetSyncErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSyncErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.GetSyncErrorDetails"); + scope.Start(); + try + { + var response = await _devCenterCatalogCatalogsRestClient.GetSyncErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets catalog synchronization error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails + /// + /// + /// Operation Id + /// Catalogs_GetSyncErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSyncErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.GetSyncErrorDetails"); + scope.Start(); + try + { + var response = _devCenterCatalogCatalogsRestClient.GetSyncErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Syncs templates for a template source. /// @@ -358,7 +726,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -375,7 +743,7 @@ public virtual async Task SyncAsync(WaitUntil waitUntil, Cancellat try { var response = await _devCenterCatalogCatalogsRestClient.SyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -400,7 +768,7 @@ public virtual async Task SyncAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -417,7 +785,7 @@ public virtual ArmOperation Sync(WaitUntil waitUntil, CancellationToken cancella try { var response = _devCenterCatalogCatalogsRestClient.Sync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterCatalogCatalogsClientDiagnostics, Pipeline, _devCenterCatalogCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -428,5 +796,363 @@ public virtual ArmOperation Sync(WaitUntil waitUntil, CancellationToken cancella throw; } } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterCatalogCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterCatalogCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterCatalogCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterCatalogCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterCatalogCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// Catalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterCatalogCatalogsClientDiagnostics.CreateScope("DevCenterCatalogResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterCatalogCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCollection.cs index 617b753ceec4..0db46e9e62d1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates or updates a devcenter resource + /// Creates or updates a devcenter resource. /// /// /// Request Path @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -102,7 +102,7 @@ public virtual async Task> CreateOrUpdateAsync(W } /// - /// Creates or updates a devcenter resource + /// Creates or updates a devcenter resource. /// /// /// Request Path @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string devCenter /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string devCenterName, Cancellatio /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, Can /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(int? top = null, CancellationT /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string devCenterName, Canc /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string devCenterName, CancellationToken can /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.Serialization.cs index dbe32c3eb17a..1b1773db089b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.Serialization.cs @@ -45,6 +45,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(ProjectCatalogSettings)) + { + writer.WritePropertyName("projectCatalogSettings"u8); + writer.WriteObjectValue(ProjectCatalogSettings, options); + } + if (Optional.IsDefined(NetworkSettings)) + { + writer.WritePropertyName("networkSettings"u8); + writer.WriteObjectValue(NetworkSettings, options); + } + if (Optional.IsDefined(DevBoxProvisioningSettings)) + { + writer.WritePropertyName("devBoxProvisioningSettings"u8); + writer.WriteObjectValue(DevBoxProvisioningSettings, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -85,6 +110,11 @@ internal static DevCenterData DeserializeDevCenterData(JsonElement element, Mode string name = default; ResourceType type = default; SystemData systemData = default; + Encryption encryption = default; + string displayName = default; + DevCenterProjectCatalogSettings projectCatalogSettings = default; + DevCenterNetworkSettings networkSettings = default; + DevBoxProvisioningSettings devBoxProvisioningSettings = default; DevCenterProvisioningState? provisioningState = default; Uri devCenterUri = default; IDictionary serializedAdditionalRawData = default; @@ -152,6 +182,47 @@ internal static DevCenterData DeserializeDevCenterData(JsonElement element, Mode } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("encryption"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = Encryption.DeserializeEncryption(property0.Value, options); + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("projectCatalogSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + projectCatalogSettings = DevCenterProjectCatalogSettings.DeserializeDevCenterProjectCatalogSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("networkSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkSettings = DevCenterNetworkSettings.DeserializeDevCenterNetworkSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("devBoxProvisioningSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxProvisioningSettings = DevBoxProvisioningSettings.DeserializeDevBoxProvisioningSettings(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -187,6 +258,11 @@ internal static DevCenterData DeserializeDevCenterData(JsonElement element, Mode tags ?? new ChangeTrackingDictionary(), location, identity, + encryption, + displayName, + projectCatalogSettings, + networkSettings, + devBoxProvisioningSettings, provisioningState, devCenterUri, serializedAdditionalRawData); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.cs index 276115ef93d3..8aedbca4fbd9 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterData.cs @@ -65,12 +65,22 @@ public DevCenterData(AzureLocation location) : base(location) /// The tags. /// The location. /// Managed identity properties. + /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). + /// The display name of the devcenter. + /// Dev Center settings to be used when associating a project with a catalog. + /// Network settings that will be enforced on network resources associated with the Dev Center. + /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// The provisioning state of the resource. /// The URI of the Dev Center. /// Keeps track of any properties unknown to the library. - internal DevCenterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, DevCenterProvisioningState? provisioningState, Uri devCenterUri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DevCenterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, Encryption encryption, string displayName, DevCenterProjectCatalogSettings projectCatalogSettings, DevCenterNetworkSettings networkSettings, DevBoxProvisioningSettings devBoxProvisioningSettings, DevCenterProvisioningState? provisioningState, Uri devCenterUri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; + Encryption = encryption; + DisplayName = displayName; + ProjectCatalogSettings = projectCatalogSettings; + NetworkSettings = networkSettings; + DevBoxProvisioningSettings = devBoxProvisioningSettings; ProvisioningState = provisioningState; DevCenterUri = devCenterUri; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -83,6 +93,64 @@ internal DevCenterData() /// Managed identity properties. public ManagedServiceIdentity Identity { get; set; } + /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). + internal Encryption Encryption { get; set; } + /// All Customer-managed key encryption properties for the resource. + public CustomerManagedKeyEncryption CustomerManagedKeyEncryption + { + get => Encryption is null ? default : Encryption.CustomerManagedKeyEncryption; + set + { + if (Encryption is null) + Encryption = new Encryption(); + Encryption.CustomerManagedKeyEncryption = value; + } + } + + /// The display name of the devcenter. + public string DisplayName { get; set; } + /// Dev Center settings to be used when associating a project with a catalog. + internal DevCenterProjectCatalogSettings ProjectCatalogSettings { get; set; } + /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + public CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus + { + get => ProjectCatalogSettings is null ? default : ProjectCatalogSettings.CatalogItemSyncEnableStatus; + set + { + if (ProjectCatalogSettings is null) + ProjectCatalogSettings = new DevCenterProjectCatalogSettings(); + ProjectCatalogSettings.CatalogItemSyncEnableStatus = value; + } + } + + /// Network settings that will be enforced on network resources associated with the Dev Center. + internal DevCenterNetworkSettings NetworkSettings { get; set; } + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + public MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus + { + get => NetworkSettings is null ? default : NetworkSettings.MicrosoftHostedNetworkEnableStatus; + set + { + if (NetworkSettings is null) + NetworkSettings = new DevCenterNetworkSettings(); + NetworkSettings.MicrosoftHostedNetworkEnableStatus = value; + } + } + + /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. + internal DevBoxProvisioningSettings DevBoxProvisioningSettings { get; set; } + /// Indicates whether to install the Azure Monitor Agent service on Dev Boxes that belong to this dev center. + public InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningInstallAzureMonitorAgentEnableStatus + { + get => DevBoxProvisioningSettings is null ? default : DevBoxProvisioningSettings.InstallAzureMonitorAgentEnableStatus; + set + { + if (DevBoxProvisioningSettings is null) + DevBoxProvisioningSettings = new DevBoxProvisioningSettings(); + DevBoxProvisioningSettings.InstallAzureMonitorAgentEnableStatus = value; + } + } + /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } /// The URI of the Dev Center. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetCollection.cs new file mode 100644 index 000000000000..e697d2aa1144 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetCollection.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterEncryptionSets method from an instance of . + /// + public partial class DevCenterEncryptionSetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterEncryptionSetEncryptionSetsClientDiagnostics; + private readonly EncryptionSetsRestOperations _devCenterEncryptionSetEncryptionSetsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterEncryptionSetCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterEncryptionSetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterEncryptionSetEncryptionSetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterEncryptionSetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterEncryptionSetResource.ResourceType, out string devCenterEncryptionSetEncryptionSetsApiVersion); + _devCenterEncryptionSetEncryptionSetsRestClient = new EncryptionSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterEncryptionSetEncryptionSetsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a devcenter encryption set resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string encryptionSetName, DevCenterEncryptionSetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, data, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterEncryptionSetOperationSource(Client), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a devcenter encryption set resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string encryptionSetName, DevCenterEncryptionSetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, data, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterEncryptionSetOperationSource(Client), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.Get"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all encryption sets in the devcenter. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets + /// + /// + /// Operation Id + /// EncryptionSets_List + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterEncryptionSetEncryptionSetsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterEncryptionSetEncryptionSetsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterEncryptionSetResource(Client, DevCenterEncryptionSetData.DeserializeDevCenterEncryptionSetData(e)), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, "DevCenterEncryptionSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all encryption sets in the devcenter. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets + /// + /// + /// Operation Id + /// EncryptionSets_List + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterEncryptionSetEncryptionSetsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterEncryptionSetEncryptionSetsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterEncryptionSetResource(Client, DevCenterEncryptionSetData.DeserializeDevCenterEncryptionSetData(e)), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, "DevCenterEncryptionSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, encryptionSetName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.Serialization.cs new file mode 100644 index 000000000000..8258102329c4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterEncryptionSetData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEncryptionSetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DevboxDisksEncryptionEnableStatus)) + { + writer.WritePropertyName("devboxDisksEncryptionEnableStatus"u8); + writer.WriteStringValue(DevboxDisksEncryptionEnableStatus.Value.ToString()); + } + if (Optional.IsDefined(KeyEncryptionKeyUri)) + { + writer.WritePropertyName("keyEncryptionKeyUrl"u8); + writer.WriteStringValue(KeyEncryptionKeyUri.AbsoluteUri); + } + if (Optional.IsDefined(KeyEncryptionKeyIdentity)) + { + writer.WritePropertyName("keyEncryptionKeyIdentity"u8); + writer.WriteObjectValue(KeyEncryptionKeyIdentity, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + DevCenterEncryptionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEncryptionSetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterEncryptionSetData(document.RootElement, options); + } + + internal static DevCenterEncryptionSetData DeserializeDevCenterEncryptionSetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus = default; + Uri keyEncryptionKeyUrl = default; + KeyEncryptionKeyIdentity keyEncryptionKeyIdentity = default; + DevCenterProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("devboxDisksEncryptionEnableStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devboxDisksEncryptionEnableStatus = new DevboxDisksEncryptionEnableStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyEncryptionKeyUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyEncryptionKeyIdentity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyIdentity = KeyEncryptionKeyIdentity.DeserializeKeyEncryptionKeyIdentity(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DevCenterProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterEncryptionSetData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + identity, + devboxDisksEncryptionEnableStatus, + keyEncryptionKeyUrl, + keyEncryptionKeyIdentity, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterEncryptionSetData)} does not support writing '{options.Format}' format."); + } + } + + DevCenterEncryptionSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterEncryptionSetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterEncryptionSetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.cs new file mode 100644 index 000000000000..fe1fedb0919d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetData.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the DevCenterEncryptionSet data model. + /// Represents a devcenter encryption set resource. + /// + public partial class DevCenterEncryptionSetData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public DevCenterEncryptionSetData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identity properties. + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + /// The managed identity configuration used for key vault access. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal DevCenterEncryptionSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus, Uri keyEncryptionKeyUri, KeyEncryptionKeyIdentity keyEncryptionKeyIdentity, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + DevboxDisksEncryptionEnableStatus = devboxDisksEncryptionEnableStatus; + KeyEncryptionKeyUri = keyEncryptionKeyUri; + KeyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DevCenterEncryptionSetData() + { + } + + /// Managed identity properties. + public ManagedServiceIdentity Identity { get; set; } + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + public DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get; set; } + /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + public Uri KeyEncryptionKeyUri { get; set; } + /// The managed identity configuration used for key vault access. + public KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get; set; } + /// The provisioning state of the resource. + public DevCenterProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.Serialization.cs new file mode 100644 index 000000000000..8d38260ce6cd --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterEncryptionSetResource : IJsonModel + { + private static DevCenterEncryptionSetData s_dataDeserializationInstance; + private static DevCenterEncryptionSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterEncryptionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterEncryptionSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.cs new file mode 100644 index 000000000000..c3b45f720142 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEncryptionSetResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterEncryptionSet along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterEncryptionSetResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterEncryptionSet method. + /// + public partial class DevCenterEncryptionSetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The encryptionSetName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterEncryptionSetEncryptionSetsClientDiagnostics; + private readonly EncryptionSetsRestOperations _devCenterEncryptionSetEncryptionSetsRestClient; + private readonly DevCenterEncryptionSetData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/encryptionSets"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterEncryptionSetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterEncryptionSetResource(ArmClient client, DevCenterEncryptionSetData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterEncryptionSetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterEncryptionSetEncryptionSetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterEncryptionSetEncryptionSetsApiVersion); + _devCenterEncryptionSetEncryptionSetsRestClient = new EncryptionSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterEncryptionSetEncryptionSetsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterEncryptionSetData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Get"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Get"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Delete"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Delete"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Update + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable devcenter encryption set properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DevCenterEncryptionSetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Update"); + scope.Start(); + try + { + var response = await _devCenterEncryptionSetEncryptionSetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterEncryptionSetOperationSource(Client), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Update + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable devcenter encryption set properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DevCenterEncryptionSetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.Update"); + scope.Start(); + try + { + var response = _devCenterEncryptionSetEncryptionSetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterEncryptionSetOperationSource(Client), _devCenterEncryptionSetEncryptionSetsClientDiagnostics, Pipeline, _devCenterEncryptionSetEncryptionSetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterEncryptionSetEncryptionSetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterEncryptionSetEncryptionSetsClientDiagnostics.CreateScope("DevCenterEncryptionSetResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterEncryptionSetEncryptionSetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterEncryptionSetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterEncryptionSetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.Serialization.cs new file mode 100644 index 000000000000..00325cde1b71 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterEnvironmentDefinitionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEnvironmentDefinitionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TemplatePath)) + { + writer.WritePropertyName("templatePath"u8); + writer.WriteStringValue(TemplatePath); + } + if (options.Format != "W" && Optional.IsDefined(ValidationStatus)) + { + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus.Value.ToString()); + } + writer.WriteEndObject(); + } + + DevCenterEnvironmentDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEnvironmentDefinitionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterEnvironmentDefinitionData(document.RootElement, options); + } + + internal static DevCenterEnvironmentDefinitionData DeserializeDevCenterEnvironmentDefinitionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string description = default; + IReadOnlyList parameters = default; + string templatePath = default; + CatalogResourceValidationStatus? validationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(EnvironmentDefinitionContent.DeserializeEnvironmentDefinitionContent(item, options)); + } + parameters = array; + continue; + } + if (property0.NameEquals("templatePath"u8)) + { + templatePath = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("validationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validationStatus = new CatalogResourceValidationStatus(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterEnvironmentDefinitionData( + id, + name, + type, + systemData, + description, + parameters ?? new ChangeTrackingList(), + templatePath, + validationStatus, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterEnvironmentDefinitionData)} does not support writing '{options.Format}' format."); + } + } + + DevCenterEnvironmentDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterEnvironmentDefinitionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterEnvironmentDefinitionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.cs new file mode 100644 index 000000000000..ef07ae31aaaf --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentDefinitionData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the DevCenterEnvironmentDefinition data model. + /// Represents an environment definition catalog item. + /// + public partial class DevCenterEnvironmentDefinitionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterEnvironmentDefinitionData() + { + Parameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A short description of the environment definition. + /// Input parameters passed to an environment. + /// Path to the Environment Definition entrypoint file. + /// Validation status for the environment definition. + /// Keeps track of any properties unknown to the library. + internal DevCenterEnvironmentDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IReadOnlyList parameters, string templatePath, CatalogResourceValidationStatus? validationStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Description = description; + Parameters = parameters; + TemplatePath = templatePath; + ValidationStatus = validationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A short description of the environment definition. + public string Description { get; } + /// Input parameters passed to an environment. + public IReadOnlyList Parameters { get; } + /// Path to the Environment Definition entrypoint file. + public string TemplatePath { get; } + /// Validation status for the environment definition. + public CatalogResourceValidationStatus? ValidationStatus { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeCollection.cs index 62e6f78ebc92..9f76da9d78e3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string environment /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = null /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string environmentTypeName /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string environmentTypeName, CancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.Serialization.cs index 4e74f7cfda44..e01ea729afda 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.Serialization.cs @@ -51,6 +51,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -84,6 +89,7 @@ internal static DevCenterEnvironmentTypeData DeserializeDevCenterEnvironmentType string name = default; ResourceType type = default; SystemData systemData = default; + string displayName = default; DevCenterProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -136,6 +142,11 @@ internal static DevCenterEnvironmentTypeData DeserializeDevCenterEnvironmentType } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -160,6 +171,7 @@ internal static DevCenterEnvironmentTypeData DeserializeDevCenterEnvironmentType type, systemData, tags ?? new ChangeTrackingDictionary(), + displayName, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.cs index 1f9f3566d8fa..c02bdb8f2734 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeData.cs @@ -63,17 +63,21 @@ public DevCenterEnvironmentTypeData() /// The resourceType. /// The systemData. /// Resource tags. + /// The display name of the environment type. /// The provisioning state of the resource. /// Keeps track of any properties unknown to the library. - internal DevCenterEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DevCenterEnvironmentTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, string displayName, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Tags = tags; + DisplayName = displayName; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } + /// The display name of the environment type. + public string DisplayName { get; set; } /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.cs index dbf3bf4146fe..29c6511d3fa9 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(DevCenterEnviro /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -536,7 +536,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -593,7 +593,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryCollection.cs index 2247ef137eff..f941f7841d1a 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w } /// - /// Gets a gallery + /// Gets a gallery. /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string ga } /// - /// Gets a gallery + /// Gets a gallery. /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ga /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string galleryName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(int? top = null, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string galleryName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string galleryName, CancellationToken cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.cs index 6eae7386f26e..05c19a708a2d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.cs @@ -108,7 +108,7 @@ public virtual DevCenterImageCollection GetDevCenterImages() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetDevCenterImageAsy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response GetDevCenterImage(string imageNa } /// - /// Gets a gallery + /// Gets a gallery. /// /// /// Request Path @@ -170,7 +170,7 @@ public virtual Response GetDevCenterImage(string imageNa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Gets a gallery + /// Gets a gallery. /// /// /// Request Path @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterGalleryGalleriesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterGalleryGalleriesClientDiagnostics, Pipeline, _devCenterGalleryGalleriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterGalleryGalleriesClientDiagnostics, Pipeline, _devCenterGalleryGalleriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -309,7 +309,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterGalleryGalleriesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterGalleryGalleriesClientDiagnostics, Pipeline, _devCenterGalleryGalleriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterGalleryGalleriesClientDiagnostics, Pipeline, _devCenterGalleryGalleriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageCollection.cs index 2ede127b4602..3db8cbcbfd2d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string imag /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string imageName, Cancellati /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(int? top = null, Cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string imageName, Cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string imageName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.Serialization.cs new file mode 100644 index 000000000000..9302052f7571 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterImageDefinitionBuildData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterImageDefinitionBuildData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ImageReference)) + { + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + writer.WriteObjectValue(ErrorDetails, options); + } + writer.WriteEndObject(); + } + + DevCenterImageDefinitionBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterImageDefinitionBuildData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterImageDefinitionBuildData(document.RootElement, options); + } + + internal static DevCenterImageDefinitionBuildData DeserializeDevCenterImageDefinitionBuildData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DevCenterImageReference imageReference = default; + ImageDefinitionBuildStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + ImageCreationErrorDetails errorDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("imageReference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property0.Value, options); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ImageDefinitionBuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("errorDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ImageCreationErrorDetails.DeserializeImageCreationErrorDetails(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterImageDefinitionBuildData( + id, + name, + type, + systemData, + imageReference, + status, + startTime, + endTime, + errorDetails, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterImageDefinitionBuildData)} does not support writing '{options.Format}' format."); + } + } + + DevCenterImageDefinitionBuildData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterImageDefinitionBuildData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterImageDefinitionBuildData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.cs new file mode 100644 index 000000000000..2f4fa0940b25 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionBuildData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the DevCenterImageDefinitionBuild data model. + /// Represents a specific build of an Image Definition. + /// + public partial class DevCenterImageDefinitionBuildData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterImageDefinitionBuildData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The specific image version used by the build. + /// The status of the build. + /// Start time of the task group. + /// End time of the task group. + /// Details for image creation error. Populated when the image creation is not successful. + /// Keeps track of any properties unknown to the library. + internal DevCenterImageDefinitionBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterImageReference imageReference, ImageDefinitionBuildStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ImageCreationErrorDetails errorDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ImageReference = imageReference; + Status = status; + StartOn = startOn; + EndOn = endOn; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The specific image version used by the build. + public DevCenterImageReference ImageReference { get; } + /// The status of the build. + public ImageDefinitionBuildStatus? Status { get; } + /// Start time of the task group. + public DateTimeOffset? StartOn { get; } + /// End time of the task group. + public DateTimeOffset? EndOn { get; } + /// Details for image creation error. Populated when the image creation is not successful. + public ImageCreationErrorDetails ErrorDetails { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.Serialization.cs new file mode 100644 index 000000000000..b91e7078ac80 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.Serialization.cs @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterImageDefinitionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterImageDefinitionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ImageReference)) + { + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + } + if (options.Format != "W" && Optional.IsDefined(FileUri)) + { + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(FileUri.AbsoluteUri); + } + if (Optional.IsDefined(LatestBuild)) + { + writer.WritePropertyName("latestBuild"u8); + writer.WriteObjectValue(LatestBuild, options); + } + if (options.Format != "W" && Optional.IsDefined(ImageValidationStatus)) + { + writer.WritePropertyName("imageValidationStatus"u8); + writer.WriteStringValue(ImageValidationStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ImageValidationErrorDetails)) + { + writer.WritePropertyName("imageValidationErrorDetails"u8); + writer.WriteObjectValue(ImageValidationErrorDetails, options); + } + if (options.Format != "W" && Optional.IsDefined(ValidationStatus)) + { + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ActiveImageReference)) + { + writer.WritePropertyName("activeImageReference"u8); + writer.WriteObjectValue(ActiveImageReference, options); + } + if (options.Format != "W" && Optional.IsDefined(AutoImageBuild)) + { + writer.WritePropertyName("autoImageBuild"u8); + writer.WriteStringValue(AutoImageBuild.Value.ToString()); + } + if (Optional.IsCollectionDefined(Tasks)) + { + writer.WritePropertyName("tasks"u8); + writer.WriteStartArray(); + foreach (var item in Tasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(UserTasks)) + { + writer.WritePropertyName("userTasks"u8); + writer.WriteStartArray(); + foreach (var item in UserTasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Extends)) + { + writer.WritePropertyName("extends"u8); + writer.WriteObjectValue(Extends, options); + } + writer.WriteEndObject(); + } + + DevCenterImageDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterImageDefinitionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterImageDefinitionData(document.RootElement, options); + } + + internal static DevCenterImageDefinitionData DeserializeDevCenterImageDefinitionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DevCenterImageReference imageReference = default; + Uri fileUrl = default; + LatestImageBuild latestBuild = default; + ImageValidationStatus? imageValidationStatus = default; + ImageValidationErrorDetails imageValidationErrorDetails = default; + CatalogResourceValidationStatus? validationStatus = default; + DevCenterImageReference activeImageReference = default; + AutoImageBuildStatus? autoImageBuild = default; + IList tasks = default; + IList userTasks = default; + ImageDefinitionReference extends = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("imageReference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property0.Value, options); + continue; + } + if (property0.NameEquals("fileUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("latestBuild"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + latestBuild = LatestImageBuild.DeserializeLatestImageBuild(property0.Value, options); + continue; + } + if (property0.NameEquals("imageValidationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageValidationStatus = new ImageValidationStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("imageValidationErrorDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageValidationErrorDetails = ImageValidationErrorDetails.DeserializeImageValidationErrorDetails(property0.Value, options); + continue; + } + if (property0.NameEquals("validationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validationStatus = new CatalogResourceValidationStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("activeImageReference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeImageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property0.Value, options); + continue; + } + if (property0.NameEquals("autoImageBuild"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoImageBuild = new AutoImageBuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("tasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(CustomizationTaskInstance.DeserializeCustomizationTaskInstance(item, options)); + } + tasks = array; + continue; + } + if (property0.NameEquals("userTasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(CustomizationTaskInstance.DeserializeCustomizationTaskInstance(item, options)); + } + userTasks = array; + continue; + } + if (property0.NameEquals("extends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extends = ImageDefinitionReference.DeserializeImageDefinitionReference(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterImageDefinitionData( + id, + name, + type, + systemData, + imageReference, + fileUrl, + latestBuild, + imageValidationStatus, + imageValidationErrorDetails, + validationStatus, + activeImageReference, + autoImageBuild, + tasks ?? new ChangeTrackingList(), + userTasks ?? new ChangeTrackingList(), + extends, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterImageDefinitionData)} does not support writing '{options.Format}' format."); + } + } + + DevCenterImageDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterImageDefinitionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterImageDefinitionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.cs new file mode 100644 index 000000000000..b7ca7f2ed6c8 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageDefinitionData.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the DevCenterImageDefinition data model. + /// Represents a definition for an Image. + /// + public partial class DevCenterImageDefinitionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterImageDefinitionData() + { + Tasks = new ChangeTrackingList(); + UserTasks = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Image reference information. + /// The URL to the repository file containing the image definition. + /// Details about the latest build. + /// Validation status of the configured image. + /// Details for image validator error. Populated when the image validation is not successful. + /// Validation status for the Image Definition. + /// Image reference information for the currently active image (only populated during updates). + /// Indicates if automatic image builds will be triggered for image definition updates. + /// Tasks to run at Dev Box provisioning time. + /// Tasks to run when a user first logs into a Dev Box. + /// Another Image Definition that this one extends. + /// Keeps track of any properties unknown to the library. + internal DevCenterImageDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterImageReference imageReference, Uri fileUri, LatestImageBuild latestBuild, ImageValidationStatus? imageValidationStatus, ImageValidationErrorDetails imageValidationErrorDetails, CatalogResourceValidationStatus? validationStatus, DevCenterImageReference activeImageReference, AutoImageBuildStatus? autoImageBuild, IList tasks, IList userTasks, ImageDefinitionReference extends, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ImageReference = imageReference; + FileUri = fileUri; + LatestBuild = latestBuild; + ImageValidationStatus = imageValidationStatus; + ImageValidationErrorDetails = imageValidationErrorDetails; + ValidationStatus = validationStatus; + ActiveImageReference = activeImageReference; + AutoImageBuild = autoImageBuild; + Tasks = tasks; + UserTasks = userTasks; + Extends = extends; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Image reference information. + public DevCenterImageReference ImageReference { get; set; } + /// The URL to the repository file containing the image definition. + public Uri FileUri { get; } + /// Details about the latest build. + public LatestImageBuild LatestBuild { get; set; } + /// Validation status of the configured image. + public ImageValidationStatus? ImageValidationStatus { get; } + /// Details for image validator error. Populated when the image validation is not successful. + public ImageValidationErrorDetails ImageValidationErrorDetails { get; } + /// Validation status for the Image Definition. + public CatalogResourceValidationStatus? ValidationStatus { get; } + /// Image reference information for the currently active image (only populated during updates). + public DevCenterImageReference ActiveImageReference { get; } + /// Indicates if automatic image builds will be triggered for image definition updates. + public AutoImageBuildStatus? AutoImageBuild { get; } + /// Tasks to run at Dev Box provisioning time. + public IList Tasks { get; } + /// Tasks to run when a user first logs into a Dev Box. + public IList UserTasks { get; } + /// Another Image Definition that this one extends. + public ImageDefinitionReference Extends { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.cs index 28008f4cdd11..eb63b85c38e8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.cs @@ -109,7 +109,7 @@ public virtual ImageVersionCollection GetImageVersions() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetImageVersionAsync(s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetImageVersion(string versionName /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionCollection.cs index 315e1d7d8611..79222624aab0 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates or updates a Network Connections resource + /// Creates or updates a Network Connections resource. /// /// /// Request Path @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -102,7 +102,7 @@ public virtual async Task> Crea } /// - /// Creates or updates a Network Connections resource + /// Creates or updates a Network Connections resource. /// /// /// Request Path @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -151,7 +151,7 @@ public virtual ArmOperation CreateOrUpdate(W } /// - /// Gets a network connection resource + /// Gets a network connection resource. /// /// /// Request Path @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public virtual async Task> GetAsync } /// - /// Gets a network connection resource + /// Gets a network connection resource. /// /// /// Request Path @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(string networkCo } /// - /// Lists network connections in a resource group + /// Lists network connections in a resource group. /// /// /// Request Path @@ -253,7 +253,7 @@ public virtual Response Get(string networkCo /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual AsyncPageable GetAllAsync(int } /// - /// Lists network connections in a resource group + /// Lists network connections in a resource group. /// /// /// Request Path @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string networkConnectionNa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string networkConnectionName, CancellationT /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionData.cs index 64ebb66ffda5..d1d706f50ab1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.DevCenter { /// /// A class representing the DevCenterNetworkConnection data model. - /// Network related settings + /// Network related settings. /// public partial class DevCenterNetworkConnectionData : TrackedResourceData { diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.cs index 85f50d84f264..e2f15f7160b8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.cs @@ -99,7 +99,7 @@ public virtual HealthCheckStatusDetailResource GetHealthCheckStatusDetail() } /// - /// Gets a network connection resource + /// Gets a network connection resource. /// /// /// Request Path @@ -111,7 +111,7 @@ public virtual HealthCheckStatusDetailResource GetHealthCheckStatusDetail() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync } /// - /// Gets a network connection resource + /// Gets a network connection resource. /// /// /// Request Path @@ -151,7 +151,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual Response Get(CancellationToke } /// - /// Deletes a Network Connections resource + /// Deletes a Network Connections resource. /// /// /// Request Path @@ -191,7 +191,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterNetworkConnectionNetworkConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -221,7 +221,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes a Network Connections resource + /// Deletes a Network Connections resource. /// /// /// Request Path @@ -233,7 +233,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterNetworkConnectionNetworkConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -263,7 +263,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Partially updates a Network Connection + /// Partially updates a Network Connection. /// /// /// Request Path @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> Upda try { var response = await _devCenterNetworkConnectionNetworkConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterNetworkConnectionOperationSource(Client), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterNetworkConnectionOperationSource(Client), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -309,7 +309,7 @@ public virtual async Task> Upda } /// - /// Partially updates a Network Connection + /// Partially updates a Network Connection. /// /// /// Request Path @@ -321,7 +321,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -342,7 +342,7 @@ public virtual ArmOperation Update(WaitUntil try { var response = _devCenterNetworkConnectionNetworkConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterNetworkConnectionOperationSource(Client), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterNetworkConnectionOperationSource(Client), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -355,19 +355,19 @@ public virtual ArmOperation Update(WaitUntil } /// - /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details + /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// NetworkConnections_RunHealthChecks + /// NetworkConnections_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -375,41 +375,30 @@ public virtual ArmOperation Update(WaitUntil /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - public virtual async Task RunHealthChecksAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOutboundEnvironmentEndpointsAsync(int? top = null, CancellationToken cancellationToken = default) { - using var scope = _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics.CreateScope("DevCenterNetworkConnectionResource.RunHealthChecks"); - scope.Start(); - try - { - var response = await _devCenterNetworkConnectionNetworkConnectionsRestClient.RunHealthChecksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint(e), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "DevCenterNetworkConnectionResource.GetOutboundEnvironmentEndpoints", "value", "nextLink", cancellationToken); } /// - /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details + /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// NetworkConnections_RunHealthChecks + /// NetworkConnections_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -417,41 +406,30 @@ public virtual async Task RunHealthChecksAsync(WaitUntil waitUntil /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - public virtual ArmOperation RunHealthChecks(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOutboundEnvironmentEndpoints(int? top = null, CancellationToken cancellationToken = default) { - using var scope = _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics.CreateScope("DevCenterNetworkConnectionResource.RunHealthChecks"); - scope.Start(); - try - { - var response = _devCenterNetworkConnectionNetworkConnectionsRestClient.RunHealthChecks(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint(e), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "DevCenterNetworkConnectionResource.GetOutboundEnvironmentEndpoints", "value", "nextLink", cancellationToken); } /// - /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. + /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks /// /// /// Operation Id - /// NetworkConnections_ListOutboundNetworkDependenciesEndpoints + /// NetworkConnections_RunHealthChecks /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -459,30 +437,41 @@ public virtual ArmOperation RunHealthChecks(WaitUntil waitUntil, CancellationTok /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOutboundEnvironmentEndpointsAsync(int? top = null, CancellationToken cancellationToken = default) + public virtual async Task RunHealthChecksAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint(e), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "DevCenterNetworkConnectionResource.GetOutboundEnvironmentEndpoints", "value", "nextLink", cancellationToken); + using var scope = _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics.CreateScope("DevCenterNetworkConnectionResource.RunHealthChecks"); + scope.Start(); + try + { + var response = await _devCenterNetworkConnectionNetworkConnectionsRestClient.RunHealthChecksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. + /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks /// /// /// Operation Id - /// NetworkConnections_ListOutboundNetworkDependenciesEndpoints + /// NetworkConnections_RunHealthChecks /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -490,14 +479,25 @@ public virtual AsyncPageable GetOutboundEnvironment /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundEnvironmentEndpoints(int? top = null, CancellationToken cancellationToken = default) + public virtual ArmOperation RunHealthChecks(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint(e), _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "DevCenterNetworkConnectionResource.GetOutboundEnvironmentEndpoints", "value", "nextLink", cancellationToken); + using var scope = _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics.CreateScope("DevCenterNetworkConnectionResource.RunHealthChecks"); + scope.Start(); + try + { + var response = _devCenterNetworkConnectionNetworkConnectionsRestClient.RunHealthChecks(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, _devCenterNetworkConnectionNetworkConnectionsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -513,7 +513,7 @@ public virtual Pageable GetOutboundEnvironmentEndpo /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -575,7 +575,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -637,7 +637,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -694,7 +694,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -751,7 +751,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -811,7 +811,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolCollection.cs index 25b77919fc17..d606074307af 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates or updates a machine pool + /// Creates or updates a machine pool. /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUpdateAsy } /// - /// Creates or updates a machine pool + /// Creates or updates a machine pool. /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string poolN } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string poolN /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response Get(string poolName, Cancellation } /// - /// Lists pools for a project + /// Lists pools for a project. /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string poolName, Cancellation /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, } /// - /// Lists pools for a project + /// Lists pools for a project. /// /// /// Request Path @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(int? top = null, Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.Serialization.cs index e4e8ded2b3dc..35e10c28ec8c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.Serialization.cs @@ -40,11 +40,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(DevBoxDefinitionType)) + { + writer.WritePropertyName("devBoxDefinitionType"u8); + writer.WriteStringValue(DevBoxDefinitionType.Value.ToString()); + } if (Optional.IsDefined(DevBoxDefinitionName)) { writer.WritePropertyName("devBoxDefinitionName"u8); writer.WriteStringValue(DevBoxDefinitionName); } + if (Optional.IsDefined(DevBoxDefinition)) + { + writer.WritePropertyName("devBoxDefinition"u8); + writer.WriteObjectValue(DevBoxDefinition, options); + } if (Optional.IsDefined(NetworkConnectionName)) { writer.WritePropertyName("networkConnectionName"u8); @@ -65,6 +75,46 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("stopOnDisconnect"u8); writer.WriteObjectValue(StopOnDisconnect, options); } + if (Optional.IsDefined(StopOnNoConnect)) + { + writer.WritePropertyName("stopOnNoConnect"u8); + writer.WriteObjectValue(StopOnNoConnect, options); + } + if (Optional.IsDefined(SingleSignOnStatus)) + { + writer.WritePropertyName("singleSignOnStatus"u8); + writer.WriteStringValue(SingleSignOnStatus.Value.ToString()); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(VirtualNetworkType)) + { + writer.WritePropertyName("virtualNetworkType"u8); + writer.WriteStringValue(VirtualNetworkType.Value.ToString()); + } + if (Optional.IsCollectionDefined(ManagedVirtualNetworkRegions)) + { + writer.WritePropertyName("managedVirtualNetworkRegions"u8); + writer.WriteStartArray(); + foreach (var item in ManagedVirtualNetworkRegions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ActiveHoursConfiguration)) + { + writer.WritePropertyName("activeHoursConfiguration"u8); + writer.WriteObjectValue(ActiveHoursConfiguration, options); + } + if (Optional.IsDefined(DevBoxTunnelEnableStatus)) + { + writer.WritePropertyName("devBoxTunnelEnableStatus"u8); + writer.WriteStringValue(DevBoxTunnelEnableStatus.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(HealthStatus)) { writer.WritePropertyName("healthStatus"u8); @@ -80,6 +130,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsDefined(DevBoxCount)) + { + writer.WritePropertyName("devBoxCount"u8); + writer.WriteNumberValue(DevBoxCount.Value); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -114,13 +169,23 @@ internal static DevCenterPoolData DeserializeDevCenterPoolData(JsonElement eleme string name = default; ResourceType type = default; SystemData systemData = default; + PoolDevBoxDefinitionType? devBoxDefinitionType = default; string devBoxDefinitionName = default; + PoolDevBox devBoxDefinition = default; string networkConnectionName = default; DevCenterLicenseType? licenseType = default; LocalAdminStatus? localAdministrator = default; StopOnDisconnectConfiguration stopOnDisconnect = default; + StopOnNoConnectConfiguration stopOnNoConnect = default; + PoolUpdateSingleSignOnStatus? singleSignOnStatus = default; + string displayName = default; + VirtualNetworkType? virtualNetworkType = default; + IList managedVirtualNetworkRegions = default; + ActiveHoursConfiguration activeHoursConfiguration = default; + DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus = default; DevCenterHealthStatus? healthStatus = default; IReadOnlyList healthStatusDetails = default; + int? devBoxCount = default; DevCenterProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -178,11 +243,29 @@ internal static DevCenterPoolData DeserializeDevCenterPoolData(JsonElement eleme } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("devBoxDefinitionType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxDefinitionType = new PoolDevBoxDefinitionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("devBoxDefinitionName"u8)) { devBoxDefinitionName = property0.Value.GetString(); continue; } + if (property0.NameEquals("devBoxDefinition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxDefinition = PoolDevBox.DeserializePoolDevBox(property0.Value, options); + continue; + } if (property0.NameEquals("networkConnectionName"u8)) { networkConnectionName = property0.Value.GetString(); @@ -215,6 +298,70 @@ internal static DevCenterPoolData DeserializeDevCenterPoolData(JsonElement eleme stopOnDisconnect = StopOnDisconnectConfiguration.DeserializeStopOnDisconnectConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("stopOnNoConnect"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stopOnNoConnect = StopOnNoConnectConfiguration.DeserializeStopOnNoConnectConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("singleSignOnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + singleSignOnStatus = new PoolUpdateSingleSignOnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("virtualNetworkType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkType = new VirtualNetworkType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("managedVirtualNetworkRegions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + managedVirtualNetworkRegions = array; + continue; + } + if (property0.NameEquals("activeHoursConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeHoursConfiguration = ActiveHoursConfiguration.DeserializeActiveHoursConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("devBoxTunnelEnableStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxTunnelEnableStatus = new DevBoxTunnelEnableStatus(property0.Value.GetString()); + continue; + } if (property0.NameEquals("healthStatus"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -238,6 +385,15 @@ internal static DevCenterPoolData DeserializeDevCenterPoolData(JsonElement eleme healthStatusDetails = array; continue; } + if (property0.NameEquals("devBoxCount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxCount = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -263,13 +419,23 @@ internal static DevCenterPoolData DeserializeDevCenterPoolData(JsonElement eleme systemData, tags ?? new ChangeTrackingDictionary(), location, + devBoxDefinitionType, devBoxDefinitionName, + devBoxDefinition, networkConnectionName, licenseType, localAdministrator, stopOnDisconnect, + stopOnNoConnect, + singleSignOnStatus, + displayName, + virtualNetworkType, + managedVirtualNetworkRegions ?? new ChangeTrackingList(), + activeHoursConfiguration, + devBoxTunnelEnableStatus, healthStatus, healthStatusDetails ?? new ChangeTrackingList(), + devBoxCount, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.cs index 54a94a179f45..b7371d8acc7d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolData.cs @@ -55,6 +55,7 @@ public partial class DevCenterPoolData : TrackedResourceData /// The location. public DevCenterPoolData(AzureLocation location) : base(location) { + ManagedVirtualNetworkRegions = new ChangeTrackingList(); HealthStatusDetails = new ChangeTrackingList(); } @@ -65,24 +66,44 @@ public DevCenterPoolData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Name of a Dev Box definition in parent Project of this Pool. + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or not provided. /// Name of a Network Connection in parent Project of this Pool. /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant. + /// The display name of the pool. + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// Active hours configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Box Tunnel is enabled for a the pool. /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state. + /// Indicates the number of provisioned Dev Boxes in this pool. /// The provisioning state of the resource. /// Keeps track of any properties unknown to the library. - internal DevCenterPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string devBoxDefinitionName, string networkConnectionName, DevCenterLicenseType? licenseType, LocalAdminStatus? localAdministrator, StopOnDisconnectConfiguration stopOnDisconnect, DevCenterHealthStatus? healthStatus, IReadOnlyList healthStatusDetails, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DevCenterPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PoolDevBoxDefinitionType? devBoxDefinitionType, string devBoxDefinitionName, PoolDevBox devBoxDefinition, string networkConnectionName, DevCenterLicenseType? licenseType, LocalAdminStatus? localAdministrator, StopOnDisconnectConfiguration stopOnDisconnect, StopOnNoConnectConfiguration stopOnNoConnect, PoolUpdateSingleSignOnStatus? singleSignOnStatus, string displayName, VirtualNetworkType? virtualNetworkType, IList managedVirtualNetworkRegions, ActiveHoursConfiguration activeHoursConfiguration, DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus, DevCenterHealthStatus? healthStatus, IReadOnlyList healthStatusDetails, int? devBoxCount, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + DevBoxDefinitionType = devBoxDefinitionType; DevBoxDefinitionName = devBoxDefinitionName; + DevBoxDefinition = devBoxDefinition; NetworkConnectionName = networkConnectionName; LicenseType = licenseType; LocalAdministrator = localAdministrator; StopOnDisconnect = stopOnDisconnect; + StopOnNoConnect = stopOnNoConnect; + SingleSignOnStatus = singleSignOnStatus; + DisplayName = displayName; + VirtualNetworkType = virtualNetworkType; + ManagedVirtualNetworkRegions = managedVirtualNetworkRegions; + ActiveHoursConfiguration = activeHoursConfiguration; + DevBoxTunnelEnableStatus = devBoxTunnelEnableStatus; HealthStatus = healthStatus; HealthStatusDetails = healthStatusDetails; + DevBoxCount = devBoxCount; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,8 +113,12 @@ internal DevCenterPoolData() { } - /// Name of a Dev Box definition in parent Project of this Pool. + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + public PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. public string DevBoxDefinitionName { get; set; } + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or not provided. + public PoolDevBox DevBoxDefinition { get; set; } /// Name of a Network Connection in parent Project of this Pool. public string NetworkConnectionName { get; set; } /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. @@ -102,10 +127,26 @@ internal DevCenterPoolData() public LocalAdminStatus? LocalAdministrator { get; set; } /// Stop on disconnect configuration settings for Dev Boxes created in this pool. public StopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public StopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant. + public PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get; set; } + /// The display name of the pool. + public string DisplayName { get; set; } + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + public VirtualNetworkType? VirtualNetworkType { get; set; } + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + public IList ManagedVirtualNetworkRegions { get; } + /// Active hours configuration settings for Dev Boxes created in this pool. + public ActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + public DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. public DevCenterHealthStatus? HealthStatus { get; } /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state. public IReadOnlyList HealthStatusDetails { get; } + /// Indicates the number of provisioned Dev Boxes in this pool. + public int? DevBoxCount { get; } /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.cs index 553db43ecd9a..b53a9f78503b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.cs @@ -110,7 +110,7 @@ public virtual DevCenterScheduleCollection GetDevCenterSchedules() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -119,14 +119,13 @@ public virtual DevCenterScheduleCollection GetDevCenterSchedules() /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterScheduleAsync(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterScheduleAsync(string scheduleName, CancellationToken cancellationToken = default) { - return await GetDevCenterSchedules().GetAsync(scheduleName, top, cancellationToken).ConfigureAwait(false); + return await GetDevCenterSchedules().GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); } /// @@ -142,7 +141,7 @@ public virtual async Task> GetDevCenterSched /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -151,18 +150,17 @@ public virtual async Task> GetDevCenterSched /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterSchedule(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterSchedule(string scheduleName, CancellationToken cancellationToken = default) { - return GetDevCenterSchedules().Get(scheduleName, top, cancellationToken); + return GetDevCenterSchedules().Get(scheduleName, cancellationToken); } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -174,7 +172,7 @@ public virtual Response GetDevCenterSchedule(string s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -202,7 +200,7 @@ public virtual async Task> GetAsync(Cancellation } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -214,7 +212,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -242,7 +240,7 @@ public virtual Response Get(CancellationToken cancellatio } /// - /// Deletes a machine pool + /// Deletes a machine pool. /// /// /// Request Path @@ -254,7 +252,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -271,7 +269,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterPoolPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -284,7 +282,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes a machine pool + /// Deletes a machine pool. /// /// /// Request Path @@ -296,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -313,7 +311,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterPoolPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -326,7 +324,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Partially updates a machine pool + /// Partially updates a machine pool. /// /// /// Request Path @@ -338,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -359,7 +357,7 @@ public virtual async Task> UpdateAsync(WaitU try { var response = await _devCenterPoolPoolsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterPoolOperationSource(Client), _devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterPoolOperationSource(Client), _devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -372,7 +370,7 @@ public virtual async Task> UpdateAsync(WaitU } /// - /// Partially updates a machine pool + /// Partially updates a machine pool. /// /// /// Request Path @@ -384,7 +382,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -405,7 +403,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, D try { var response = _devCenterPoolPoolsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterPoolOperationSource(Client), _devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterPoolOperationSource(Client), _devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -430,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, D /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -447,7 +445,7 @@ public virtual async Task RunHealthChecksAsync(WaitUntil waitUntil try { var response = await _devCenterPoolPoolsRestClient.RunHealthChecksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -472,7 +470,7 @@ public virtual async Task RunHealthChecksAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -489,7 +487,7 @@ public virtual ArmOperation RunHealthChecks(WaitUntil waitUntil, CancellationTok try { var response = _devCenterPoolPoolsRestClient.RunHealthChecks(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterPoolPoolsClientDiagnostics, Pipeline, _devCenterPoolPoolsRestClient.CreateRunHealthChecksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -514,7 +512,7 @@ public virtual ArmOperation RunHealthChecks(WaitUntil waitUntil, CancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -576,7 +574,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -638,7 +636,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -695,7 +693,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -752,7 +750,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -812,7 +810,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogCollection.cs new file mode 100644 index 000000000000..cefa141b8352 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogCollection.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectCatalogs method from an instance of . + /// + public partial class DevCenterProjectCatalogCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectCatalogProjectCatalogsClientDiagnostics; + private readonly ProjectCatalogsRestOperations _devCenterProjectCatalogProjectCatalogsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectCatalogCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogProjectCatalogsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectCatalogResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectCatalogResource.ResourceType, out string devCenterProjectCatalogProjectCatalogsApiVersion); + _devCenterProjectCatalogProjectCatalogsRestClient = new ProjectCatalogsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogProjectCatalogsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Catalog. + /// Represents a catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string catalogName, DevCenterCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, data, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterProjectCatalogOperationSource(Client), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Catalog. + /// Represents a catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string catalogName, DevCenterCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, data, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterProjectCatalogOperationSource(Client), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an associated project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an associated project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the catalogs associated with a project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs + /// + /// + /// Operation Id + /// ProjectCatalogs_List + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogProjectCatalogsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogProjectCatalogsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogResource(Client, DevCenterCatalogData.DeserializeDevCenterCatalogData(e)), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, "DevCenterProjectCatalogCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the catalogs associated with a project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs + /// + /// + /// Operation Id + /// ProjectCatalogs_List + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogProjectCatalogsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogProjectCatalogsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogResource(Client, DevCenterCatalogData.DeserializeDevCenterCatalogData(e)), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, "DevCenterProjectCatalogCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, catalogName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionCollection.cs new file mode 100644 index 000000000000..9aef89dd3bb5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectCatalogEnvironmentDefinitions method from an instance of . + /// + public partial class DevCenterProjectCatalogEnvironmentDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics; + private readonly EnvironmentDefinitionsRestOperations _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogEnvironmentDefinitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectCatalogEnvironmentDefinitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectCatalogEnvironmentDefinitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectCatalogEnvironmentDefinitionResource.ResourceType, out string devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); + _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient = new EnvironmentDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectCatalogResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectCatalogResource.ResourceType), nameof(id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the environment definitions in this project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions + /// + /// + /// Operation Id + /// EnvironmentDefinitions_ListByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByProjectCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByProjectCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(e)), _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics, Pipeline, "DevCenterProjectCatalogEnvironmentDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the environment definitions in this project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions + /// + /// + /// Operation Id + /// EnvironmentDefinitions_ListByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByProjectCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.CreateListByProjectCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(e)), _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics, Pipeline, "DevCenterProjectCatalogEnvironmentDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, environmentDefinitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.Serialization.cs new file mode 100644 index 000000000000..b16ca4e0b765 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectCatalogEnvironmentDefinitionResource : IJsonModel + { + private static DevCenterEnvironmentDefinitionData s_dataDeserializationInstance; + private static DevCenterEnvironmentDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterEnvironmentDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterEnvironmentDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.cs new file mode 100644 index 000000000000..cd90d703f251 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogEnvironmentDefinitionResource.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectCatalogEnvironmentDefinition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectCatalogEnvironmentDefinitionResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectCatalogEnvironmentDefinition method. + /// + public partial class DevCenterProjectCatalogEnvironmentDefinitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The catalogName. + /// The environmentDefinitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics; + private readonly EnvironmentDefinitionsRestOperations _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient; + private readonly ClientDiagnostics _projectCatalogEnvironmentDefinitionsClientDiagnostics; + private readonly ProjectCatalogEnvironmentDefinitionsRestOperations _projectCatalogEnvironmentDefinitionsRestClient; + private readonly DevCenterEnvironmentDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/catalogs/environmentDefinitions"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogEnvironmentDefinitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectCatalogEnvironmentDefinitionResource(ArmClient client, DevCenterEnvironmentDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectCatalogEnvironmentDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); + _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient = new EnvironmentDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsApiVersion); + _projectCatalogEnvironmentDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _projectCatalogEnvironmentDefinitionsRestClient = new ProjectCatalogEnvironmentDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterEnvironmentDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogEnvironmentDefinitionEnvironmentDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Environment Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogEnvironmentDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetErrorDetailsProjectCatalogEnvironmentDefinitionAsync(CancellationToken cancellationToken = default) + { + using var scope = _projectCatalogEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionResource.GetErrorDetailsProjectCatalogEnvironmentDefinition"); + scope.Start(); + try + { + var response = await _projectCatalogEnvironmentDefinitionsRestClient.GetErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Environment Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogEnvironmentDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetErrorDetailsProjectCatalogEnvironmentDefinition(CancellationToken cancellationToken = default) + { + using var scope = _projectCatalogEnvironmentDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogEnvironmentDefinitionResource.GetErrorDetailsProjectCatalogEnvironmentDefinition"); + scope.Start(); + try + { + var response = _projectCatalogEnvironmentDefinitionsRestClient.GetErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildCollection.cs new file mode 100644 index 000000000000..cb1c60e836d9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectCatalogImageDefinitionBuilds method from an instance of . + /// + public partial class DevCenterProjectCatalogImageDefinitionBuildCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics; + private readonly ProjectCatalogImageDefinitionBuildRestOperations _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogImageDefinitionBuildCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionBuildCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectCatalogImageDefinitionBuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectCatalogImageDefinitionBuildResource.ResourceType, out string devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildApiVersion); + _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient = new ProjectCatalogImageDefinitionBuildRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectCatalogImageDefinitionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectCatalogImageDefinitionResource.ResourceType), nameof(id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists builds for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_ListByImageDefinition + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogImageDefinitionBuildResource(Client, DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(e)), _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics, Pipeline, "DevCenterProjectCatalogImageDefinitionBuildCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists builds for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_ListByImageDefinition + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateListByImageDefinitionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogImageDefinitionBuildResource(Client, DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(e)), _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics, Pipeline, "DevCenterProjectCatalogImageDefinitionBuildCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.Serialization.cs new file mode 100644 index 000000000000..bf9a0f7d0ac9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectCatalogImageDefinitionBuildResource : IJsonModel + { + private static DevCenterImageDefinitionBuildData s_dataDeserializationInstance; + private static DevCenterImageDefinitionBuildData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterImageDefinitionBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterImageDefinitionBuildData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.cs new file mode 100644 index 000000000000..b64672d97bd6 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionBuildResource.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectCatalogImageDefinitionBuild along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectCatalogImageDefinitionBuildResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectCatalogImageDefinitionBuild method. + /// + public partial class DevCenterProjectCatalogImageDefinitionBuildResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The catalogName. + /// The imageDefinitionName. + /// The buildName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics; + private readonly ProjectCatalogImageDefinitionBuildRestOperations _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient; + private readonly DevCenterImageDefinitionBuildData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/catalogs/imageDefinitions/builds"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogImageDefinitionBuildResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionBuildResource(ArmClient client, DevCenterImageDefinitionBuildData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionBuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildApiVersion); + _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient = new ProjectCatalogImageDefinitionBuildRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterImageDefinitionBuildData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels the specified build for an image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Cancel + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.Cancel"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics, Pipeline, _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels the specified build for an image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Cancel + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.Cancel"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics, Pipeline, _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Build details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_GetBuildDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBuildDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.GetBuildDetails"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetBuildDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Build details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_GetBuildDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBuildDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionBuildResource.GetBuildDetails"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionBuildProjectCatalogImageDefinitionBuildRestClient.GetBuildDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionCollection.cs new file mode 100644 index 000000000000..925e647cfa45 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectCatalogImageDefinitions method from an instance of . + /// + public partial class DevCenterProjectCatalogImageDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics; + private readonly ProjectCatalogImageDefinitionsRestOperations _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogImageDefinitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectCatalogImageDefinitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectCatalogImageDefinitionResource.ResourceType, out string devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsApiVersion); + _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient = new ProjectCatalogImageDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectCatalogResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectCatalogResource.ResourceType), nameof(id)); + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Image Definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_ListByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateListByProjectCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateListByProjectCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogImageDefinitionResource(Client, DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(e)), _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics, Pipeline, "DevCenterProjectCatalogImageDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Image Definitions in the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_ListByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateListByProjectCatalogRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateListByProjectCatalogNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectCatalogImageDefinitionResource(Client, DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(e)), _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics, Pipeline, "DevCenterProjectCatalogImageDefinitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, imageDefinitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.Serialization.cs new file mode 100644 index 000000000000..794fca00c0cf --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectCatalogImageDefinitionResource : IJsonModel + { + private static DevCenterImageDefinitionData s_dataDeserializationInstance; + private static DevCenterImageDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterImageDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterImageDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.cs new file mode 100644 index 000000000000..5ab3d3f58695 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogImageDefinitionResource.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectCatalogImageDefinition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectCatalogImageDefinitionResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectCatalogImageDefinition method. + /// + public partial class DevCenterProjectCatalogImageDefinitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The catalogName. + /// The imageDefinitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics; + private readonly ProjectCatalogImageDefinitionsRestOperations _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient; + private readonly DevCenterImageDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/catalogs/imageDefinitions"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogImageDefinitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionResource(ArmClient client, DevCenterImageDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectCatalogImageDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsApiVersion); + _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient = new ProjectCatalogImageDefinitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterImageDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DevCenterProjectCatalogImageDefinitionBuildResources in the DevCenterProjectCatalogImageDefinition. + /// An object representing collection of DevCenterProjectCatalogImageDefinitionBuildResources and their operations over a DevCenterProjectCatalogImageDefinitionBuildResource. + public virtual DevCenterProjectCatalogImageDefinitionBuildCollection GetDevCenterProjectCatalogImageDefinitionBuilds() + { + return GetCachedClient(client => new DevCenterProjectCatalogImageDefinitionBuildCollection(client, Id)); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectCatalogImageDefinitionBuildAsync(string buildName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectCatalogImageDefinitionBuilds().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a build for a specified image definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitionBuild_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectCatalogImageDefinitionBuild(string buildName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectCatalogImageDefinitionBuilds().Get(buildName, cancellationToken); + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetByProjectCatalog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogImageDefinitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Builds an image for the specified Image Definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_BuildImage + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task BuildImageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.BuildImage"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.BuildImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics, Pipeline, _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateBuildImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Builds an image for the specified Image Definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_BuildImage + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation BuildImage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.BuildImage"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.BuildImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics, Pipeline, _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.CreateBuildImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Image Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Image Definition error details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsClientDiagnostics.CreateScope("DevCenterProjectCatalogImageDefinitionResource.GetErrorDetails"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogImageDefinitionProjectCatalogImageDefinitionsRestClient.GetErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.Serialization.cs new file mode 100644 index 000000000000..eeb8c08b3f65 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectCatalogResource : IJsonModel + { + private static DevCenterCatalogData s_dataDeserializationInstance; + private static DevCenterCatalogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterCatalogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.cs new file mode 100644 index 000000000000..a8f663800527 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCatalogResource.cs @@ -0,0 +1,1089 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectCatalog along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectCatalogResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectCatalog method. + /// + public partial class DevCenterProjectCatalogResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The catalogName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectCatalogProjectCatalogsClientDiagnostics; + private readonly ProjectCatalogsRestOperations _devCenterProjectCatalogProjectCatalogsRestClient; + private readonly DevCenterCatalogData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/catalogs"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectCatalogResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectCatalogResource(ArmClient client, DevCenterCatalogData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectCatalogResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectCatalogProjectCatalogsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectCatalogProjectCatalogsApiVersion); + _devCenterProjectCatalogProjectCatalogsRestClient = new ProjectCatalogsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectCatalogProjectCatalogsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterCatalogData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DevCenterProjectCatalogEnvironmentDefinitionResources in the DevCenterProjectCatalog. + /// An object representing collection of DevCenterProjectCatalogEnvironmentDefinitionResources and their operations over a DevCenterProjectCatalogEnvironmentDefinitionResource. + public virtual DevCenterProjectCatalogEnvironmentDefinitionCollection GetDevCenterProjectCatalogEnvironmentDefinitions() + { + return GetCachedClient(client => new DevCenterProjectCatalogEnvironmentDefinitionCollection(client, Id)); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectCatalogEnvironmentDefinitionAsync(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectCatalogEnvironmentDefinitions().GetAsync(environmentDefinitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an environment definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName} + /// + /// + /// Operation Id + /// EnvironmentDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Environment Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectCatalogEnvironmentDefinition(string environmentDefinitionName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectCatalogEnvironmentDefinitions().Get(environmentDefinitionName, cancellationToken); + } + + /// Gets a collection of DevCenterProjectCatalogImageDefinitionResources in the DevCenterProjectCatalog. + /// An object representing collection of DevCenterProjectCatalogImageDefinitionResources and their operations over a DevCenterProjectCatalogImageDefinitionResource. + public virtual DevCenterProjectCatalogImageDefinitionCollection GetDevCenterProjectCatalogImageDefinitions() + { + return GetCachedClient(client => new DevCenterProjectCatalogImageDefinitionCollection(client, Id)); + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectCatalogImageDefinitionAsync(string imageDefinitionName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectCatalogImageDefinitions().GetAsync(imageDefinitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an Image Definition from the catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName} + /// + /// + /// Operation Id + /// ProjectCatalogImageDefinitions_GetByProjectCatalog + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image Definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectCatalogImageDefinition(string imageDefinitionName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectCatalogImageDefinitions().Get(imageDefinitionName, cancellationToken); + } + + /// + /// Gets an associated project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an associated project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a project catalog resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Delete"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a project catalog resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Delete"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates a project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Patch + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable project catalog properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DevCenterCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Update"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.PatchAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterProjectCatalogOperationSource(Client), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates a project catalog. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Patch + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable project catalog properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DevCenterCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Update"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Patch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterProjectCatalogOperationSource(Client), _devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Connects a project catalog to enable syncing. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect + /// + /// + /// Operation Id + /// ProjectCatalogs_Connect + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ConnectAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Connect"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.ConnectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateConnectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Connects a project catalog to enable syncing. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect + /// + /// + /// Operation Id + /// ProjectCatalogs_Connect + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Connect(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Connect"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Connect(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateConnectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets project catalog synchronization error details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogs_GetSyncErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSyncErrorDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.GetSyncErrorDetails"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.GetSyncErrorDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets project catalog synchronization error details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails + /// + /// + /// Operation Id + /// ProjectCatalogs_GetSyncErrorDetails + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSyncErrorDetails(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.GetSyncErrorDetails"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.GetSyncErrorDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Syncs templates for a template source. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync + /// + /// + /// Operation Id + /// ProjectCatalogs_Sync + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task SyncAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Sync"); + scope.Start(); + try + { + var response = await _devCenterProjectCatalogProjectCatalogsRestClient.SyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Syncs templates for a template source. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync + /// + /// + /// Operation Id + /// ProjectCatalogs_Sync + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Sync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.Sync"); + scope.Start(); + try + { + var response = _devCenterProjectCatalogProjectCatalogsRestClient.Sync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectCatalogProjectCatalogsClientDiagnostics, Pipeline, _devCenterProjectCatalogProjectCatalogsRestClient.CreateSyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _devCenterProjectCatalogProjectCatalogsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} + /// + /// + /// Operation Id + /// ProjectCatalogs_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _devCenterProjectCatalogProjectCatalogsClientDiagnostics.CreateScope("DevCenterProjectCatalogResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _devCenterProjectCatalogProjectCatalogsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DevCenterProjectCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DevCenterCatalogPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCollection.cs index 93c95ca6a527..a5d1f1728302 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string pr /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string projectName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(int? top = null, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string projectName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string projectName, CancellationToken cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.Serialization.cs index b96d9735c721..a82bde016f58 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.Serialization.cs @@ -38,6 +38,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DevCenterId)) @@ -55,6 +60,41 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("maxDevBoxesPerUser"u8); writer.WriteNumberValue(MaxDevBoxesPerUser.Value); } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(CatalogSettings)) + { + writer.WritePropertyName("catalogSettings"u8); + writer.WriteObjectValue(CatalogSettings, options); + } + if (Optional.IsDefined(CustomizationSettings)) + { + writer.WritePropertyName("customizationSettings"u8); + writer.WriteObjectValue(CustomizationSettings, options); + } + if (Optional.IsDefined(DevBoxAutoDeleteSettings)) + { + writer.WritePropertyName("devBoxAutoDeleteSettings"u8); + writer.WriteObjectValue(DevBoxAutoDeleteSettings, options); + } + if (Optional.IsDefined(AzureAiServicesSettings)) + { + writer.WritePropertyName("azureAiServicesSettings"u8); + writer.WriteObjectValue(AzureAiServicesSettings, options); + } + if (Optional.IsDefined(ServerlessGpuSessionsSettings)) + { + writer.WritePropertyName("serverlessGpuSessionsSettings"u8); + writer.WriteObjectValue(ServerlessGpuSessionsSettings, options); + } + if (Optional.IsDefined(WorkspaceStorageSettings)) + { + writer.WritePropertyName("workspaceStorageSettings"u8); + writer.WriteObjectValue(WorkspaceStorageSettings, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -88,6 +128,7 @@ internal static DevCenterProjectData DeserializeDevCenterProjectData(JsonElement { return null; } + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -97,12 +138,28 @@ internal static DevCenterProjectData DeserializeDevCenterProjectData(JsonElement ResourceIdentifier devCenterId = default; string description = default; int? maxDevBoxesPerUser = default; + string displayName = default; + ProjectCatalogSettings catalogSettings = default; + ProjectCustomizationSettings customizationSettings = default; + DevBoxAutoDeleteSettings devBoxAutoDeleteSettings = default; + AzureAiServicesSettings azureAiServicesSettings = default; + ServerlessGpuSessionsSettings serverlessGpuSessionsSettings = default; + WorkspaceStorageSettings workspaceStorageSettings = default; DevCenterProvisioningState? provisioningState = default; Uri devCenterUri = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerDevCenterContext.Default); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -178,6 +235,65 @@ internal static DevCenterProjectData DeserializeDevCenterProjectData(JsonElement maxDevBoxesPerUser = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("catalogSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + catalogSettings = ProjectCatalogSettings.DeserializeProjectCatalogSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("customizationSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customizationSettings = ProjectCustomizationSettings.DeserializeProjectCustomizationSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("devBoxAutoDeleteSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxAutoDeleteSettings = DevBoxAutoDeleteSettings.DeserializeDevBoxAutoDeleteSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("azureAiServicesSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureAiServicesSettings = AzureAiServicesSettings.DeserializeAzureAiServicesSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("serverlessGpuSessionsSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverlessGpuSessionsSettings = ServerlessGpuSessionsSettings.DeserializeServerlessGpuSessionsSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("workspaceStorageSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceStorageSettings = WorkspaceStorageSettings.DeserializeWorkspaceStorageSettings(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -212,9 +328,17 @@ internal static DevCenterProjectData DeserializeDevCenterProjectData(JsonElement systemData, tags ?? new ChangeTrackingDictionary(), location, + identity, devCenterId, description, maxDevBoxesPerUser, + displayName, + catalogSettings, + customizationSettings, + devBoxAutoDeleteSettings, + azureAiServicesSettings, + serverlessGpuSessionsSettings, + workspaceStorageSettings, provisioningState, devCenterUri, serializedAdditionalRawData); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.cs index 174ca09f01a6..24a3e55c05bf 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectData.cs @@ -64,17 +64,33 @@ public DevCenterProjectData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. + /// Managed identity properties. /// Resource Id of an associated DevCenter. /// Description of the project. /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + /// The display name of the project. + /// Settings to be used when associating a project with a catalog. + /// Settings to be used for customizations. + /// Dev Box Auto Delete settings. + /// Indicates whether Azure AI services are enabled for a project. + /// Settings to be used for serverless GPU. + /// Settings to be used for workspace storage. /// The provisioning state of the resource. /// The URI of the Dev Center resource this project is associated with. /// Keeps track of any properties unknown to the library. - internal DevCenterProjectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier devCenterId, string description, int? maxDevBoxesPerUser, DevCenterProvisioningState? provisioningState, Uri devCenterUri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DevCenterProjectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier devCenterId, string description, int? maxDevBoxesPerUser, string displayName, ProjectCatalogSettings catalogSettings, ProjectCustomizationSettings customizationSettings, DevBoxAutoDeleteSettings devBoxAutoDeleteSettings, AzureAiServicesSettings azureAiServicesSettings, ServerlessGpuSessionsSettings serverlessGpuSessionsSettings, WorkspaceStorageSettings workspaceStorageSettings, DevCenterProvisioningState? provisioningState, Uri devCenterUri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + Identity = identity; DevCenterId = devCenterId; Description = description; MaxDevBoxesPerUser = maxDevBoxesPerUser; + DisplayName = displayName; + CatalogSettings = catalogSettings; + CustomizationSettings = customizationSettings; + DevBoxAutoDeleteSettings = devBoxAutoDeleteSettings; + AzureAiServicesSettings = azureAiServicesSettings; + ServerlessGpuSessionsSettings = serverlessGpuSessionsSettings; + WorkspaceStorageSettings = workspaceStorageSettings; ProvisioningState = provisioningState; DevCenterUri = devCenterUri; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -85,12 +101,63 @@ internal DevCenterProjectData() { } + /// Managed identity properties. + public ManagedServiceIdentity Identity { get; set; } /// Resource Id of an associated DevCenter. public ResourceIdentifier DevCenterId { get; set; } /// Description of the project. public string Description { get; set; } /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. public int? MaxDevBoxesPerUser { get; set; } + /// The display name of the project. + public string DisplayName { get; set; } + /// Settings to be used when associating a project with a catalog. + internal ProjectCatalogSettings CatalogSettings { get; set; } + /// Indicates catalog item types that can be synced. + public IList CatalogItemSyncTypes + { + get + { + if (CatalogSettings is null) + CatalogSettings = new ProjectCatalogSettings(); + return CatalogSettings.CatalogItemSyncTypes; + } + } + + /// Settings to be used for customizations. + public ProjectCustomizationSettings CustomizationSettings { get; set; } + /// Dev Box Auto Delete settings. + public DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get; set; } + /// Indicates whether Azure AI services are enabled for a project. + internal AzureAiServicesSettings AzureAiServicesSettings { get; set; } + /// The property indicates whether Azure AI services is enabled. + public AzureAiServicesMode? AzureAiServicesMode + { + get => AzureAiServicesSettings is null ? default : AzureAiServicesSettings.AzureAiServicesMode; + set + { + if (AzureAiServicesSettings is null) + AzureAiServicesSettings = new AzureAiServicesSettings(); + AzureAiServicesSettings.AzureAiServicesMode = value; + } + } + + /// Settings to be used for serverless GPU. + public ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get; set; } + /// Settings to be used for workspace storage. + internal WorkspaceStorageSettings WorkspaceStorageSettings { get; set; } + /// Indicates whether workspace storage is enabled. + public WorkspaceStorageMode? WorkspaceStorageMode + { + get => WorkspaceStorageSettings is null ? default : WorkspaceStorageSettings.WorkspaceStorageMode; + set + { + if (WorkspaceStorageSettings is null) + WorkspaceStorageSettings = new WorkspaceStorageSettings(); + WorkspaceStorageSettings.WorkspaceStorageMode = value; + } + } + /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } /// The URI of the Dev Center resource this project is associated with. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentCollection.cs index 030f673e2f4b..8bee0078c448 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string environm /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(in /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = n /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string environmentTypeName /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string environmentTypeName, CancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.Serialization.cs index e564853c9e3f..35ce8c965a55 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.Serialization.cs @@ -50,6 +50,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("deploymentTargetId"u8); writer.WriteStringValue(DeploymentTargetId); } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -76,6 +81,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(EnvironmentCount)) + { + writer.WritePropertyName("environmentCount"u8); + writer.WriteNumberValue(EnvironmentCount.Value); + } writer.WriteEndObject(); } @@ -107,10 +117,12 @@ internal static DevCenterProjectEnvironmentData DeserializeDevCenterProjectEnvir ResourceType type = default; SystemData systemData = default; ResourceIdentifier deploymentTargetId = default; + string displayName = default; EnvironmentTypeEnableStatus? status = default; ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment = default; IDictionary userRoleAssignments = default; DevCenterProvisioningState? provisioningState = default; + int? environmentCount = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -185,6 +197,11 @@ internal static DevCenterProjectEnvironmentData DeserializeDevCenterProjectEnvir deploymentTargetId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("status"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -226,6 +243,15 @@ internal static DevCenterProjectEnvironmentData DeserializeDevCenterProjectEnvir provisioningState = new DevCenterProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("environmentCount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentCount = property0.Value.GetInt32(); + continue; + } } continue; } @@ -244,10 +270,12 @@ internal static DevCenterProjectEnvironmentData DeserializeDevCenterProjectEnvir location, identity, deploymentTargetId, + displayName, status, creatorRoleAssignment, userRoleAssignments ?? new ChangeTrackingDictionary(), provisioningState, + environmentCount, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.cs index 09e68d6ebbe3..731edd0a3ecc 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentData.cs @@ -67,19 +67,23 @@ public DevCenterProjectEnvironmentData(AzureLocation location) : base(location) /// The location. /// Managed identity properties. /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. + /// The display name of the project environment type. /// Defines whether this Environment Type can be used in this Project. /// The role definition assigned to the environment creator on backing resources. /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. /// The provisioning state of the resource. + /// The number of environments of this type. /// Keeps track of any properties unknown to the library. - internal DevCenterProjectEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier deploymentTargetId, EnvironmentTypeEnableStatus? status, ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment, IDictionary userRoleAssignments, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DevCenterProjectEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier deploymentTargetId, string displayName, EnvironmentTypeEnableStatus? status, ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment, IDictionary userRoleAssignments, DevCenterProvisioningState? provisioningState, int? environmentCount, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; DeploymentTargetId = deploymentTargetId; + DisplayName = displayName; Status = status; CreatorRoleAssignment = creatorRoleAssignment; UserRoleAssignments = userRoleAssignments; ProvisioningState = provisioningState; + EnvironmentCount = environmentCount; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,6 +96,8 @@ internal DevCenterProjectEnvironmentData() public ManagedServiceIdentity Identity { get; set; } /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. public ResourceIdentifier DeploymentTargetId { get; set; } + /// The display name of the project environment type. + public string DisplayName { get; set; } /// Defines whether this Environment Type can be used in this Project. public EnvironmentTypeEnableStatus? Status { get; set; } /// The role definition assigned to the environment creator on backing resources. @@ -111,5 +117,7 @@ public IDictionary Roles public IDictionary UserRoleAssignments { get; } /// The provisioning state of the resource. public DevCenterProvisioningState? ProvisioningState { get; } + /// The number of environments of this type. + public int? EnvironmentCount { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.cs index 6394d11809f6..3a526725b15f 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(DevCenterPro /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -536,7 +536,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -593,7 +593,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageCollection.cs new file mode 100644 index 000000000000..f5000035b938 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectImages method from an instance of . + /// + public partial class DevCenterProjectImageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectImageImagesClientDiagnostics; + private readonly ImagesRestOperations _devCenterProjectImageImagesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectImageCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectImageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectImageImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectImageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectImageResource.ResourceType, out string devCenterProjectImageImagesApiVersion); + _devCenterProjectImageImagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectImageImagesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectResource.ResourceType), nameof(id)); + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectImageImagesRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectImageImagesRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists images for a project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images + /// + /// + /// Operation Id + /// Images_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectImageImagesRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectImageImagesRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _devCenterProjectImageImagesClientDiagnostics, Pipeline, "DevCenterProjectImageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists images for a project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images + /// + /// + /// Operation Id + /// Images_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectImageImagesRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectImageImagesRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _devCenterProjectImageImagesClientDiagnostics, Pipeline, "DevCenterProjectImageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectImageImagesRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectImageImagesRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectImageImagesRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectImageImagesRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.Serialization.cs new file mode 100644 index 000000000000..61c9cf98ce9c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectImageResource : IJsonModel + { + private static DevCenterImageData s_dataDeserializationInstance; + private static DevCenterImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DevCenterImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + DevCenterImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.cs new file mode 100644 index 000000000000..80e3258a8cba --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectImage along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectImageResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectImage method. + /// + public partial class DevCenterProjectImageResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The imageName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectImageImagesClientDiagnostics; + private readonly ImagesRestOperations _devCenterProjectImageImagesRestClient; + private readonly DevCenterImageData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/images"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectImageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectImageResource(ArmClient client, DevCenterImageData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectImageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectImageImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectImageImagesApiVersion); + _devCenterProjectImageImagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectImageImagesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevCenterImageData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DevCenterProjectImageVersionResources in the DevCenterProjectImage. + /// An object representing collection of DevCenterProjectImageVersionResources and their operations over a DevCenterProjectImageVersionResource. + public virtual DevCenterProjectImageVersionCollection GetDevCenterProjectImageVersions() + { + return GetCachedClient(client => new DevCenterProjectImageVersionCollection(client, Id)); + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectImageVersionAsync(string versionName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectImageVersions().GetAsync(versionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectImageVersion(string versionName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectImageVersions().Get(versionName, cancellationToken); + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectImageImagesRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectImageImagesClientDiagnostics.CreateScope("DevCenterProjectImageResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectImageImagesRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionCollection.cs new file mode 100644 index 000000000000..d38208e6da4e --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectImageVersions method from an instance of . + /// + public partial class DevCenterProjectImageVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectImageVersionImageVersionsClientDiagnostics; + private readonly ImageVersionsRestOperations _devCenterProjectImageVersionImageVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectImageVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectImageVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectImageVersionImageVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectImageVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectImageVersionResource.ResourceType, out string devCenterProjectImageVersionImageVersionsApiVersion); + _devCenterProjectImageVersionImageVersionsRestClient = new ImageVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectImageVersionImageVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterProjectImageResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterProjectImageResource.ResourceType), nameof(id)); + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectImageVersionImageVersionsRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectImageVersionImageVersionsRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists versions for an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions + /// + /// + /// Operation Id + /// ImageVersions_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectImageVersionImageVersionsRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectImageVersionImageVersionsRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectImageVersionResource(Client, ImageVersionData.DeserializeImageVersionData(e)), _devCenterProjectImageVersionImageVersionsClientDiagnostics, Pipeline, "DevCenterProjectImageVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists versions for an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions + /// + /// + /// Operation Id + /// ImageVersions_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectImageVersionImageVersionsRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectImageVersionImageVersionsRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectImageVersionResource(Client, ImageVersionData.DeserializeImageVersionData(e)), _devCenterProjectImageVersionImageVersionsClientDiagnostics, Pipeline, "DevCenterProjectImageVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectImageVersionImageVersionsRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectImageVersionImageVersionsRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectImageVersionImageVersionsRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The version of the image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectImageVersionImageVersionsRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.Serialization.cs new file mode 100644 index 000000000000..d58ec9b8c5f8 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectImageVersionResource : IJsonModel + { + private static ImageVersionData s_dataDeserializationInstance; + private static ImageVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + ImageVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.cs new file mode 100644 index 000000000000..a0adef54b737 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectImageVersionResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectImageVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectImageVersionResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectImageVersion method. + /// + public partial class DevCenterProjectImageVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The projectName. + /// The imageName. + /// The versionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectImageVersionImageVersionsClientDiagnostics; + private readonly ImageVersionsRestOperations _devCenterProjectImageVersionImageVersionsRestClient; + private readonly ImageVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/projects/images/versions"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectImageVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectImageVersionResource(ArmClient client, ImageVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectImageVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectImageVersionImageVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectImageVersionImageVersionsApiVersion); + _devCenterProjectImageVersionImageVersionsRestClient = new ImageVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectImageVersionImageVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ImageVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectImageVersionImageVersionsRestClient.GetByProjectAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an image version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName} + /// + /// + /// Operation Id + /// ImageVersions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectImageVersionImageVersionsClientDiagnostics.CreateScope("DevCenterProjectImageVersionResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectImageVersionImageVersionsRestClient.GetByProject(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectImageVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyCollection.cs new file mode 100644 index 000000000000..5bd903ab5816 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyCollection.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevCenterProjectPolicies method from an instance of . + /// + public partial class DevCenterProjectPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devCenterProjectPolicyProjectPoliciesClientDiagnostics; + private readonly ProjectPoliciesRestOperations _devCenterProjectPolicyProjectPoliciesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevCenterProjectPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectPolicyProjectPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevCenterProjectPolicyResource.ResourceType, out string devCenterProjectPolicyProjectPoliciesApiVersion); + _devCenterProjectPolicyProjectPoliciesRestClient = new ProjectPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectPolicyProjectPoliciesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DevCenterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DevCenterResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project policy. + /// Represents an project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string projectPolicyName, ProjectPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, data, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterProjectPolicyOperationSource(Client), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the project policy. + /// Represents an project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string projectPolicyName, ProjectPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, data, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterProjectPolicyOperationSource(Client), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.Get"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all project policies in the dev center. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies + /// + /// + /// Operation Id + /// ProjectPolicies_ListByDevCenter + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectPolicyProjectPoliciesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectPolicyProjectPoliciesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectPolicyResource(Client, ProjectPolicyData.DeserializeProjectPolicyData(e)), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, "DevCenterProjectPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all project policies in the dev center. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies + /// + /// + /// Operation Id + /// ProjectPolicies_ListByDevCenter + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterProjectPolicyProjectPoliciesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterProjectPolicyProjectPoliciesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectPolicyResource(Client, ProjectPolicyData.DeserializeProjectPolicyData(e)), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, "DevCenterProjectPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectPolicyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.Serialization.cs new file mode 100644 index 000000000000..e56ca13aa528 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class DevCenterProjectPolicyResource : IJsonModel + { + private static ProjectPolicyData s_dataDeserializationInstance; + private static ProjectPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ProjectPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); + + ProjectPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.cs new file mode 100644 index 000000000000..51e98c433a23 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectPolicyResource.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A Class representing a DevCenterProjectPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevCenterProjectPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDevCenterProjectPolicy method. + /// + public partial class DevCenterProjectPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The devCenterName. + /// The projectPolicyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devCenterProjectPolicyProjectPoliciesClientDiagnostics; + private readonly ProjectPoliciesRestOperations _devCenterProjectPolicyProjectPoliciesRestClient; + private readonly ProjectPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DevCenter/devcenters/projectPolicies"; + + /// Initializes a new instance of the class for mocking. + protected DevCenterProjectPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevCenterProjectPolicyResource(ArmClient client, ProjectPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevCenterProjectPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devCenterProjectPolicyProjectPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devCenterProjectPolicyProjectPoliciesApiVersion); + _devCenterProjectPolicyProjectPoliciesRestClient = new ProjectPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectPolicyProjectPoliciesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProjectPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Get"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Get"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevCenterProjectPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(_devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Delete"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DevCenterArmOperation(_devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Update + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable project policy properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DevCenterProjectPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Update"); + scope.Start(); + try + { + var response = await _devCenterProjectPolicyProjectPoliciesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DevCenterArmOperation(new DevCenterProjectPolicyOperationSource(Client), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Partially updates an project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Update + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Updatable project policy properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DevCenterProjectPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _devCenterProjectPolicyProjectPoliciesClientDiagnostics.CreateScope("DevCenterProjectPolicyResource.Update"); + scope.Start(); + try + { + var response = _devCenterProjectPolicyProjectPoliciesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new DevCenterArmOperation(new DevCenterProjectPolicyOperationSource(Client), _devCenterProjectPolicyProjectPoliciesClientDiagnostics, Pipeline, _devCenterProjectPolicyProjectPoliciesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.cs index 277773026844..2644b188db81 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.cs @@ -10,6 +10,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.DevCenter.Models; @@ -37,6 +38,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _devCenterProjectProjectsClientDiagnostics; private readonly ProjectsRestOperations _devCenterProjectProjectsRestClient; + private readonly ClientDiagnostics _skusClientDiagnostics; + private readonly SkusRestOperations _skusRestClient; private readonly DevCenterProjectData _data; /// Gets the resource type for the operations. @@ -64,6 +67,8 @@ internal DevCenterProjectResource(ArmClient client, ResourceIdentifier id) : bas _devCenterProjectProjectsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string devCenterProjectProjectsApiVersion); _devCenterProjectProjectsRestClient = new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterProjectProjectsApiVersion); + _skusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _skusRestClient = new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -110,7 +115,7 @@ public virtual ProjectAttachedNetworkConnectionCollection GetProjectAttachedNetw /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +146,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -159,100 +164,238 @@ public virtual Response GetProjectAtta return GetProjectAttachedNetworkConnections().Get(attachedNetworkConnectionName, cancellationToken); } - /// Gets a collection of AllowedEnvironmentTypeResources in the DevCenterProject. - /// An object representing collection of AllowedEnvironmentTypeResources and their operations over a AllowedEnvironmentTypeResource. - public virtual AllowedEnvironmentTypeCollection GetAllowedEnvironmentTypes() + /// Gets a collection of DevCenterProjectCatalogResources in the DevCenterProject. + /// An object representing collection of DevCenterProjectCatalogResources and their operations over a DevCenterProjectCatalogResource. + public virtual DevCenterProjectCatalogCollection GetDevCenterProjectCatalogs() { - return GetCachedClient(client => new AllowedEnvironmentTypeCollection(client, Id)); + return GetCachedClient(client => new DevCenterProjectCatalogCollection(client, Id)); } /// - /// Gets an allowed environment type. + /// Gets an associated project catalog. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} /// /// /// Operation Id - /// ProjectAllowedEnvironmentTypes_Get + /// ProjectCatalogs_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the environment type. + /// The name of the Catalog. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAllowedEnvironmentTypeAsync(string environmentTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterProjectCatalogAsync(string catalogName, CancellationToken cancellationToken = default) { - return await GetAllowedEnvironmentTypes().GetAsync(environmentTypeName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterProjectCatalogs().GetAsync(catalogName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an allowed environment type. + /// Gets an associated project catalog. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName} /// /// /// Operation Id - /// ProjectAllowedEnvironmentTypes_Get + /// ProjectCatalogs_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the environment type. + /// The name of the Catalog. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAllowedEnvironmentType(string environmentTypeName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterProjectCatalog(string catalogName, CancellationToken cancellationToken = default) { - return GetAllowedEnvironmentTypes().Get(environmentTypeName, cancellationToken); + return GetDevCenterProjectCatalogs().Get(catalogName, cancellationToken); } - /// Gets a collection of DevCenterProjectEnvironmentResources in the DevCenterProject. - /// An object representing collection of DevCenterProjectEnvironmentResources and their operations over a DevCenterProjectEnvironmentResource. - public virtual DevCenterProjectEnvironmentCollection GetDevCenterProjectEnvironments() + /// Gets a collection of ProjectDevBoxDefinitionResources in the DevCenterProject. + /// An object representing collection of ProjectDevBoxDefinitionResources and their operations over a ProjectDevBoxDefinitionResource. + public virtual ProjectDevBoxDefinitionCollection GetProjectDevBoxDefinitions() { - return GetCachedClient(client => new DevCenterProjectEnvironmentCollection(client, Id)); + return GetCachedClient(client => new ProjectDevBoxDefinitionCollection(client, Id)); } /// - /// Gets a project environment type. + /// Gets a Dev Box definition configured for a project. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName} /// /// /// Operation Id - /// ProjectEnvironmentTypes_Get + /// DevBoxDefinitions_GetByProject /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// + /// + /// + /// + /// The name of the Dev Box definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetProjectDevBoxDefinitionAsync(string devBoxDefinitionName, CancellationToken cancellationToken = default) + { + return await GetProjectDevBoxDefinitions().GetAsync(devBoxDefinitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Dev Box definition configured for a project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName} + /// + /// + /// Operation Id + /// DevBoxDefinitions_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Dev Box definition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetProjectDevBoxDefinition(string devBoxDefinitionName, CancellationToken cancellationToken = default) + { + return GetProjectDevBoxDefinitions().Get(devBoxDefinitionName, cancellationToken); + } + + /// Gets a collection of DevCenterProjectImageResources in the DevCenterProject. + /// An object representing collection of DevCenterProjectImageResources and their operations over a DevCenterProjectImageResource. + public virtual DevCenterProjectImageCollection GetDevCenterProjectImages() + { + return GetCachedClient(client => new DevCenterProjectImageCollection(client, Id)); + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectImageAsync(string imageName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectImages().GetAsync(imageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName} + /// + /// + /// Operation Id + /// Images_GetByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectImage(string imageName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectImages().Get(imageName, cancellationToken); + } + + /// Gets a collection of AllowedEnvironmentTypeResources in the DevCenterProject. + /// An object representing collection of AllowedEnvironmentTypeResources and their operations over a AllowedEnvironmentTypeResource. + public virtual AllowedEnvironmentTypeCollection GetAllowedEnvironmentTypes() + { + return GetCachedClient(client => new AllowedEnvironmentTypeCollection(client, Id)); + } + + /// + /// Gets an allowed environment type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName} + /// + /// + /// Operation Id + /// ProjectAllowedEnvironmentTypes_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// @@ -261,29 +404,29 @@ public virtual DevCenterProjectEnvironmentCollection GetDevCenterProjectEnvironm /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterProjectEnvironmentAsync(string environmentTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetAllowedEnvironmentTypeAsync(string environmentTypeName, CancellationToken cancellationToken = default) { - return await GetDevCenterProjectEnvironments().GetAsync(environmentTypeName, cancellationToken).ConfigureAwait(false); + return await GetAllowedEnvironmentTypes().GetAsync(environmentTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a project environment type. + /// Gets an allowed environment type. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName} /// /// /// Operation Id - /// ProjectEnvironmentTypes_Get + /// ProjectAllowedEnvironmentTypes_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -292,78 +435,78 @@ public virtual async Task> GetDevC /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterProjectEnvironment(string environmentTypeName, CancellationToken cancellationToken = default) + public virtual Response GetAllowedEnvironmentType(string environmentTypeName, CancellationToken cancellationToken = default) { - return GetDevCenterProjectEnvironments().Get(environmentTypeName, cancellationToken); + return GetAllowedEnvironmentTypes().Get(environmentTypeName, cancellationToken); } - /// Gets a collection of ProjectDevBoxDefinitionResources in the DevCenterProject. - /// An object representing collection of ProjectDevBoxDefinitionResources and their operations over a ProjectDevBoxDefinitionResource. - public virtual ProjectDevBoxDefinitionCollection GetProjectDevBoxDefinitions() + /// Gets a collection of DevCenterProjectEnvironmentResources in the DevCenterProject. + /// An object representing collection of DevCenterProjectEnvironmentResources and their operations over a DevCenterProjectEnvironmentResource. + public virtual DevCenterProjectEnvironmentCollection GetDevCenterProjectEnvironments() { - return GetCachedClient(client => new ProjectDevBoxDefinitionCollection(client, Id)); + return GetCachedClient(client => new DevCenterProjectEnvironmentCollection(client, Id)); } /// - /// Gets a Dev Box definition configured for a project + /// Gets a project environment type. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName} /// /// /// Operation Id - /// DevBoxDefinitions_GetByProject + /// ProjectEnvironmentTypes_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Dev Box definition. + /// The name of the environment type. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetProjectDevBoxDefinitionAsync(string devBoxDefinitionName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterProjectEnvironmentAsync(string environmentTypeName, CancellationToken cancellationToken = default) { - return await GetProjectDevBoxDefinitions().GetAsync(devBoxDefinitionName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterProjectEnvironments().GetAsync(environmentTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a Dev Box definition configured for a project + /// Gets a project environment type. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName} /// /// /// Operation Id - /// DevBoxDefinitions_GetByProject + /// ProjectEnvironmentTypes_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Dev Box definition. + /// The name of the environment type. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetProjectDevBoxDefinition(string devBoxDefinitionName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterProjectEnvironment(string environmentTypeName, CancellationToken cancellationToken = default) { - return GetProjectDevBoxDefinitions().Get(devBoxDefinitionName, cancellationToken); + return GetDevCenterProjectEnvironments().Get(environmentTypeName, cancellationToken); } /// Gets a collection of DevCenterPoolResources in the DevCenterProject. @@ -374,7 +517,7 @@ public virtual DevCenterPoolCollection GetDevCenterPools() } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -386,7 +529,7 @@ public virtual DevCenterPoolCollection GetDevCenterPools() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -405,7 +548,7 @@ public virtual async Task> GetDevCenterPoolAsync } /// - /// Gets a machine pool + /// Gets a machine pool. /// /// /// Request Path @@ -417,7 +560,7 @@ public virtual async Task> GetDevCenterPoolAsync /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -448,7 +591,7 @@ public virtual Response GetDevCenterPool(string poolName, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -488,7 +631,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -528,7 +671,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -545,7 +688,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterProjectProjectsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -570,7 +713,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -587,7 +730,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterProjectProjectsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -612,7 +755,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -633,7 +776,7 @@ public virtual async Task> UpdateAsync(Wa try { var response = await _devCenterProjectProjectsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterProjectOperationSource(Client), _devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterProjectOperationSource(Client), _devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -658,7 +801,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -679,7 +822,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil try { var response = _devCenterProjectProjectsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterProjectOperationSource(Client), _devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterProjectOperationSource(Client), _devCenterProjectProjectsClientDiagnostics, Pipeline, _devCenterProjectProjectsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -691,6 +834,134 @@ public virtual ArmOperation Update(WaitUntil waitUntil } } + /// + /// Gets applicable inherited settings for this project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings + /// + /// + /// Operation Id + /// Projects_GetInheritedSettings + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetInheritedSettingsAsync(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectProjectsClientDiagnostics.CreateScope("DevCenterProjectResource.GetInheritedSettings"); + scope.Start(); + try + { + var response = await _devCenterProjectProjectsRestClient.GetInheritedSettingsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets applicable inherited settings for this project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings + /// + /// + /// Operation Id + /// Projects_GetInheritedSettings + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetInheritedSettings(CancellationToken cancellationToken = default) + { + using var scope = _devCenterProjectProjectsClientDiagnostics.CreateScope("DevCenterProjectResource.GetInheritedSettings"); + scope.Start(); + try + { + var response = _devCenterProjectProjectsRestClient.GetInheritedSettings(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists SKUs available to the project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/listSkus + /// + /// + /// Operation Id + /// Skus_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _skusRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _skusRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), _skusClientDiagnostics, Pipeline, "DevCenterProjectResource.GetSkus", "value", "nextLink", cancellationToken); + } + + /// + /// Lists SKUs available to the project. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/listSkus + /// + /// + /// Operation Id + /// Skus_ListByProject + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkus(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _skusRestClient.CreateListByProjectRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _skusRestClient.CreateListByProjectNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), _skusClientDiagnostics, Pipeline, "DevCenterProjectResource.GetSkus", "value", "nextLink", cancellationToken); + } + /// /// Add a tag to the current resource. /// @@ -704,7 +975,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -766,7 +1037,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -828,7 +1099,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -885,7 +1156,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -942,7 +1213,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -1002,7 +1273,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.cs index b0f0ac3a7940..fe08c2dfa7c3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.cs @@ -38,8 +38,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _devCenterClientDiagnostics; private readonly DevCentersRestOperations _devCenterRestClient; - private readonly ClientDiagnostics _devCenterImageImagesClientDiagnostics; - private readonly ImagesRestOperations _devCenterImageImagesRestClient; + private readonly ClientDiagnostics _imagesClientDiagnostics; + private readonly ImagesRestOperations _imagesRestClient; private readonly DevCenterData _data; /// Gets the resource type for the operations. @@ -67,9 +67,8 @@ internal DevCenterResource(ArmClient client, ResourceIdentifier id) : base(clien _devCenterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string devCenterApiVersion); _devCenterRestClient = new DevCentersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterApiVersion); - _devCenterImageImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterImageResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DevCenterImageResource.ResourceType, out string devCenterImageImagesApiVersion); - _devCenterImageImagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devCenterImageImagesApiVersion); + _imagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _imagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -116,7 +115,7 @@ public virtual AttachedNetworkConnectionCollection GetAttachedNetworkConnections /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -147,7 +146,7 @@ public virtual async Task> GetAttach /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -165,142 +164,211 @@ public virtual Response GetAttachedNetworkCon return GetAttachedNetworkConnections().Get(attachedNetworkConnectionName, cancellationToken); } - /// Gets a collection of DevCenterGalleryResources in the DevCenter. - /// An object representing collection of DevCenterGalleryResources and their operations over a DevCenterGalleryResource. - public virtual DevCenterGalleryCollection GetDevCenterGalleries() + /// Gets a collection of DevCenterCatalogResources in the DevCenter. + /// An object representing collection of DevCenterCatalogResources and their operations over a DevCenterCatalogResource. + public virtual DevCenterCatalogCollection GetDevCenterCatalogs() { - return GetCachedClient(client => new DevCenterGalleryCollection(client, Id)); + return GetCachedClient(client => new DevCenterCatalogCollection(client, Id)); } /// - /// Gets a gallery + /// Gets a catalog. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} /// /// /// Operation Id - /// Galleries_Get + /// Catalogs_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the gallery. + /// The name of the Catalog. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterGalleryAsync(string galleryName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterCatalogAsync(string catalogName, CancellationToken cancellationToken = default) { - return await GetDevCenterGalleries().GetAsync(galleryName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterCatalogs().GetAsync(catalogName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a gallery + /// Gets a catalog. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} /// /// /// Operation Id - /// Galleries_Get + /// Catalogs_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the gallery. + /// The name of the Catalog. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterGallery(string galleryName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterCatalog(string catalogName, CancellationToken cancellationToken = default) { - return GetDevCenterGalleries().Get(galleryName, cancellationToken); + return GetDevCenterCatalogs().Get(catalogName, cancellationToken); } - /// Gets a collection of DevCenterCatalogResources in the DevCenter. - /// An object representing collection of DevCenterCatalogResources and their operations over a DevCenterCatalogResource. - public virtual DevCenterCatalogCollection GetDevCenterCatalogs() + /// Gets a collection of DevBoxDefinitionResources in the DevCenter. + /// An object representing collection of DevBoxDefinitionResources and their operations over a DevBoxDefinitionResource. + public virtual DevBoxDefinitionCollection GetDevBoxDefinitions() { - return GetCachedClient(client => new DevCenterCatalogCollection(client, Id)); + return GetCachedClient(client => new DevBoxDefinitionCollection(client, Id)); } /// - /// Gets a catalog + /// Gets a Dev Box definition. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName} /// /// /// Operation Id - /// Catalogs_Get + /// DevBoxDefinitions_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Catalog. + /// The name of the Dev Box definition. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterCatalogAsync(string catalogName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevBoxDefinitionAsync(string devBoxDefinitionName, CancellationToken cancellationToken = default) { - return await GetDevCenterCatalogs().GetAsync(catalogName, cancellationToken).ConfigureAwait(false); + return await GetDevBoxDefinitions().GetAsync(devBoxDefinitionName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a catalog + /// Gets a Dev Box definition. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName} /// /// /// Operation Id - /// Catalogs_Get + /// DevBoxDefinitions_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Catalog. + /// The name of the Dev Box definition. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterCatalog(string catalogName, CancellationToken cancellationToken = default) + public virtual Response GetDevBoxDefinition(string devBoxDefinitionName, CancellationToken cancellationToken = default) { - return GetDevCenterCatalogs().Get(catalogName, cancellationToken); + return GetDevBoxDefinitions().Get(devBoxDefinitionName, cancellationToken); + } + + /// Gets a collection of DevCenterEncryptionSetResources in the DevCenter. + /// An object representing collection of DevCenterEncryptionSetResources and their operations over a DevCenterEncryptionSetResource. + public virtual DevCenterEncryptionSetCollection GetDevCenterEncryptionSets() + { + return GetCachedClient(client => new DevCenterEncryptionSetCollection(client, Id)); + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterEncryptionSetAsync(string encryptionSetName, CancellationToken cancellationToken = default) + { + return await GetDevCenterEncryptionSets().GetAsync(encryptionSetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a devcenter encryption set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName} + /// + /// + /// Operation Id + /// EncryptionSets_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterEncryptionSet(string encryptionSetName, CancellationToken cancellationToken = default) + { + return GetDevCenterEncryptionSets().Get(encryptionSetName, cancellationToken); } /// Gets a collection of DevCenterEnvironmentTypeResources in the DevCenter. @@ -323,7 +391,7 @@ public virtual DevCenterEnvironmentTypeCollection GetDevCenterEnvironmentTypes() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -354,7 +422,7 @@ public virtual async Task> GetDevCent /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -372,73 +440,142 @@ public virtual Response GetDevCenterEnvironmen return GetDevCenterEnvironmentTypes().Get(environmentTypeName, cancellationToken); } - /// Gets a collection of DevBoxDefinitionResources in the DevCenter. - /// An object representing collection of DevBoxDefinitionResources and their operations over a DevBoxDefinitionResource. - public virtual DevBoxDefinitionCollection GetDevBoxDefinitions() + /// Gets a collection of DevCenterGalleryResources in the DevCenter. + /// An object representing collection of DevCenterGalleryResources and their operations over a DevCenterGalleryResource. + public virtual DevCenterGalleryCollection GetDevCenterGalleries() { - return GetCachedClient(client => new DevBoxDefinitionCollection(client, Id)); + return GetCachedClient(client => new DevCenterGalleryCollection(client, Id)); } /// - /// Gets a Dev Box definition + /// Gets a gallery. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName} /// /// /// Operation Id - /// DevBoxDefinitions_Get + /// Galleries_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Dev Box definition. + /// The name of the gallery. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevBoxDefinitionAsync(string devBoxDefinitionName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterGalleryAsync(string galleryName, CancellationToken cancellationToken = default) { - return await GetDevBoxDefinitions().GetAsync(devBoxDefinitionName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterGalleries().GetAsync(galleryName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a Dev Box definition + /// Gets a gallery. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName} /// /// /// Operation Id - /// DevBoxDefinitions_Get + /// Galleries_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Dev Box definition. + /// The name of the gallery. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevBoxDefinition(string devBoxDefinitionName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterGallery(string galleryName, CancellationToken cancellationToken = default) { - return GetDevBoxDefinitions().Get(devBoxDefinitionName, cancellationToken); + return GetDevCenterGalleries().Get(galleryName, cancellationToken); + } + + /// Gets a collection of DevCenterProjectPolicyResources in the DevCenter. + /// An object representing collection of DevCenterProjectPolicyResources and their operations over a DevCenterProjectPolicyResource. + public virtual DevCenterProjectPolicyCollection GetDevCenterProjectPolicies() + { + return GetCachedClient(client => new DevCenterProjectPolicyCollection(client, Id)); + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDevCenterProjectPolicyAsync(string projectPolicyName, CancellationToken cancellationToken = default) + { + return await GetDevCenterProjectPolicies().GetAsync(projectPolicyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a specific project policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName} + /// + /// + /// Operation Id + /// ProjectPolicies_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the project policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDevCenterProjectPolicy(string projectPolicyName, CancellationToken cancellationToken = default) + { + return GetDevCenterProjectPolicies().Get(projectPolicyName, cancellationToken); } /// @@ -454,7 +591,7 @@ public virtual Response GetDevBoxDefinition(string dev /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -494,7 +631,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -522,7 +659,7 @@ public virtual Response Get(CancellationToken cancellationTok } /// - /// Deletes a devcenter + /// Deletes a devcenter. /// /// /// Request Path @@ -534,7 +671,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -551,7 +688,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _devCenterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -564,7 +701,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes a devcenter + /// Deletes a devcenter. /// /// /// Request Path @@ -576,7 +713,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -593,7 +730,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _devCenterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -618,7 +755,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -639,7 +776,7 @@ public virtual async Task> UpdateAsync(WaitUntil try { var response = await _devCenterRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterOperationSource(Client), _devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterOperationSource(Client), _devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -664,7 +801,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -685,7 +822,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DevCe try { var response = _devCenterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterOperationSource(Client), _devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterOperationSource(Client), _devCenterClientDiagnostics, Pipeline, _devCenterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -710,22 +847,18 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DevCe /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetImagesAsync(int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetImagesByDevCenterAsync(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterImageImagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterImageImagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _devCenterImageImagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevCenterImageData.DeserializeDevCenterImageData(e), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImagesByDevCenter", "value", "nextLink", cancellationToken); } /// @@ -741,22 +874,18 @@ public virtual AsyncPageable GetImagesAsync(int? top = n /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetImages(int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetImagesByDevCenter(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _devCenterImageImagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devCenterImageImagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _devCenterImageImagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DevCenterImageData.DeserializeDevCenterImageData(e), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImagesByDevCenter", "value", "nextLink", cancellationToken); } /// @@ -772,7 +901,7 @@ public virtual Pageable GetImages(int? top = null, Cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -834,7 +963,7 @@ public virtual async Task> AddTagAsync(string key, s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -896,7 +1025,7 @@ public virtual Response AddTag(string key, string value, Canc /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -953,7 +1082,7 @@ public virtual async Task> SetTagsAsync(IDictionary< /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -1010,7 +1139,7 @@ public virtual Response SetTags(IDictionary t /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -1070,7 +1199,7 @@ public virtual async Task> RemoveTagAsync(string key /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleCollection.cs index 18ed55023117..5d77152d513b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -173,11 +173,10 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -185,7 +184,7 @@ public virtual async Task> GetAsync(string s scope.Start(); try { - var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken).ConfigureAwait(false); + var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); @@ -210,7 +209,7 @@ public virtual async Task> GetAsync(string s /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -219,11 +218,10 @@ public virtual async Task> GetAsync(string s /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual Response Get(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -231,7 +229,7 @@ public virtual Response Get(string scheduleName, int? scope.Start(); try { - var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken); + var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); @@ -244,7 +242,7 @@ public virtual Response Get(string scheduleName, int? } /// - /// Lists schedules for a pool + /// Lists schedules for a pool. /// /// /// Request Path @@ -256,7 +254,7 @@ public virtual Response Get(string scheduleName, int? /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -275,7 +273,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n } /// - /// Lists schedules for a pool + /// Lists schedules for a pool. /// /// /// Request Path @@ -287,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -318,7 +316,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -327,11 +325,10 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> ExistsAsync(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual async Task> ExistsAsync(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -339,7 +336,7 @@ public virtual async Task> ExistsAsync(string scheduleName, int? scope.Start(); try { - var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -362,7 +359,7 @@ public virtual async Task> ExistsAsync(string scheduleName, int? /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -371,11 +368,10 @@ public virtual async Task> ExistsAsync(string scheduleName, int? /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Exists(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual Response Exists(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -383,7 +379,7 @@ public virtual Response Exists(string scheduleName, int? top = null, Cance scope.Start(); try { - var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken: cancellationToken); + var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -406,7 +402,7 @@ public virtual Response Exists(string scheduleName, int? top = null, Cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -415,11 +411,10 @@ public virtual Response Exists(string scheduleName, int? top = null, Cance /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -427,7 +422,7 @@ public virtual async Task> GetIfExis scope.Start(); try { - var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); @@ -452,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -461,11 +456,10 @@ public virtual async Task> GetIfExis /// /// /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); @@ -473,7 +467,7 @@ public virtual NullableResponse GetIfExists(string sc scope.Start(); try { - var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, top, cancellationToken: cancellationToken); + var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, scheduleName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.cs index babf607fc57c..5c36d01eadfc 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -111,15 +111,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - public virtual async Task> GetAsync(int? top = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { using var scope = _devCenterScheduleSchedulesClientDiagnostics.CreateScope("DevCenterScheduleResource.Get"); scope.Start(); try { - var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, cancellationToken).ConfigureAwait(false); + var response = await _devCenterScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); @@ -144,7 +143,7 @@ public virtual async Task> GetAsync(int? top /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -152,15 +151,14 @@ public virtual async Task> GetAsync(int? top /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - public virtual Response Get(int? top = null, CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { using var scope = _devCenterScheduleSchedulesClientDiagnostics.CreateScope("DevCenterScheduleResource.Get"); scope.Start(); try { - var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, cancellationToken); + var response = _devCenterScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DevCenterScheduleResource(Client, response.Value), response.GetRawResponse()); @@ -173,7 +171,7 @@ public virtual Response Get(int? top = null, Cancella } /// - /// Deletes a Scheduled. + /// Deletes a Schedule. /// /// /// Request Path @@ -185,7 +183,7 @@ public virtual Response Get(int? top = null, Cancella /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -203,7 +201,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, int? to try { var response = await _devCenterScheduleSchedulesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(_devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -216,7 +214,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, int? to } /// - /// Deletes a Scheduled. + /// Deletes a Schedule. /// /// /// Request Path @@ -228,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, int? to /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -246,7 +244,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, int? top = null, Cancell try { var response = _devCenterScheduleSchedulesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, cancellationToken); - var operation = new DevCenterArmOperation(_devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(_devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, top).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -259,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, int? top = null, Cancell } /// - /// Partially updates a Scheduled. + /// Partially updates a Schedule. /// /// /// Request Path @@ -271,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, int? top = null, Cancell /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -293,7 +291,7 @@ public virtual async Task> UpdateAsync(W try { var response = await _devCenterScheduleSchedulesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top, cancellationToken).ConfigureAwait(false); - var operation = new DevCenterArmOperation(new DevCenterScheduleOperationSource(Client), _devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterScheduleOperationSource(Client), _devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -306,7 +304,7 @@ public virtual async Task> UpdateAsync(W } /// - /// Partially updates a Scheduled. + /// Partially updates a Schedule. /// /// /// Request Path @@ -318,7 +316,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -340,7 +338,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti try { var response = _devCenterScheduleSchedulesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top, cancellationToken); - var operation = new DevCenterArmOperation(new DevCenterScheduleOperationSource(Client), _devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new DevCenterArmOperation(new DevCenterScheduleOperationSource(Client), _devCenterScheduleSchedulesClientDiagnostics, Pipeline, _devCenterScheduleSchedulesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, top).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/DevCenterExtensions.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/DevCenterExtensions.cs index a5760a6c49e5..324bdd6b70ea 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/DevCenterExtensions.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/DevCenterExtensions.cs @@ -52,6 +52,44 @@ public static DevCenterResource GetDevCenterResource(this ArmClient client, Reso return GetMockableDevCenterArmClient(client).GetDevCenterResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterNetworkConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static HealthCheckStatusDetailResource GetHealthCheckStatusDetailResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetHealthCheckStatusDetailResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -71,6 +109,25 @@ public static DevCenterProjectResource GetDevCenterProjectResource(this ArmClien return GetMockableDevCenterArmClient(client).GetDevCenterProjectResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetAttachedNetworkConnectionResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -91,155 +148,174 @@ public static ProjectAttachedNetworkConnectionResource GetProjectAttachedNetwork } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterCatalogResource GetDevCenterCatalogResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetAttachedNetworkConnectionResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterCatalogResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterGalleryResource GetDevCenterGalleryResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterGalleryResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterProjectCatalogResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterImageResource GetDevCenterImageResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterImageResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterCatalogEnvironmentDefinitionResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ImageVersionResource GetImageVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetImageVersionResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterProjectCatalogEnvironmentDefinitionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterCatalogResource GetDevCenterCatalogResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterCatalogResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterCatalogImageDefinitionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterEnvironmentTypeResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterProjectCatalogImageDefinitionResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetAllowedEnvironmentTypeResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterCatalogImageDefinitionBuildResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterProjectEnvironmentResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterProjectCatalogImageDefinitionBuildResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CustomizationTaskResource GetCustomizationTaskResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetCustomizationTaskResource(id); } /// @@ -281,79 +357,231 @@ public static ProjectDevBoxDefinitionResource GetProjectDevBoxDefinitionResource } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterPoolResource GetDevCenterPoolResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterPoolResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterEncryptionSetResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterScheduleResource GetDevCenterScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterScheduleResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterEnvironmentTypeResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterGalleryResource GetDevCenterGalleryResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetDevCenterNetworkConnectionResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterGalleryResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static HealthCheckStatusDetailResource GetHealthCheckStatusDetailResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DevCenterImageResource GetDevCenterImageResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDevCenterArmClient(client).GetHealthCheckStatusDetailResource(id); + return GetMockableDevCenterArmClient(client).GetDevCenterImageResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterProjectImageResource GetDevCenterProjectImageResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterProjectImageResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ImageVersionResource GetImageVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetImageVersionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterProjectImageVersionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterProjectPolicyResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AllowedEnvironmentTypeResource GetAllowedEnvironmentTypeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetAllowedEnvironmentTypeResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterProjectEnvironmentResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterPoolResource GetDevCenterPoolResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterPoolResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevCenterScheduleResource GetDevCenterScheduleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDevCenterArmClient(client).GetDevCenterScheduleResource(id); } /// @@ -386,7 +614,7 @@ public static DevCenterCollection GetDevCenters(this ResourceGroupResource resou /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -395,58 +623,151 @@ public static DevCenterCollection GetDevCenters(this ResourceGroupResource resou /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the devcenter. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDevCenterAsync(this ResourceGroupResource resourceGroupResource, string devCenterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterAsync(devCenterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a devcenter. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName} + /// + /// + /// Operation Id + /// DevCenters_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the devcenter. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDevCenter(this ResourceGroupResource resourceGroupResource, string devCenterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenter(devCenterName, cancellationToken); + } + + /// + /// Gets a collection of DevCenterNetworkConnectionResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DevCenterNetworkConnectionResources and their operations over a DevCenterNetworkConnectionResource. + public static DevCenterNetworkConnectionCollection GetDevCenterNetworkConnections(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnections(); + } + + /// + /// Gets a network connection resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} + /// + /// + /// Operation Id + /// NetworkConnections_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the devcenter. + /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetDevCenterAsync(this ResourceGroupResource resourceGroupResource, string devCenterName, CancellationToken cancellationToken = default) + public static async Task> GetDevCenterNetworkConnectionAsync(this ResourceGroupResource resourceGroupResource, string networkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterAsync(devCenterName, cancellationToken).ConfigureAwait(false); + return await GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnectionAsync(networkConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a devcenter. + /// Gets a network connection resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} /// /// /// Operation Id - /// DevCenters_Get + /// NetworkConnections_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the devcenter. + /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetDevCenter(this ResourceGroupResource resourceGroupResource, string devCenterName, CancellationToken cancellationToken = default) + public static Response GetDevCenterNetworkConnection(this ResourceGroupResource resourceGroupResource, string networkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenter(devCenterName, cancellationToken); + return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnection(networkConnectionName, cancellationToken); } /// @@ -479,7 +800,7 @@ public static DevCenterProjectCollection GetDevCenterProjects(this ResourceGroup /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -517,7 +838,7 @@ public static async Task> GetDevCenterProject /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -543,244 +864,205 @@ public static Response GetDevCenterProject(this Resour } /// - /// Gets a collection of DevCenterNetworkConnectionResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of DevCenterNetworkConnectionResources and their operations over a DevCenterNetworkConnectionResource. - public static DevCenterNetworkConnectionCollection GetDevCenterNetworkConnections(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnections(); - } - - /// - /// Gets a network connection resource + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability /// /// /// Operation Id - /// NetworkConnections_Get + /// CheckNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the Network Connection that can be applied to a Pool. + /// The instance the method will execute against. + /// The request body. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetDevCenterNetworkConnectionAsync(this ResourceGroupResource resourceGroupResource, string networkConnectionName, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> CheckDevCenterNameAvailabilityAsync(this SubscriptionResource subscriptionResource, DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnectionAsync(networkConnectionName, cancellationToken).ConfigureAwait(false); + return await GetMockableDevCenterSubscriptionResource(subscriptionResource).CheckDevCenterNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// Gets a network connection resource + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability /// /// /// Operation Id - /// NetworkConnections_Get + /// CheckNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the Network Connection that can be applied to a Pool. + /// The instance the method will execute against. + /// The request body. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetDevCenterNetworkConnection(this ResourceGroupResource resourceGroupResource, string networkConnectionName, CancellationToken cancellationToken = default) + /// or is null. + public static Response CheckDevCenterNameAvailability(this SubscriptionResource subscriptionResource, DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterResourceGroupResource(resourceGroupResource).GetDevCenterNetworkConnection(networkConnectionName, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).CheckDevCenterNameAvailability(content, cancellationToken); } /// - /// Lists all devcenters in a subscription. + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability /// /// /// Operation Id - /// DevCenters_ListBySubscription + /// CheckScopedNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The request body. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDevCentersAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteCheckScopedNameAvailabilityAsync(this SubscriptionResource subscriptionResource, CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCentersAsync(top, cancellationToken); + return await GetMockableDevCenterSubscriptionResource(subscriptionResource).ExecuteCheckScopedNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// Lists all devcenters in a subscription. + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability /// /// /// Operation Id - /// DevCenters_ListBySubscription + /// CheckScopedNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The request body. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDevCenters(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteCheckScopedNameAvailability(this SubscriptionResource subscriptionResource, CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenters(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).ExecuteCheckScopedNameAvailability(content, cancellationToken); } /// - /// Lists all projects in the subscription. + /// Lists all devcenters in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters /// /// /// Operation Id - /// Projects_ListBySubscription + /// DevCenters_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDevCenterProjectsAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDevCentersAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterProjectsAsync(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCentersAsync(top, cancellationToken); } /// - /// Lists all projects in the subscription. + /// Lists all devcenters in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters /// /// /// Operation Id - /// Projects_ListBySubscription + /// DevCenters_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDevCenterProjects(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDevCenters(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterProjects(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenters(top, cancellationToken); } /// @@ -796,7 +1078,7 @@ public static Pageable GetDevCenterProjects(this Subsc /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// @@ -805,7 +1087,7 @@ public static Pageable GetDevCenterProjects(this Subsc /// /// /// The instance the method will execute against. - /// The Azure region. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -830,7 +1112,7 @@ public static async Task> GetDevCenterOperati /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// @@ -839,7 +1121,7 @@ public static async Task> GetDevCenterOperati /// /// /// The instance the method will execute against. - /// The Azure region. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -864,7 +1146,7 @@ public static Response GetDevCenterOperationStatus(thi /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// @@ -873,7 +1155,7 @@ public static Response GetDevCenterOperationStatus(thi /// /// /// The instance the method will execute against. - /// The Azure region. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. @@ -897,7 +1179,7 @@ public static AsyncPageable GetDevCenterUsagesByLocationAsync(th /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// @@ -906,7 +1188,7 @@ public static AsyncPageable GetDevCenterUsagesByLocationAsync(th /// /// /// The instance the method will execute against. - /// The Azure region. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. @@ -918,207 +1200,217 @@ public static Pageable GetDevCenterUsagesByLocation(this Subscri } /// - /// Check the availability of name for resource + /// Lists network connections in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// NetworkConnections_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The required parameters for checking if resource name is available. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// or is null. - public static async Task> CheckDevCenterNameAvailabilityAsync(this SubscriptionResource subscriptionResource, DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDevCenterNetworkConnectionsAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableDevCenterSubscriptionResource(subscriptionResource).CheckDevCenterNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterNetworkConnectionsAsync(top, cancellationToken); } /// - /// Check the availability of name for resource + /// Lists network connections in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// NetworkConnections_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The required parameters for checking if resource name is available. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// or is null. - public static Response CheckDevCenterNameAvailability(this SubscriptionResource subscriptionResource, DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDevCenterNetworkConnections(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).CheckDevCenterNameAvailability(content, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterNetworkConnections(top, cancellationToken); } /// - /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// Lists all projects in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects /// /// /// Operation Id - /// Skus_ListBySubscription + /// Projects_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDevCenterSkusBySubscriptionAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDevCenterProjectsAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterSkusBySubscriptionAsync(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterProjectsAsync(top, cancellationToken); } /// - /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// Lists all projects in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects /// /// /// Operation Id - /// Skus_ListBySubscription + /// Projects_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDevCenterSkusBySubscription(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDevCenterProjects(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterSkusBySubscription(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterProjects(top, cancellationToken); } /// - /// Lists network connections in a subscription + /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus /// /// /// Operation Id - /// NetworkConnections_ListBySubscription + /// Skus_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDevCenterNetworkConnectionsAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDevCenterSkusBySubscriptionAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterNetworkConnectionsAsync(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterSkusBySubscriptionAsync(top, cancellationToken); } /// - /// Lists network connections in a subscription + /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus /// /// /// Operation Id - /// NetworkConnections_ListBySubscription + /// Skus_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDevCenterNetworkConnections(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDevCenterSkusBySubscription(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterNetworkConnections(top, cancellationToken); + return GetMockableDevCenterSubscriptionResource(subscriptionResource).GetDevCenterSkusBySubscription(top, cancellationToken); } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterArmClient.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterArmClient.cs index 22a037439583..e50f8024935b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterArmClient.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterArmClient.cs @@ -46,6 +46,30 @@ public virtual DevCenterResource GetDevCenterResource(ResourceIdentifier id) return new DevCenterResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(ResourceIdentifier id) + { + DevCenterNetworkConnectionResource.ValidateResourceId(id); + return new DevCenterNetworkConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual HealthCheckStatusDetailResource GetHealthCheckStatusDetailResource(ResourceIdentifier id) + { + HealthCheckStatusDetailResource.ValidateResourceId(id); + return new HealthCheckStatusDetailResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -58,6 +82,18 @@ public virtual DevCenterProjectResource GetDevCenterProjectResource(ResourceIden return new DevCenterProjectResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(ResourceIdentifier id) + { + AttachedNetworkConnectionResource.ValidateResourceId(id); + return new AttachedNetworkConnectionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -71,15 +107,159 @@ public virtual ProjectAttachedNetworkConnectionResource GetProjectAttachedNetwor } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual AttachedNetworkConnectionResource GetAttachedNetworkConnectionResource(ResourceIdentifier id) + /// Returns a object. + public virtual DevCenterCatalogResource GetDevCenterCatalogResource(ResourceIdentifier id) { - AttachedNetworkConnectionResource.ValidateResourceId(id); - return new AttachedNetworkConnectionResource(Client, id); + DevCenterCatalogResource.ValidateResourceId(id); + return new DevCenterCatalogResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterProjectCatalogResource GetDevCenterProjectCatalogResource(ResourceIdentifier id) + { + DevCenterProjectCatalogResource.ValidateResourceId(id); + return new DevCenterProjectCatalogResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterCatalogEnvironmentDefinitionResource GetDevCenterCatalogEnvironmentDefinitionResource(ResourceIdentifier id) + { + DevCenterCatalogEnvironmentDefinitionResource.ValidateResourceId(id); + return new DevCenterCatalogEnvironmentDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterProjectCatalogEnvironmentDefinitionResource GetDevCenterProjectCatalogEnvironmentDefinitionResource(ResourceIdentifier id) + { + DevCenterProjectCatalogEnvironmentDefinitionResource.ValidateResourceId(id); + return new DevCenterProjectCatalogEnvironmentDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterCatalogImageDefinitionResource GetDevCenterCatalogImageDefinitionResource(ResourceIdentifier id) + { + DevCenterCatalogImageDefinitionResource.ValidateResourceId(id); + return new DevCenterCatalogImageDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterProjectCatalogImageDefinitionResource GetDevCenterProjectCatalogImageDefinitionResource(ResourceIdentifier id) + { + DevCenterProjectCatalogImageDefinitionResource.ValidateResourceId(id); + return new DevCenterProjectCatalogImageDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterCatalogImageDefinitionBuildResource GetDevCenterCatalogImageDefinitionBuildResource(ResourceIdentifier id) + { + DevCenterCatalogImageDefinitionBuildResource.ValidateResourceId(id); + return new DevCenterCatalogImageDefinitionBuildResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterProjectCatalogImageDefinitionBuildResource GetDevCenterProjectCatalogImageDefinitionBuildResource(ResourceIdentifier id) + { + DevCenterProjectCatalogImageDefinitionBuildResource.ValidateResourceId(id); + return new DevCenterProjectCatalogImageDefinitionBuildResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CustomizationTaskResource GetCustomizationTaskResource(ResourceIdentifier id) + { + CustomizationTaskResource.ValidateResourceId(id); + return new CustomizationTaskResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevBoxDefinitionResource GetDevBoxDefinitionResource(ResourceIdentifier id) + { + DevBoxDefinitionResource.ValidateResourceId(id); + return new DevBoxDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ProjectDevBoxDefinitionResource GetProjectDevBoxDefinitionResource(ResourceIdentifier id) + { + ProjectDevBoxDefinitionResource.ValidateResourceId(id); + return new ProjectDevBoxDefinitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterEncryptionSetResource GetDevCenterEncryptionSetResource(ResourceIdentifier id) + { + DevCenterEncryptionSetResource.ValidateResourceId(id); + return new DevCenterEncryptionSetResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(ResourceIdentifier id) + { + DevCenterEnvironmentTypeResource.ValidateResourceId(id); + return new DevCenterEnvironmentTypeResource(Client, id); } /// @@ -106,6 +286,18 @@ public virtual DevCenterImageResource GetDevCenterImageResource(ResourceIdentifi return new DevCenterImageResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevCenterProjectImageResource GetDevCenterProjectImageResource(ResourceIdentifier id) + { + DevCenterProjectImageResource.ValidateResourceId(id); + return new DevCenterProjectImageResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -119,27 +311,27 @@ public virtual ImageVersionResource GetImageVersionResource(ResourceIdentifier i } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevCenterCatalogResource GetDevCenterCatalogResource(ResourceIdentifier id) + /// Returns a object. + public virtual DevCenterProjectImageVersionResource GetDevCenterProjectImageVersionResource(ResourceIdentifier id) { - DevCenterCatalogResource.ValidateResourceId(id); - return new DevCenterCatalogResource(Client, id); + DevCenterProjectImageVersionResource.ValidateResourceId(id); + return new DevCenterProjectImageVersionResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevCenterEnvironmentTypeResource GetDevCenterEnvironmentTypeResource(ResourceIdentifier id) + /// Returns a object. + public virtual DevCenterProjectPolicyResource GetDevCenterProjectPolicyResource(ResourceIdentifier id) { - DevCenterEnvironmentTypeResource.ValidateResourceId(id); - return new DevCenterEnvironmentTypeResource(Client, id); + DevCenterProjectPolicyResource.ValidateResourceId(id); + return new DevCenterProjectPolicyResource(Client, id); } /// @@ -166,30 +358,6 @@ public virtual DevCenterProjectEnvironmentResource GetDevCenterProjectEnvironmen return new DevCenterProjectEnvironmentResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevBoxDefinitionResource GetDevBoxDefinitionResource(ResourceIdentifier id) - { - DevBoxDefinitionResource.ValidateResourceId(id); - return new DevBoxDefinitionResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ProjectDevBoxDefinitionResource GetProjectDevBoxDefinitionResource(ResourceIdentifier id) - { - ProjectDevBoxDefinitionResource.ValidateResourceId(id); - return new ProjectDevBoxDefinitionResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -213,29 +381,5 @@ public virtual DevCenterScheduleResource GetDevCenterScheduleResource(ResourceId DevCenterScheduleResource.ValidateResourceId(id); return new DevCenterScheduleResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevCenterNetworkConnectionResource GetDevCenterNetworkConnectionResource(ResourceIdentifier id) - { - DevCenterNetworkConnectionResource.ValidateResourceId(id); - return new DevCenterNetworkConnectionResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual HealthCheckStatusDetailResource GetHealthCheckStatusDetailResource(ResourceIdentifier id) - { - HealthCheckStatusDetailResource.ValidateResourceId(id); - return new HealthCheckStatusDetailResource(Client, id); - } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterResourceGroupResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterResourceGroupResource.cs index 1d9171ee8605..f1dc778badfd 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterResourceGroupResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual DevCenterCollection GetDevCenters() /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetDevCenterAsync(string /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -102,142 +102,142 @@ public virtual Response GetDevCenter(string devCenterName, Ca return GetDevCenters().Get(devCenterName, cancellationToken); } - /// Gets a collection of DevCenterProjectResources in the ResourceGroupResource. - /// An object representing collection of DevCenterProjectResources and their operations over a DevCenterProjectResource. - public virtual DevCenterProjectCollection GetDevCenterProjects() + /// Gets a collection of DevCenterNetworkConnectionResources in the ResourceGroupResource. + /// An object representing collection of DevCenterNetworkConnectionResources and their operations over a DevCenterNetworkConnectionResource. + public virtual DevCenterNetworkConnectionCollection GetDevCenterNetworkConnections() { - return GetCachedClient(client => new DevCenterProjectCollection(client, Id)); + return GetCachedClient(client => new DevCenterNetworkConnectionCollection(client, Id)); } /// - /// Gets a specific project. + /// Gets a network connection resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} /// /// /// Operation Id - /// Projects_Get + /// NetworkConnections_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the project. + /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterProjectAsync(string projectName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterNetworkConnectionAsync(string networkConnectionName, CancellationToken cancellationToken = default) { - return await GetDevCenterProjects().GetAsync(projectName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterNetworkConnections().GetAsync(networkConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a specific project. + /// Gets a network connection resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} /// /// /// Operation Id - /// Projects_Get + /// NetworkConnections_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the project. + /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterProject(string projectName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterNetworkConnection(string networkConnectionName, CancellationToken cancellationToken = default) { - return GetDevCenterProjects().Get(projectName, cancellationToken); + return GetDevCenterNetworkConnections().Get(networkConnectionName, cancellationToken); } - /// Gets a collection of DevCenterNetworkConnectionResources in the ResourceGroupResource. - /// An object representing collection of DevCenterNetworkConnectionResources and their operations over a DevCenterNetworkConnectionResource. - public virtual DevCenterNetworkConnectionCollection GetDevCenterNetworkConnections() + /// Gets a collection of DevCenterProjectResources in the ResourceGroupResource. + /// An object representing collection of DevCenterProjectResources and their operations over a DevCenterProjectResource. + public virtual DevCenterProjectCollection GetDevCenterProjects() { - return GetCachedClient(client => new DevCenterNetworkConnectionCollection(client, Id)); + return GetCachedClient(client => new DevCenterProjectCollection(client, Id)); } /// - /// Gets a network connection resource + /// Gets a specific project. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName} /// /// /// Operation Id - /// NetworkConnections_Get + /// Projects_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Network Connection that can be applied to a Pool. + /// The name of the project. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDevCenterNetworkConnectionAsync(string networkConnectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetDevCenterProjectAsync(string projectName, CancellationToken cancellationToken = default) { - return await GetDevCenterNetworkConnections().GetAsync(networkConnectionName, cancellationToken).ConfigureAwait(false); + return await GetDevCenterProjects().GetAsync(projectName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a network connection resource + /// Gets a specific project. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName} /// /// /// Operation Id - /// NetworkConnections_Get + /// Projects_Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Network Connection that can be applied to a Pool. + /// The name of the project. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDevCenterNetworkConnection(string networkConnectionName, CancellationToken cancellationToken = default) + public virtual Response GetDevCenterProject(string projectName, CancellationToken cancellationToken = default) { - return GetDevCenterNetworkConnections().Get(networkConnectionName, cancellationToken); + return GetDevCenterProjects().Get(projectName, cancellationToken); } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterSubscriptionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterSubscriptionResource.cs index 7d643e548966..2ade06559d42 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterSubscriptionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Extensions/MockableDevCenterSubscriptionResource.cs @@ -18,20 +18,22 @@ namespace Azure.ResourceManager.DevCenter.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableDevCenterSubscriptionResource : ArmResource { + private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; + private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; + private ClientDiagnostics _checkScopedNameAvailabilityClientDiagnostics; + private CheckScopedNameAvailabilityRestOperations _checkScopedNameAvailabilityRestClient; private ClientDiagnostics _devCenterClientDiagnostics; private DevCentersRestOperations _devCenterRestClient; - private ClientDiagnostics _devCenterProjectProjectsClientDiagnostics; - private ProjectsRestOperations _devCenterProjectProjectsRestClient; private ClientDiagnostics _operationStatusesClientDiagnostics; private OperationStatusesRestOperations _operationStatusesRestClient; private ClientDiagnostics _usagesClientDiagnostics; private UsagesRestOperations _usagesRestClient; - private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; - private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; - private ClientDiagnostics _skusClientDiagnostics; - private SkusRestOperations _skusRestClient; private ClientDiagnostics _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics; private NetworkConnectionsRestOperations _devCenterNetworkConnectionNetworkConnectionsRestClient; + private ClientDiagnostics _devCenterProjectProjectsClientDiagnostics; + private ProjectsRestOperations _devCenterProjectProjectsRestClient; + private ClientDiagnostics _skusClientDiagnostics; + private SkusRestOperations _skusRestClient; /// Initializes a new instance of the class for mocking. protected MockableDevCenterSubscriptionResource() @@ -45,20 +47,22 @@ internal MockableDevCenterSubscriptionResource(ArmClient client, ResourceIdentif { } + private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics CheckScopedNameAvailabilityClientDiagnostics => _checkScopedNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckScopedNameAvailabilityRestOperations CheckScopedNameAvailabilityRestClient => _checkScopedNameAvailabilityRestClient ??= new CheckScopedNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics DevCenterClientDiagnostics => _devCenterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterResource.ResourceType.Namespace, Diagnostics); private DevCentersRestOperations DevCenterRestClient => _devCenterRestClient ??= new DevCentersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DevCenterResource.ResourceType)); - private ClientDiagnostics DevCenterProjectProjectsClientDiagnostics => _devCenterProjectProjectsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectResource.ResourceType.Namespace, Diagnostics); - private ProjectsRestOperations DevCenterProjectProjectsRestClient => _devCenterProjectProjectsRestClient ??= new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DevCenterProjectResource.ResourceType)); private ClientDiagnostics OperationStatusesClientDiagnostics => _operationStatusesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); private OperationStatusesRestOperations OperationStatusesRestClient => _operationStatusesRestClient ??= new OperationStatusesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics UsagesClientDiagnostics => _usagesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); private UsagesRestOperations UsagesRestClient => _usagesRestClient ??= new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics DevCenterNetworkConnectionNetworkConnectionsClientDiagnostics => _devCenterNetworkConnectionNetworkConnectionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterNetworkConnectionResource.ResourceType.Namespace, Diagnostics); private NetworkConnectionsRestOperations DevCenterNetworkConnectionNetworkConnectionsRestClient => _devCenterNetworkConnectionNetworkConnectionsRestClient ??= new NetworkConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DevCenterNetworkConnectionResource.ResourceType)); + private ClientDiagnostics DevCenterProjectProjectsClientDiagnostics => _devCenterProjectProjectsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", DevCenterProjectResource.ResourceType.Namespace, Diagnostics); + private ProjectsRestOperations DevCenterProjectProjectsRestClient => _devCenterProjectProjectsRestClient ??= new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DevCenterProjectResource.ResourceType)); + private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DevCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -67,127 +71,217 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Lists all devcenters in a subscription. + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability /// /// /// Operation Id - /// DevCenters_ListBySubscription + /// CheckNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckDevCenterNameAvailabilityAsync(DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.CheckDevCenterNameAvailability"); + scope.Start(); + try + { + var response = await CheckNameAvailabilityRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the availability of name for resource. + /// /// - /// Resource - /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability_Execute + /// + /// + /// Default Api Version + /// 2025-07-01-preview /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The request body. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDevCentersAsync(int? top = null, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CheckDevCenterNameAvailability(DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterResource(Client, DevCenterData.DeserializeDevCenterData(e)), DevCenterClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenters", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.CheckDevCenterNameAvailability"); + scope.Start(); + try + { + var response = CheckNameAvailabilityRestClient.Execute(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists all devcenters in a subscription. + /// Check the availability of name for resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability /// /// /// Operation Id - /// DevCenters_ListBySubscription + /// CheckScopedNameAvailability_Execute /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> ExecuteCheckScopedNameAvailabilityAsync(CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckScopedNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.ExecuteCheckScopedNameAvailability"); + scope.Start(); + try + { + var response = await CheckScopedNameAvailabilityRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the availability of name for resource. + /// /// - /// Resource - /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability + /// + /// + /// Operation Id + /// CheckScopedNameAvailability_Execute + /// + /// + /// Default Api Version + /// 2025-07-01-preview /// /// /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The request body. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDevCenters(int? top = null, CancellationToken cancellationToken = default) + /// is null. + public virtual Response ExecuteCheckScopedNameAvailability(CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterResource(Client, DevCenterData.DeserializeDevCenterData(e)), DevCenterClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenters", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckScopedNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.ExecuteCheckScopedNameAvailability"); + scope.Start(); + try + { + var response = CheckScopedNameAvailabilityRestClient.Execute(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists all projects in the subscription. + /// Lists all devcenters in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters /// /// /// Operation Id - /// Projects_ListBySubscription + /// DevCenters_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDevCenterProjectsAsync(int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDevCentersAsync(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectResource(Client, DevCenterProjectData.DeserializeDevCenterProjectData(e)), DevCenterProjectProjectsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterProjects", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterResource(Client, DevCenterData.DeserializeDevCenterData(e)), DevCenterClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenters", "value", "nextLink", cancellationToken); } /// - /// Lists all projects in the subscription. + /// Lists all devcenters in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters /// /// /// Operation Id - /// Projects_ListBySubscription + /// DevCenters_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDevCenterProjects(int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDevCenters(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectResource(Client, DevCenterProjectData.DeserializeDevCenterProjectData(e)), DevCenterProjectProjectsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterProjects", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterResource(Client, DevCenterData.DeserializeDevCenterData(e)), DevCenterClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenters", "value", "nextLink", cancellationToken); } /// @@ -203,11 +297,11 @@ public virtual Pageable GetDevCenterProjects(int? top /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// - /// The Azure region. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -243,11 +337,11 @@ public virtual async Task> GetDevCenterOperat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// - /// The Azure region. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -283,11 +377,11 @@ public virtual Response GetDevCenterOperationStatus(Az /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// - /// The Azure region. + /// The name of the Azure region. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetDevCenterUsagesByLocationAsync(AzureLocation location, CancellationToken cancellationToken = default) @@ -310,11 +404,11 @@ public virtual AsyncPageable GetDevCenterUsagesByLocationAsync(A /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// - /// The Azure region. + /// The name of the Azure region. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetDevCenterUsagesByLocation(AzureLocation location, CancellationToken cancellationToken = default) @@ -325,195 +419,181 @@ public virtual Pageable GetDevCenterUsagesByLocation(AzureLocati } /// - /// Check the availability of name for resource + /// Lists network connections in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// NetworkConnections_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The required parameters for checking if resource name is available. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// is null. - public virtual async Task> CheckDevCenterNameAvailabilityAsync(DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDevCenterNetworkConnectionsAsync(int? top = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.CheckDevCenterNameAvailability"); - scope.Start(); - try - { - var response = await CheckNameAvailabilityRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterNetworkConnectionResource(Client, DevCenterNetworkConnectionData.DeserializeDevCenterNetworkConnectionData(e)), DevCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterNetworkConnections", "value", "nextLink", cancellationToken); } /// - /// Check the availability of name for resource + /// Lists network connections in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// NetworkConnections_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The required parameters for checking if resource name is available. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// is null. - public virtual Response CheckDevCenterNameAvailability(DevCenterNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDevCenterNetworkConnections(int? top = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableDevCenterSubscriptionResource.CheckDevCenterNameAvailability"); - scope.Start(); - try - { - var response = CheckNameAvailabilityRestClient.Execute(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterNetworkConnectionResource(Client, DevCenterNetworkConnectionData.DeserializeDevCenterNetworkConnectionData(e)), DevCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterNetworkConnections", "value", "nextLink", cancellationToken); } /// - /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// Lists all projects in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects /// /// /// Operation Id - /// Skus_ListBySubscription + /// Projects_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDevCenterSkusBySubscriptionAsync(int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDevCenterProjectsAsync(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), SkusClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterSkusBySubscription", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectResource(Client, DevCenterProjectData.DeserializeDevCenterProjectData(e)), DevCenterProjectProjectsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterProjects", "value", "nextLink", cancellationToken); } /// - /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// Lists all projects in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects /// /// /// Operation Id - /// Skus_ListBySubscription + /// Projects_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview + /// + /// + /// Resource + /// /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDevCenterSkusBySubscription(int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDevCenterProjects(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), SkusClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterSkusBySubscription", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterProjectProjectsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterProjectResource(Client, DevCenterProjectData.DeserializeDevCenterProjectData(e)), DevCenterProjectProjectsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterProjects", "value", "nextLink", cancellationToken); } /// - /// Lists network connections in a subscription + /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus /// /// /// Operation Id - /// NetworkConnections_ListBySubscription + /// Skus_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDevCenterNetworkConnectionsAsync(int? top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDevCenterSkusBySubscriptionAsync(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterNetworkConnectionResource(Client, DevCenterNetworkConnectionData.DeserializeDevCenterNetworkConnectionData(e)), DevCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterNetworkConnections", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), SkusClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterSkusBySubscription", "value", "nextLink", cancellationToken); } /// - /// Lists network connections in a subscription + /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus /// /// /// Operation Id - /// NetworkConnections_ListBySubscription + /// Skus_ListBySubscription /// /// /// Default Api Version - /// 2023-04-01 - /// - /// - /// Resource - /// + /// 2025-07-01-preview /// /// /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDevCenterNetworkConnections(int? top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDevCenterSkusBySubscription(int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DevCenterNetworkConnectionNetworkConnectionsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterNetworkConnectionResource(Client, DevCenterNetworkConnectionData.DeserializeDevCenterNetworkConnectionData(e)), DevCenterNetworkConnectionNetworkConnectionsClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterNetworkConnections", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DevCenterSkuDetails.DeserializeDevCenterSkuDetails(e), SkusClientDiagnostics, Pipeline, "MockableDevCenterSubscriptionResource.GetDevCenterSkusBySubscription", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.cs index 367d206ed524..13a4f3349b71 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionCollection.cs index 1301d5995ee2..524fbaa253d0 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string versio /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string versionName, Cancellati /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string versionName, Cancel /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string versionName, CancellationToken cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.cs index 3cc00c002fc2..a3b49502d5c5 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterEncryptionSetOperationSource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterEncryptionSetOperationSource.cs new file mode 100644 index 000000000000..b01ae6aa41d1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterEncryptionSetOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter +{ + internal class DevCenterEncryptionSetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DevCenterEncryptionSetOperationSource(ArmClient client) + { + _client = client; + } + + DevCenterEncryptionSetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return new DevCenterEncryptionSetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return await Task.FromResult(new DevCenterEncryptionSetResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectCatalogOperationSource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectCatalogOperationSource.cs new file mode 100644 index 000000000000..21f2aedbf4cd --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectCatalogOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter +{ + internal class DevCenterProjectCatalogOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DevCenterProjectCatalogOperationSource(ArmClient client) + { + _client = client; + } + + DevCenterProjectCatalogResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return new DevCenterProjectCatalogResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return await Task.FromResult(new DevCenterProjectCatalogResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectPolicyOperationSource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectPolicyOperationSource.cs new file mode 100644 index 000000000000..c24675c89560 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/LongRunningOperation/DevCenterProjectPolicyOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter +{ + internal class DevCenterProjectPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DevCenterProjectPolicyOperationSource(ArmClient client) + { + _client = client; + } + + DevCenterProjectPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return new DevCenterProjectPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDevCenterContext.Default); + return await Task.FromResult(new DevCenterProjectPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.Serialization.cs new file mode 100644 index 000000000000..33d0c18cdc69 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ActiveHoursConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveHoursConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeepAwakeEnableStatus)) + { + writer.WritePropertyName("keepAwakeEnableStatus"u8); + writer.WriteStringValue(KeepAwakeEnableStatus.Value.ToString()); + } + if (Optional.IsDefined(AutoStartEnableStatus)) + { + writer.WritePropertyName("autoStartEnableStatus"u8); + writer.WriteStringValue(AutoStartEnableStatus.Value.ToString()); + } + if (Optional.IsDefined(DefaultTimeZone)) + { + writer.WritePropertyName("defaultTimeZone"u8); + writer.WriteStringValue(DefaultTimeZone); + } + if (Optional.IsDefined(DefaultStartTimeHour)) + { + writer.WritePropertyName("defaultStartTimeHour"u8); + writer.WriteNumberValue(DefaultStartTimeHour.Value); + } + if (Optional.IsDefined(DefaultEndTimeHour)) + { + writer.WritePropertyName("defaultEndTimeHour"u8); + writer.WriteNumberValue(DefaultEndTimeHour.Value); + } + if (Optional.IsCollectionDefined(DefaultDaysOfWeek)) + { + writer.WritePropertyName("defaultDaysOfWeek"u8); + writer.WriteStartArray(); + foreach (var item in DefaultDaysOfWeek) + { + writer.WriteStringValue(item.ToSerialString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DaysOfWeekLimit)) + { + writer.WritePropertyName("daysOfWeekLimit"u8); + writer.WriteNumberValue(DaysOfWeekLimit.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ActiveHoursConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveHoursConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveHoursConfiguration(document.RootElement, options); + } + + internal static ActiveHoursConfiguration DeserializeActiveHoursConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KeepAwakeEnableStatus? keepAwakeEnableStatus = default; + AutoStartEnableStatus? autoStartEnableStatus = default; + string defaultTimeZone = default; + int? defaultStartTimeHour = default; + int? defaultEndTimeHour = default; + IList defaultDaysOfWeek = default; + int? daysOfWeekLimit = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keepAwakeEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keepAwakeEnableStatus = new KeepAwakeEnableStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("autoStartEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoStartEnableStatus = new AutoStartEnableStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("defaultTimeZone"u8)) + { + defaultTimeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultStartTimeHour"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultStartTimeHour = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("defaultEndTimeHour"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultEndTimeHour = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("defaultDaysOfWeek"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString().ToDayOfWeek()); + } + defaultDaysOfWeek = array; + continue; + } + if (property.NameEquals("daysOfWeekLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + daysOfWeekLimit = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveHoursConfiguration( + keepAwakeEnableStatus, + autoStartEnableStatus, + defaultTimeZone, + defaultStartTimeHour, + defaultEndTimeHour, + defaultDaysOfWeek ?? new ChangeTrackingList(), + daysOfWeekLimit, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveHoursConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ActiveHoursConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveHoursConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveHoursConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.cs new file mode 100644 index 000000000000..92858920fa8d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ActiveHoursConfiguration.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Active hours configuration. + public partial class ActiveHoursConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ActiveHoursConfiguration() + { + DefaultDaysOfWeek = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// The default IANA timezone id of the active hours. + /// The default start time of the active hours. + /// The default end time of the active hours. + /// The days of the week that active hours features will be enabled. This serves as a default that can be updated by each individual user. + /// The maximum amount of days per week that a user can enable active hours related features. + /// Keeps track of any properties unknown to the library. + internal ActiveHoursConfiguration(KeepAwakeEnableStatus? keepAwakeEnableStatus, AutoStartEnableStatus? autoStartEnableStatus, string defaultTimeZone, int? defaultStartTimeHour, int? defaultEndTimeHour, IList defaultDaysOfWeek, int? daysOfWeekLimit, IDictionary serializedAdditionalRawData) + { + KeepAwakeEnableStatus = keepAwakeEnableStatus; + AutoStartEnableStatus = autoStartEnableStatus; + DefaultTimeZone = defaultTimeZone; + DefaultStartTimeHour = defaultStartTimeHour; + DefaultEndTimeHour = defaultEndTimeHour; + DefaultDaysOfWeek = defaultDaysOfWeek; + DaysOfWeekLimit = daysOfWeekLimit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enables or disables whether the Dev Box should be kept awake during active hours. + public KeepAwakeEnableStatus? KeepAwakeEnableStatus { get; set; } + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + public AutoStartEnableStatus? AutoStartEnableStatus { get; set; } + /// The default IANA timezone id of the active hours. + public string DefaultTimeZone { get; set; } + /// The default start time of the active hours. + public int? DefaultStartTimeHour { get; set; } + /// The default end time of the active hours. + public int? DefaultEndTimeHour { get; set; } + /// The days of the week that active hours features will be enabled. This serves as a default that can be updated by each individual user. + public IList DefaultDaysOfWeek { get; } + /// The maximum amount of days per week that a user can enable active hours related features. + public int? DaysOfWeekLimit { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.Serialization.cs index 20a7ea1879a5..dedb8878366b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AllowedEnvironmentTypeListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static AllowedEnvironmentTypeListResult DeserializeAllowedEnvironmentTy return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static AllowedEnvironmentTypeListResult DeserializeAllowedEnvironmentTy } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static AllowedEnvironmentTypeListResult DeserializeAllowedEnvironmentTy } } serializedAdditionalRawData = rawDataDictionary; - return new AllowedEnvironmentTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AllowedEnvironmentTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.cs index 71ec2102b267..f965d93952f4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AllowedEnvironmentTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the allowed environment type list operation. + /// Paged collection of AllowedEnvironmentType items. internal partial class AllowedEnvironmentTypeListResult { /// @@ -46,25 +47,31 @@ internal partial class AllowedEnvironmentTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AllowedEnvironmentTypeListResult() + /// The AllowedEnvironmentType items on this page. + internal AllowedEnvironmentTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The AllowedEnvironmentType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AllowedEnvironmentTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AllowedEnvironmentTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal AllowedEnvironmentTypeListResult() + { + } + + /// The AllowedEnvironmentType items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.Serialization.cs index d30b3fc46e3e..3a53a55d94d3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AttachedNetworkListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static AttachedNetworkListResult DeserializeAttachedNetworkListResult(J return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static AttachedNetworkListResult DeserializeAttachedNetworkListResult(J } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static AttachedNetworkListResult DeserializeAttachedNetworkListResult(J } } serializedAdditionalRawData = rawDataDictionary; - return new AttachedNetworkListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AttachedNetworkListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.cs index 1ea06d37f784..0438521ec48b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AttachedNetworkListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the Attached Networks list operation. + /// Paged collection of AttachedNetworkConnection items. internal partial class AttachedNetworkListResult { /// @@ -46,25 +47,31 @@ internal partial class AttachedNetworkListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AttachedNetworkListResult() + /// The AttachedNetworkConnection items on this page. + internal AttachedNetworkListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The AttachedNetworkConnection items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AttachedNetworkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AttachedNetworkListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal AttachedNetworkListResult() + { + } + + /// The AttachedNetworkConnection items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoImageBuildStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoImageBuildStatus.cs new file mode 100644 index 000000000000..86626b046c5d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoImageBuildStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether auto image build is enabled/disabled. + public readonly partial struct AutoImageBuildStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoImageBuildStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Auto image build is disabled. + public static AutoImageBuildStatus Disabled { get; } = new AutoImageBuildStatus(DisabledValue); + /// Auto image build is enabled. + public static AutoImageBuildStatus Enabled { get; } = new AutoImageBuildStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(AutoImageBuildStatus left, AutoImageBuildStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoImageBuildStatus left, AutoImageBuildStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoImageBuildStatus(string value) => new AutoImageBuildStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoImageBuildStatus other && Equals(other); + /// + public bool Equals(AutoImageBuildStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoStartEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoStartEnableStatus.cs new file mode 100644 index 000000000000..56aa6b722d63 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AutoStartEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Enables or disables whether Dev Boxes should be automatically started at commencement of active hours. + public readonly partial struct AutoStartEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoStartEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Auto start is enabled. + public static AutoStartEnableStatus Enabled { get; } = new AutoStartEnableStatus(EnabledValue); + /// Auto start is disabled. + public static AutoStartEnableStatus Disabled { get; } = new AutoStartEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(AutoStartEnableStatus left, AutoStartEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoStartEnableStatus left, AutoStartEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoStartEnableStatus(string value) => new AutoStartEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoStartEnableStatus other && Equals(other); + /// + public bool Equals(AutoStartEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesMode.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesMode.cs new file mode 100644 index 000000000000..f21be4ff92e4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether Azure AI services are enabled for a project. + public readonly partial struct AzureAiServicesMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureAiServicesMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string AutoDeployValue = "AutoDeploy"; + + /// Azure AI services are disabled for this project. + public static AzureAiServicesMode Disabled { get; } = new AzureAiServicesMode(DisabledValue); + /// Azure AI services are enabled for this project and necessary resources will be automatically setup. + public static AzureAiServicesMode AutoDeploy { get; } = new AzureAiServicesMode(AutoDeployValue); + /// Determines if two values are the same. + public static bool operator ==(AzureAiServicesMode left, AzureAiServicesMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureAiServicesMode left, AzureAiServicesMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureAiServicesMode(string value) => new AzureAiServicesMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureAiServicesMode other && Equals(other); + /// + public bool Equals(AzureAiServicesMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.Serialization.cs new file mode 100644 index 000000000000..70013ce0d836 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class AzureAiServicesSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureAiServicesSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AzureAiServicesMode)) + { + writer.WritePropertyName("azureAiServicesMode"u8); + writer.WriteStringValue(AzureAiServicesMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AzureAiServicesSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureAiServicesSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureAiServicesSettings(document.RootElement, options); + } + + internal static AzureAiServicesSettings DeserializeAzureAiServicesSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureAiServicesMode? azureAiServicesMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureAiServicesMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureAiServicesMode = new AzureAiServicesMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureAiServicesSettings(azureAiServicesMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(AzureAiServicesSettings)} does not support writing '{options.Format}' format."); + } + } + + AzureAiServicesSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureAiServicesSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureAiServicesSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.cs new file mode 100644 index 000000000000..bfd3e91d28f3 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureAiServicesSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Configures Azure AI related services for the project. + internal partial class AzureAiServicesSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AzureAiServicesSettings() + { + } + + /// Initializes a new instance of . + /// The property indicates whether Azure AI services is enabled. + /// Keeps track of any properties unknown to the library. + internal AzureAiServicesSettings(AzureAiServicesMode? azureAiServicesMode, IDictionary serializedAdditionalRawData) + { + AzureAiServicesMode = azureAiServicesMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The property indicates whether Azure AI services is enabled. + public AzureAiServicesMode? AzureAiServicesMode { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureResourceManagerDevCenterContext.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureResourceManagerDevCenterContext.cs index 4bf359ad65b0..2d002fba49b1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureResourceManagerDevCenterContext.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/AzureResourceManagerDevCenterContext.cs @@ -15,23 +15,49 @@ namespace Azure.ResourceManager.DevCenter /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// + [ModelReaderWriterBuildable(typeof(ActiveHoursConfiguration))] [ModelReaderWriterBuildable(typeof(AllowedEnvironmentTypeData))] [ModelReaderWriterBuildable(typeof(AllowedEnvironmentTypeListResult))] [ModelReaderWriterBuildable(typeof(AllowedEnvironmentTypeResource))] [ModelReaderWriterBuildable(typeof(AttachedNetworkConnectionData))] [ModelReaderWriterBuildable(typeof(AttachedNetworkConnectionResource))] [ModelReaderWriterBuildable(typeof(AttachedNetworkListResult))] + [ModelReaderWriterBuildable(typeof(AzureAiServicesSettings))] + [ModelReaderWriterBuildable(typeof(CatalogConflictError))] + [ModelReaderWriterBuildable(typeof(CatalogErrorDetails))] + [ModelReaderWriterBuildable(typeof(CatalogResourceValidationErrorDetails))] + [ModelReaderWriterBuildable(typeof(CatalogSyncError))] + [ModelReaderWriterBuildable(typeof(CatalogSyncErrorDetails))] + [ModelReaderWriterBuildable(typeof(CatalogSyncStats))] + [ModelReaderWriterBuildable(typeof(CheckScopedNameAvailabilityContent))] + [ModelReaderWriterBuildable(typeof(CustomerManagedKeyEncryption))] + [ModelReaderWriterBuildable(typeof(CustomerManagedKeyEncryptionKeyIdentity))] + [ModelReaderWriterBuildable(typeof(CustomizationTaskData))] + [ModelReaderWriterBuildable(typeof(CustomizationTaskInput))] + [ModelReaderWriterBuildable(typeof(CustomizationTaskInstance))] + [ModelReaderWriterBuildable(typeof(CustomizationTaskListResult))] + [ModelReaderWriterBuildable(typeof(CustomizationTaskResource))] + [ModelReaderWriterBuildable(typeof(DefinitionParametersItem))] + [ModelReaderWriterBuildable(typeof(DevBoxAutoDeleteSettings))] [ModelReaderWriterBuildable(typeof(DevBoxDefinitionData))] [ModelReaderWriterBuildable(typeof(DevBoxDefinitionListResult))] [ModelReaderWriterBuildable(typeof(DevBoxDefinitionPatch))] [ModelReaderWriterBuildable(typeof(DevBoxDefinitionResource))] + [ModelReaderWriterBuildable(typeof(DevBoxProvisioningSettings))] [ModelReaderWriterBuildable(typeof(DevCenterCapability))] [ModelReaderWriterBuildable(typeof(DevCenterCatalogData))] + [ModelReaderWriterBuildable(typeof(DevCenterCatalogEnvironmentDefinitionResource))] + [ModelReaderWriterBuildable(typeof(DevCenterCatalogImageDefinitionBuildResource))] + [ModelReaderWriterBuildable(typeof(DevCenterCatalogImageDefinitionResource))] [ModelReaderWriterBuildable(typeof(DevCenterCatalogListResult))] [ModelReaderWriterBuildable(typeof(DevCenterCatalogPatch))] [ModelReaderWriterBuildable(typeof(DevCenterCatalogResource))] [ModelReaderWriterBuildable(typeof(DevCenterData))] + [ModelReaderWriterBuildable(typeof(DevCenterEncryptionSetData))] + [ModelReaderWriterBuildable(typeof(DevCenterEncryptionSetPatch))] + [ModelReaderWriterBuildable(typeof(DevCenterEncryptionSetResource))] [ModelReaderWriterBuildable(typeof(DevCenterEndpointDetail))] + [ModelReaderWriterBuildable(typeof(DevCenterEnvironmentDefinitionData))] [ModelReaderWriterBuildable(typeof(DevCenterEnvironmentRole))] [ModelReaderWriterBuildable(typeof(DevCenterEnvironmentTypeData))] [ModelReaderWriterBuildable(typeof(DevCenterEnvironmentTypePatch))] @@ -42,6 +68,8 @@ namespace Azure.ResourceManager.DevCenter [ModelReaderWriterBuildable(typeof(DevCenterHealthCheck))] [ModelReaderWriterBuildable(typeof(DevCenterHealthStatusDetail))] [ModelReaderWriterBuildable(typeof(DevCenterImageData))] + [ModelReaderWriterBuildable(typeof(DevCenterImageDefinitionBuildData))] + [ModelReaderWriterBuildable(typeof(DevCenterImageDefinitionData))] [ModelReaderWriterBuildable(typeof(DevCenterImageListResult))] [ModelReaderWriterBuildable(typeof(DevCenterImageReference))] [ModelReaderWriterBuildable(typeof(DevCenterImageResource))] @@ -51,16 +79,26 @@ namespace Azure.ResourceManager.DevCenter [ModelReaderWriterBuildable(typeof(DevCenterNetworkConnectionData))] [ModelReaderWriterBuildable(typeof(DevCenterNetworkConnectionPatch))] [ModelReaderWriterBuildable(typeof(DevCenterNetworkConnectionResource))] + [ModelReaderWriterBuildable(typeof(DevCenterNetworkSettings))] [ModelReaderWriterBuildable(typeof(DevCenterOperationStatus))] [ModelReaderWriterBuildable(typeof(DevCenterPatch))] [ModelReaderWriterBuildable(typeof(DevCenterPoolData))] [ModelReaderWriterBuildable(typeof(DevCenterPoolPatch))] [ModelReaderWriterBuildable(typeof(DevCenterPoolResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectCatalogEnvironmentDefinitionResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectCatalogImageDefinitionBuildResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectCatalogImageDefinitionResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectCatalogResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectCatalogSettings))] [ModelReaderWriterBuildable(typeof(DevCenterProjectData))] [ModelReaderWriterBuildable(typeof(DevCenterProjectEnvironmentData))] [ModelReaderWriterBuildable(typeof(DevCenterProjectEnvironmentPatch))] [ModelReaderWriterBuildable(typeof(DevCenterProjectEnvironmentResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectImageResource))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectImageVersionResource))] [ModelReaderWriterBuildable(typeof(DevCenterProjectPatch))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectPolicyPatch))] + [ModelReaderWriterBuildable(typeof(DevCenterProjectPolicyResource))] [ModelReaderWriterBuildable(typeof(DevCenterProjectResource))] [ModelReaderWriterBuildable(typeof(DevCenterResource))] [ModelReaderWriterBuildable(typeof(DevCenterResourceRange))] @@ -73,35 +111,61 @@ namespace Azure.ResourceManager.DevCenter [ModelReaderWriterBuildable(typeof(DevCenterUsage))] [ModelReaderWriterBuildable(typeof(DevCenterUsageName))] [ModelReaderWriterBuildable(typeof(DevCenterUserRoleAssignments))] + [ModelReaderWriterBuildable(typeof(Encryption))] + [ModelReaderWriterBuildable(typeof(EncryptionSetListResult))] [ModelReaderWriterBuildable(typeof(EndpointDependency))] + [ModelReaderWriterBuildable(typeof(EnvironmentDefinitionContent))] + [ModelReaderWriterBuildable(typeof(EnvironmentDefinitionListResult))] [ModelReaderWriterBuildable(typeof(EnvironmentTypeListResult))] [ModelReaderWriterBuildable(typeof(GalleryListResult))] [ModelReaderWriterBuildable(typeof(HealthCheckStatusDetailData))] [ModelReaderWriterBuildable(typeof(HealthCheckStatusDetailResource))] [ModelReaderWriterBuildable(typeof(HealthCheckStatusDetailsListResult))] + [ModelReaderWriterBuildable(typeof(ImageCreationErrorDetails))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionBuildDetails))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionBuildListResult))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionBuildTask))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionBuildTaskGroup))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionBuildTaskParametersItem))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionListResult))] + [ModelReaderWriterBuildable(typeof(ImageDefinitionReference))] [ModelReaderWriterBuildable(typeof(ImageValidationErrorDetails))] [ModelReaderWriterBuildable(typeof(ImageVersionData))] [ModelReaderWriterBuildable(typeof(ImageVersionListResult))] [ModelReaderWriterBuildable(typeof(ImageVersionResource))] + [ModelReaderWriterBuildable(typeof(InheritedSettingsForProject))] + [ModelReaderWriterBuildable(typeof(KeyEncryptionKeyIdentity))] + [ModelReaderWriterBuildable(typeof(LatestImageBuild))] [ModelReaderWriterBuildable(typeof(ListUsagesResult))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(NetworkConnectionListResult))] [ModelReaderWriterBuildable(typeof(OperationStatusResult))] [ModelReaderWriterBuildable(typeof(OutboundEnvironmentEndpoint))] [ModelReaderWriterBuildable(typeof(OutboundEnvironmentEndpointCollection))] + [ModelReaderWriterBuildable(typeof(PoolDevBox))] [ModelReaderWriterBuildable(typeof(PoolListResult))] [ModelReaderWriterBuildable(typeof(ProjectAttachedNetworkConnectionResource))] + [ModelReaderWriterBuildable(typeof(ProjectCatalogSettings))] + [ModelReaderWriterBuildable(typeof(ProjectCustomizationManagedIdentity))] + [ModelReaderWriterBuildable(typeof(ProjectCustomizationSettings))] [ModelReaderWriterBuildable(typeof(ProjectDevBoxDefinitionResource))] [ModelReaderWriterBuildable(typeof(ProjectEnvironmentTypeListResult))] [ModelReaderWriterBuildable(typeof(ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment))] [ModelReaderWriterBuildable(typeof(ProjectListResult))] + [ModelReaderWriterBuildable(typeof(ProjectNetworkSettings))] + [ModelReaderWriterBuildable(typeof(ProjectPolicyData))] + [ModelReaderWriterBuildable(typeof(ProjectPolicyListResult))] + [ModelReaderWriterBuildable(typeof(ProjectPolicyUpdateResourcePolicy))] [ModelReaderWriterBuildable(typeof(RecommendedMachineConfiguration))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(ScheduleListResult))] + [ModelReaderWriterBuildable(typeof(ServerlessGpuSessionsSettings))] [ModelReaderWriterBuildable(typeof(SkuListResult))] [ModelReaderWriterBuildable(typeof(StopOnDisconnectConfiguration))] + [ModelReaderWriterBuildable(typeof(StopOnNoConnectConfiguration))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] + [ModelReaderWriterBuildable(typeof(WorkspaceStorageSettings))] public partial class AzureResourceManagerDevCenterContext : ModelReaderWriterContext { } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.Serialization.cs new file mode 100644 index 000000000000..852f23c358c4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogConflictError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogConflictError)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogConflictError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogConflictError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogConflictError(document.RootElement, options); + } + + internal static CatalogConflictError DeserializeCatalogConflictError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogConflictError(path, name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogConflictError)} does not support writing '{options.Format}' format."); + } + } + + CatalogConflictError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogConflictError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogConflictError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.cs new file mode 100644 index 000000000000..5631ff12496b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConflictError.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// An individual conflict error. + public partial class CatalogConflictError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogConflictError() + { + } + + /// Initializes a new instance of . + /// The path of the file that has a conflicting name. + /// Name of the conflicting catalog item. + /// Keeps track of any properties unknown to the library. + internal CatalogConflictError(string path, string name, IDictionary serializedAdditionalRawData) + { + Path = path; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The path of the file that has a conflicting name. + public string Path { get; } + /// Name of the conflicting catalog item. + public string Name { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConnectionState.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConnectionState.cs new file mode 100644 index 000000000000..0873f4270bcb --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogConnectionState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The connection state of the catalog. + public readonly partial struct CatalogConnectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogConnectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConnectedValue = "Connected"; + private const string DisconnectedValue = "Disconnected"; + + /// Connected state. + public static CatalogConnectionState Connected { get; } = new CatalogConnectionState(ConnectedValue); + /// Disconnected state. + public static CatalogConnectionState Disconnected { get; } = new CatalogConnectionState(DisconnectedValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogConnectionState left, CatalogConnectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogConnectionState left, CatalogConnectionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogConnectionState(string value) => new CatalogConnectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogConnectionState other && Equals(other); + /// + public bool Equals(CatalogConnectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.Serialization.cs new file mode 100644 index 000000000000..962ce33a6bb3 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogErrorDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogErrorDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogErrorDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogErrorDetails(document.RootElement, options); + } + + internal static CatalogErrorDetails DeserializeCatalogErrorDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogErrorDetails(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogErrorDetails)} does not support writing '{options.Format}' format."); + } + } + + CatalogErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogErrorDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogErrorDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.cs new file mode 100644 index 000000000000..b75ea1a8b406 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogErrorDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Catalog error details. + public partial class CatalogErrorDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogErrorDetails() + { + } + + /// Initializes a new instance of . + /// An identifier for the error. + /// A message describing the error. + /// Keeps track of any properties unknown to the library. + internal CatalogErrorDetails(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the error. + public string Code { get; } + /// A message describing the error. + public string Message { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemSyncEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemSyncEnableStatus.cs new file mode 100644 index 000000000000..9053290eb5b9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemSyncEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Catalog item sync types enable or disable status. Indicates whether project catalogs are allowed to sync catalog items under projects associated to this dev center. + public readonly partial struct CatalogItemSyncEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogItemSyncEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Catalog item sync is enabled. + public static CatalogItemSyncEnableStatus Enabled { get; } = new CatalogItemSyncEnableStatus(EnabledValue); + /// Catalog item sync is disabled. + public static CatalogItemSyncEnableStatus Disabled { get; } = new CatalogItemSyncEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogItemSyncEnableStatus left, CatalogItemSyncEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogItemSyncEnableStatus left, CatalogItemSyncEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogItemSyncEnableStatus(string value) => new CatalogItemSyncEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogItemSyncEnableStatus other && Equals(other); + /// + public bool Equals(CatalogItemSyncEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemType.cs new file mode 100644 index 000000000000..443bf08b2bf3 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogItemType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates catalog item types. + public readonly partial struct CatalogItemType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogItemType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnvironmentDefinitionValue = "EnvironmentDefinition"; + private const string ImageDefinitionValue = "ImageDefinition"; + + /// Environment definition catalog item type. + public static CatalogItemType EnvironmentDefinition { get; } = new CatalogItemType(EnvironmentDefinitionValue); + /// Image definition catalog item type. + public static CatalogItemType ImageDefinition { get; } = new CatalogItemType(ImageDefinitionValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogItemType left, CatalogItemType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogItemType left, CatalogItemType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogItemType(string value) => new CatalogItemType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogItemType other && Equals(other); + /// + public bool Equals(CatalogItemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.Serialization.cs new file mode 100644 index 000000000000..94b1a40fbcaa --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogResourceValidationErrorDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogResourceValidationErrorDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogResourceValidationErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogResourceValidationErrorDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogResourceValidationErrorDetails(document.RootElement, options); + } + + internal static CatalogResourceValidationErrorDetails DeserializeCatalogResourceValidationErrorDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CatalogErrorDetails.DeserializeCatalogErrorDetails(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogResourceValidationErrorDetails(errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogResourceValidationErrorDetails)} does not support writing '{options.Format}' format."); + } + } + + CatalogResourceValidationErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogResourceValidationErrorDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogResourceValidationErrorDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.cs new file mode 100644 index 000000000000..1f55d7f8fac2 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationErrorDetails.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// List of validator error details. Populated when changes are made to the resource or its dependent resources that impact the validity of the Catalog resource. + public partial class CatalogResourceValidationErrorDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogResourceValidationErrorDetails() + { + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Errors associated with resources synchronized from the catalog. + /// Keeps track of any properties unknown to the library. + internal CatalogResourceValidationErrorDetails(IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Errors associated with resources synchronized from the catalog. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationStatus.cs new file mode 100644 index 000000000000..97ff1350fab4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogResourceValidationStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Catalog resource validation status. + public readonly partial struct CatalogResourceValidationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogResourceValidationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string PendingValue = "Pending"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// Unknown validation status. + public static CatalogResourceValidationStatus Unknown { get; } = new CatalogResourceValidationStatus(UnknownValue); + /// Pending validation status. + public static CatalogResourceValidationStatus Pending { get; } = new CatalogResourceValidationStatus(PendingValue); + /// Succeeded validation status. + public static CatalogResourceValidationStatus Succeeded { get; } = new CatalogResourceValidationStatus(SucceededValue); + /// Failed validation status. + public static CatalogResourceValidationStatus Failed { get; } = new CatalogResourceValidationStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogResourceValidationStatus left, CatalogResourceValidationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogResourceValidationStatus left, CatalogResourceValidationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogResourceValidationStatus(string value) => new CatalogResourceValidationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogResourceValidationStatus other && Equals(other); + /// + public bool Equals(CatalogResourceValidationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.Serialization.cs new file mode 100644 index 000000000000..cc0e0889602a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogSyncError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncError)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + writer.WriteStartArray(); + foreach (var item in ErrorDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogSyncError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogSyncError(document.RootElement, options); + } + + internal static CatalogSyncError DeserializeCatalogSyncError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + IReadOnlyList errorDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CatalogErrorDetails.DeserializeCatalogErrorDetails(item, options)); + } + errorDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogSyncError(path, errorDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogSyncError)} does not support writing '{options.Format}' format."); + } + } + + CatalogSyncError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogSyncError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogSyncError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.cs new file mode 100644 index 000000000000..1994bc44cbf6 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncError.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// An individual synchronization error. + public partial class CatalogSyncError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogSyncError() + { + ErrorDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The path of the file the error is associated with. + /// Errors associated with the file. + /// Keeps track of any properties unknown to the library. + internal CatalogSyncError(string path, IReadOnlyList errorDetails, IDictionary serializedAdditionalRawData) + { + Path = path; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The path of the file the error is associated with. + public string Path { get; } + /// Errors associated with the file. + public IReadOnlyList ErrorDetails { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.Serialization.cs new file mode 100644 index 000000000000..a9b6d4d0a635 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogSyncErrorDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncErrorDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(OperationError)) + { + writer.WritePropertyName("operationError"u8); + writer.WriteObjectValue(OperationError, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Conflicts)) + { + writer.WritePropertyName("conflicts"u8); + writer.WriteStartArray(); + foreach (var item in Conflicts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogSyncErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncErrorDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogSyncErrorDetails(document.RootElement, options); + } + + internal static CatalogSyncErrorDetails DeserializeCatalogSyncErrorDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CatalogErrorDetails operationError = default; + IReadOnlyList conflicts = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationError = CatalogErrorDetails.DeserializeCatalogErrorDetails(property.Value, options); + continue; + } + if (property.NameEquals("conflicts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CatalogConflictError.DeserializeCatalogConflictError(item, options)); + } + conflicts = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CatalogSyncError.DeserializeCatalogSyncError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogSyncErrorDetails(operationError, conflicts ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogSyncErrorDetails)} does not support writing '{options.Format}' format."); + } + } + + CatalogSyncErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogSyncErrorDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogSyncErrorDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.cs new file mode 100644 index 000000000000..0d99386ce1a5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncErrorDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Synchronization error details. + public partial class CatalogSyncErrorDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogSyncErrorDetails() + { + Conflicts = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Error information for the overall synchronization operation. + /// Catalog items that have conflicting names. + /// Errors that occured during synchronization. + /// Keeps track of any properties unknown to the library. + internal CatalogSyncErrorDetails(CatalogErrorDetails operationError, IReadOnlyList conflicts, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + OperationError = operationError; + Conflicts = conflicts; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error information for the overall synchronization operation. + public CatalogErrorDetails OperationError { get; } + /// Catalog items that have conflicting names. + public IReadOnlyList Conflicts { get; } + /// Errors that occured during synchronization. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.Serialization.cs new file mode 100644 index 000000000000..e9e27cbab9e0 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.Serialization.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CatalogSyncStats : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncStats)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Added)) + { + writer.WritePropertyName("added"u8); + writer.WriteNumberValue(Added.Value); + } + if (options.Format != "W" && Optional.IsDefined(Updated)) + { + writer.WritePropertyName("updated"u8); + writer.WriteNumberValue(Updated.Value); + } + if (options.Format != "W" && Optional.IsDefined(Unchanged)) + { + writer.WritePropertyName("unchanged"u8); + writer.WriteNumberValue(Unchanged.Value); + } + if (options.Format != "W" && Optional.IsDefined(Removed)) + { + writer.WritePropertyName("removed"u8); + writer.WriteNumberValue(Removed.Value); + } + if (options.Format != "W" && Optional.IsDefined(ValidationErrors)) + { + writer.WritePropertyName("validationErrors"u8); + writer.WriteNumberValue(ValidationErrors.Value); + } + if (options.Format != "W" && Optional.IsDefined(SynchronizationErrors)) + { + writer.WritePropertyName("synchronizationErrors"u8); + writer.WriteNumberValue(SynchronizationErrors.Value); + } + if (Optional.IsCollectionDefined(SyncedCatalogItemTypes)) + { + writer.WritePropertyName("syncedCatalogItemTypes"u8); + writer.WriteStartArray(); + foreach (var item in SyncedCatalogItemTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CatalogSyncStats IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CatalogSyncStats)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCatalogSyncStats(document.RootElement, options); + } + + internal static CatalogSyncStats DeserializeCatalogSyncStats(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? added = default; + int? updated = default; + int? unchanged = default; + int? removed = default; + int? validationErrors = default; + int? synchronizationErrors = default; + IReadOnlyList syncedCatalogItemTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("added"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + added = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("updated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updated = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unchanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unchanged = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("removed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + removed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("validationErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validationErrors = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("synchronizationErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + synchronizationErrors = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("syncedCatalogItemTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new CatalogItemType(item.GetString())); + } + syncedCatalogItemTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CatalogSyncStats( + added, + updated, + unchanged, + removed, + validationErrors, + synchronizationErrors, + syncedCatalogItemTypes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CatalogSyncStats)} does not support writing '{options.Format}' format."); + } + } + + CatalogSyncStats IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCatalogSyncStats(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CatalogSyncStats)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.cs new file mode 100644 index 000000000000..57514d57b400 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncStats.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Stats of the synchronization. + public partial class CatalogSyncStats + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CatalogSyncStats() + { + SyncedCatalogItemTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Count of catalog items added during synchronization. + /// Count of catalog items updated during synchronization. + /// Count of catalog items that were unchanged during synchronization. + /// Count of catalog items removed during synchronization. + /// Count of catalog items that had validation errors during synchronization. + /// Count of synchronization errors that occured during synchronization. + /// Indicates catalog item types that were synced. + /// Keeps track of any properties unknown to the library. + internal CatalogSyncStats(int? added, int? updated, int? unchanged, int? removed, int? validationErrors, int? synchronizationErrors, IReadOnlyList syncedCatalogItemTypes, IDictionary serializedAdditionalRawData) + { + Added = added; + Updated = updated; + Unchanged = unchanged; + Removed = removed; + ValidationErrors = validationErrors; + SynchronizationErrors = synchronizationErrors; + SyncedCatalogItemTypes = syncedCatalogItemTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Count of catalog items added during synchronization. + public int? Added { get; } + /// Count of catalog items updated during synchronization. + public int? Updated { get; } + /// Count of catalog items that were unchanged during synchronization. + public int? Unchanged { get; } + /// Count of catalog items removed during synchronization. + public int? Removed { get; } + /// Count of catalog items that had validation errors during synchronization. + public int? ValidationErrors { get; } + /// Count of synchronization errors that occured during synchronization. + public int? SynchronizationErrors { get; } + /// Indicates catalog item types that were synced. + public IReadOnlyList SyncedCatalogItemTypes { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncType.cs new file mode 100644 index 000000000000..1f8a24a57b32 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CatalogSyncType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates the type of sync that is configured for the catalog. + public readonly partial struct CatalogSyncType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogSyncType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManualValue = "Manual"; + private const string ScheduledValue = "Scheduled"; + + /// Manual sync type. + public static CatalogSyncType Manual { get; } = new CatalogSyncType(ManualValue); + /// Scheduled sync type. + public static CatalogSyncType Scheduled { get; } = new CatalogSyncType(ScheduledValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogSyncType left, CatalogSyncType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogSyncType left, CatalogSyncType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogSyncType(string value) => new CatalogSyncType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogSyncType other && Equals(other); + /// + public bool Equals(CatalogSyncType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.Serialization.cs new file mode 100644 index 000000000000..5a026800b96a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CheckScopedNameAvailabilityContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckScopedNameAvailabilityContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.Value); + } + if (Optional.IsDefined(Scope)) + { + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CheckScopedNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckScopedNameAvailabilityContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckScopedNameAvailabilityContent(document.RootElement, options); + } + + internal static CheckScopedNameAvailabilityContent DeserializeCheckScopedNameAvailabilityContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceType? type = default; + string scope = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("scope"u8)) + { + scope = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckScopedNameAvailabilityContent(name, type, scope, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CheckScopedNameAvailabilityContent)} does not support writing '{options.Format}' format."); + } + } + + CheckScopedNameAvailabilityContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckScopedNameAvailabilityContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckScopedNameAvailabilityContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.cs new file mode 100644 index 000000000000..865bdd315c46 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CheckScopedNameAvailabilityContent.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The scoped name check availability request body. + public partial class CheckScopedNameAvailabilityContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CheckScopedNameAvailabilityContent() + { + } + + /// Initializes a new instance of . + /// The name of the resource for which availability needs to be checked. + /// The resource type. + /// The resource id to scope the name check. + /// Keeps track of any properties unknown to the library. + internal CheckScopedNameAvailabilityContent(string name, ResourceType? resourceType, string scope, IDictionary serializedAdditionalRawData) + { + Name = name; + ResourceType = resourceType; + Scope = scope; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the resource for which availability needs to be checked. + public string Name { get; set; } + /// The resource type. + public ResourceType? ResourceType { get; set; } + /// The resource id to scope the name check. + public string Scope { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CmkIdentityType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CmkIdentityType.cs new file mode 100644 index 000000000000..bda9764df07c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CmkIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The type of identity used to access the key vault key. + public readonly partial struct CmkIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CmkIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + + /// System assigned identity type. + public static CmkIdentityType SystemAssigned { get; } = new CmkIdentityType(SystemAssignedValue); + /// User assigned identity type. + public static CmkIdentityType UserAssigned { get; } = new CmkIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(CmkIdentityType left, CmkIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CmkIdentityType left, CmkIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CmkIdentityType(string value) => new CmkIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CmkIdentityType other && Equals(other); + /// + public bool Equals(CmkIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs new file mode 100644 index 000000000000..e498380d134d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CustomerManagedKeyEncryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyEncryptionKeyIdentity)) + { + writer.WritePropertyName("keyEncryptionKeyIdentity"u8); + writer.WriteObjectValue(KeyEncryptionKeyIdentity, options); + } + if (Optional.IsDefined(KeyEncryptionKeyUri)) + { + writer.WritePropertyName("keyEncryptionKeyUrl"u8); + writer.WriteStringValue(KeyEncryptionKeyUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomerManagedKeyEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomerManagedKeyEncryption(document.RootElement, options); + } + + internal static CustomerManagedKeyEncryption DeserializeCustomerManagedKeyEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity = default; + Uri keyEncryptionKeyUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyEncryptionKeyIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyIdentity = CustomerManagedKeyEncryptionKeyIdentity.DeserializeCustomerManagedKeyEncryptionKeyIdentity(property.Value, options); + continue; + } + if (property.NameEquals("keyEncryptionKeyUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomerManagedKeyEncryption(keyEncryptionKeyIdentity, keyEncryptionKeyUrl, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support writing '{options.Format}' format."); + } + } + + CustomerManagedKeyEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomerManagedKeyEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.cs new file mode 100644 index 000000000000..f4e25a6cfdea --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryption.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// All Customer-managed key encryption properties for the resource. + public partial class CustomerManagedKeyEncryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomerManagedKeyEncryption() + { + } + + /// Initializes a new instance of . + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + /// Keeps track of any properties unknown to the library. + internal CustomerManagedKeyEncryption(CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity, Uri keyEncryptionKeyUri, IDictionary serializedAdditionalRawData) + { + KeyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + KeyEncryptionKeyUri = keyEncryptionKeyUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + public CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get; set; } + /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + public Uri KeyEncryptionKeyUri { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs new file mode 100644 index 000000000000..7296274cda2a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CustomerManagedKeyEncryptionKeyIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IdentityType)) + { + writer.WritePropertyName("identityType"u8); + writer.WriteStringValue(IdentityType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (Optional.IsDefined(DelegatedIdentityClientId)) + { + writer.WritePropertyName("delegatedIdentityClientId"u8); + writer.WriteStringValue(DelegatedIdentityClientId.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomerManagedKeyEncryptionKeyIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomerManagedKeyEncryptionKeyIdentity(document.RootElement, options); + } + + internal static CustomerManagedKeyEncryptionKeyIdentity DeserializeCustomerManagedKeyEncryptionKeyIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IdentityType? identityType = default; + ResourceIdentifier userAssignedIdentityResourceId = default; + Guid? delegatedIdentityClientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityType = new IdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("delegatedIdentityClientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegatedIdentityClientId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomerManagedKeyEncryptionKeyIdentity(identityType, userAssignedIdentityResourceId, delegatedIdentityClientId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support writing '{options.Format}' format."); + } + } + + CustomerManagedKeyEncryptionKeyIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomerManagedKeyEncryptionKeyIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs new file mode 100644 index 000000000000..e2ead7bf4471 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + public partial class CustomerManagedKeyEncryptionKeyIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomerManagedKeyEncryptionKeyIdentity() + { + } + + /// Initializes a new instance of . + /// Values can be systemAssignedIdentity or userAssignedIdentity. + /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. + /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. + /// Keeps track of any properties unknown to the library. + internal CustomerManagedKeyEncryptionKeyIdentity(IdentityType? identityType, ResourceIdentifier userAssignedIdentityResourceId, Guid? delegatedIdentityClientId, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + DelegatedIdentityClientId = delegatedIdentityClientId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public IdentityType? IdentityType { get; set; } + /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. + public ResourceIdentifier UserAssignedIdentityResourceId { get; set; } + /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. + public Guid? DelegatedIdentityClientId { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.Serialization.cs new file mode 100644 index 000000000000..0896b4d3679b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CustomizationTaskInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskInput)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(InputType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(InputType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(IsRequired)) + { + writer.WritePropertyName("required"u8); + writer.WriteBooleanValue(IsRequired.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomizationTaskInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomizationTaskInput(document.RootElement, options); + } + + internal static CustomizationTaskInput DeserializeCustomizationTaskInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + CustomizationTaskInputType? type = default; + bool? required = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new CustomizationTaskInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("required"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + required = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomizationTaskInput(description, type, required, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomizationTaskInput)} does not support writing '{options.Format}' format."); + } + } + + CustomizationTaskInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomizationTaskInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomizationTaskInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.cs new file mode 100644 index 000000000000..8d7d448b30e1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInput.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Input for a Task. + public partial class CustomizationTaskInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CustomizationTaskInput() + { + } + + /// Initializes a new instance of . + /// Description of the input. + /// Type of the input. + /// Whether or not the input is required. + /// Keeps track of any properties unknown to the library. + internal CustomizationTaskInput(string description, CustomizationTaskInputType? inputType, bool? isRequired, IDictionary serializedAdditionalRawData) + { + Description = description; + InputType = inputType; + IsRequired = isRequired; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Description of the input. + public string Description { get; } + /// Type of the input. + public CustomizationTaskInputType? InputType { get; } + /// Whether or not the input is required. + public bool? IsRequired { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInputType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInputType.cs new file mode 100644 index 000000000000..89fc5d0ba62c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInputType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Type of the input. + public readonly partial struct CustomizationTaskInputType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CustomizationTaskInputType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StringValue = "string"; + private const string NumberValue = "number"; + private const string BooleanValue = "boolean"; + + /// The parameter accepts a string value. + public static CustomizationTaskInputType String { get; } = new CustomizationTaskInputType(StringValue); + /// The parameter accepts a number value. + public static CustomizationTaskInputType Number { get; } = new CustomizationTaskInputType(NumberValue); + /// The parameter accepts a boolean value. + public static CustomizationTaskInputType Boolean { get; } = new CustomizationTaskInputType(BooleanValue); + /// Determines if two values are the same. + public static bool operator ==(CustomizationTaskInputType left, CustomizationTaskInputType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomizationTaskInputType left, CustomizationTaskInputType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CustomizationTaskInputType(string value) => new CustomizationTaskInputType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomizationTaskInputType other && Equals(other); + /// + public bool Equals(CustomizationTaskInputType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.Serialization.cs new file mode 100644 index 000000000000..1374f8adc506 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class CustomizationTaskInstance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskInstance)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(TimeoutInSeconds)) + { + writer.WritePropertyName("timeoutInSeconds"u8); + writer.WriteNumberValue(TimeoutInSeconds.Value); + } + if (Optional.IsDefined(Condition)) + { + writer.WritePropertyName("condition"u8); + writer.WriteStringValue(Condition); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomizationTaskInstance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskInstance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomizationTaskInstance(document.RootElement, options); + } + + internal static CustomizationTaskInstance DeserializeCustomizationTaskInstance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList parameters = default; + string displayName = default; + int? timeoutInSeconds = default; + string condition = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DefinitionParametersItem.DeserializeDefinitionParametersItem(item, options)); + } + parameters = array; + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeoutInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("condition"u8)) + { + condition = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomizationTaskInstance( + name, + parameters ?? new ChangeTrackingList(), + displayName, + timeoutInSeconds, + condition, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomizationTaskInstance)} does not support writing '{options.Format}' format."); + } + } + + CustomizationTaskInstance IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomizationTaskInstance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomizationTaskInstance)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.cs new file mode 100644 index 000000000000..0ec47f2fba85 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskInstance.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A customization task to run. + public partial class CustomizationTaskInstance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the task. + /// is null. + public CustomizationTaskInstance(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Parameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the task. + /// Parameters for the task. + /// Display name to help differentiate multiple instances of the same task. + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + /// An expression that must evaluate to true in order for the task to run. + /// Keeps track of any properties unknown to the library. + internal CustomizationTaskInstance(string name, IList parameters, string displayName, int? timeoutInSeconds, string condition, IDictionary serializedAdditionalRawData) + { + Name = name; + Parameters = parameters; + DisplayName = displayName; + TimeoutInSeconds = timeoutInSeconds; + Condition = condition; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomizationTaskInstance() + { + } + + /// Name of the task. + public string Name { get; set; } + /// Parameters for the task. + public IList Parameters { get; } + /// Display name to help differentiate multiple instances of the same task. + public string DisplayName { get; set; } + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + public int? TimeoutInSeconds { get; set; } + /// An expression that must evaluate to true in order for the task to run. + public string Condition { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.Serialization.cs new file mode 100644 index 000000000000..d716ed5b9ffb --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class CustomizationTaskListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomizationTaskListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomizationTaskListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomizationTaskListResult(document.RootElement, options); + } + + internal static CustomizationTaskListResult DeserializeCustomizationTaskListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomizationTaskData.DeserializeCustomizationTaskData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomizationTaskListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(CustomizationTaskListResult)} does not support writing '{options.Format}' format."); + } + } + + CustomizationTaskListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomizationTaskListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomizationTaskListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.cs new file mode 100644 index 000000000000..d88fecedf050 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/CustomizationTaskListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of CustomizationTask items. + internal partial class CustomizationTaskListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The CustomizationTask items on this page. + internal CustomizationTaskListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The CustomizationTask items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CustomizationTaskListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomizationTaskListResult() + { + } + + /// The CustomizationTask items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.Serialization.cs new file mode 100644 index 000000000000..8d599a08be74 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal static partial class DayOfWeekExtensions + { + public static string ToSerialString(this DayOfWeek value) => value switch + { + DayOfWeek.Monday => "Monday", + DayOfWeek.Tuesday => "Tuesday", + DayOfWeek.Wednesday => "Wednesday", + DayOfWeek.Thursday => "Thursday", + DayOfWeek.Friday => "Friday", + DayOfWeek.Saturday => "Saturday", + DayOfWeek.Sunday => "Sunday", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DayOfWeek value.") + }; + + public static DayOfWeek ToDayOfWeek(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return DayOfWeek.Monday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return DayOfWeek.Tuesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return DayOfWeek.Wednesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return DayOfWeek.Thursday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return DayOfWeek.Friday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return DayOfWeek.Saturday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return DayOfWeek.Sunday; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DayOfWeek value."); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..e990266da56c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The days of the week. + public enum DayOfWeek + { + /// Monday. + Monday, + /// Tuesday. + Tuesday, + /// Wednesday. + Wednesday, + /// Thursday. + Thursday, + /// Friday. + Friday, + /// Saturday. + Saturday, + /// Sunday. + Sunday + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.Serialization.cs new file mode 100644 index 000000000000..226a509cdd8a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class DefinitionParametersItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefinitionParametersItem)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DefinitionParametersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefinitionParametersItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefinitionParametersItem(document.RootElement, options); + } + + internal static DefinitionParametersItem DeserializeDefinitionParametersItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefinitionParametersItem(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DefinitionParametersItem)} does not support writing '{options.Format}' format."); + } + } + + DefinitionParametersItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefinitionParametersItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefinitionParametersItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.cs new file mode 100644 index 000000000000..eb8b4fc2c41d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DefinitionParametersItem.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Parameters for the task. + public partial class DefinitionParametersItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the parameter. + /// value of the parameter. + /// or is null. + public DefinitionParametersItem(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Name of the parameter. + /// value of the parameter. + /// Keeps track of any properties unknown to the library. + internal DefinitionParametersItem(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DefinitionParametersItem() + { + } + + /// Name of the parameter. + public string Name { get; set; } + /// value of the parameter. + public string Value { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.Serialization.cs new file mode 100644 index 000000000000..2a50310fb487 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class DevBoxAutoDeleteSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevBoxAutoDeleteSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DeleteMode)) + { + writer.WritePropertyName("deleteMode"u8); + writer.WriteStringValue(DeleteMode.Value.ToString()); + } + if (Optional.IsDefined(InactiveThreshold)) + { + writer.WritePropertyName("inactiveThreshold"u8); + writer.WriteStringValue(InactiveThreshold); + } + if (Optional.IsDefined(GracePeriod)) + { + writer.WritePropertyName("gracePeriod"u8); + writer.WriteStringValue(GracePeriod); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevBoxAutoDeleteSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevBoxAutoDeleteSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevBoxAutoDeleteSettings(document.RootElement, options); + } + + internal static DevBoxAutoDeleteSettings DeserializeDevBoxAutoDeleteSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DevBoxDeleteMode? deleteMode = default; + string inactiveThreshold = default; + string gracePeriod = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deleteMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deleteMode = new DevBoxDeleteMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("inactiveThreshold"u8)) + { + inactiveThreshold = property.Value.GetString(); + continue; + } + if (property.NameEquals("gracePeriod"u8)) + { + gracePeriod = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevBoxAutoDeleteSettings(deleteMode, inactiveThreshold, gracePeriod, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevBoxAutoDeleteSettings)} does not support writing '{options.Format}' format."); + } + } + + DevBoxAutoDeleteSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevBoxAutoDeleteSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevBoxAutoDeleteSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.cs new file mode 100644 index 000000000000..9d8050d7d03d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxAutoDeleteSettings.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Settings controlling the auto deletion of inactive dev boxes. + public partial class DevBoxAutoDeleteSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevBoxAutoDeleteSettings() + { + } + + /// Initializes a new instance of . + /// Indicates the delete mode for Dev Boxes within this project. + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S. + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// Keeps track of any properties unknown to the library. + internal DevBoxAutoDeleteSettings(DevBoxDeleteMode? deleteMode, string inactiveThreshold, string gracePeriod, IDictionary serializedAdditionalRawData) + { + DeleteMode = deleteMode; + InactiveThreshold = inactiveThreshold; + GracePeriod = gracePeriod; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates the delete mode for Dev Boxes within this project. + public DevBoxDeleteMode? DeleteMode { get; set; } + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S. + public string InactiveThreshold { get; set; } + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + public string GracePeriod { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.Serialization.cs index ce1f76b9dd12..7043dc601837 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxDefinitionListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static DevBoxDefinitionListResult DeserializeDevBoxDefinitionListResult return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static DevBoxDefinitionListResult DeserializeDevBoxDefinitionListResult } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static DevBoxDefinitionListResult DeserializeDevBoxDefinitionListResult } } serializedAdditionalRawData = rawDataDictionary; - return new DevBoxDefinitionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DevBoxDefinitionListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.cs index e62e0c7e1956..e6dcf46bca17 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDefinitionListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the Dev Box definition list operation. + /// Paged collection of DevBoxDefinition items. internal partial class DevBoxDefinitionListResult { /// @@ -46,25 +47,31 @@ internal partial class DevBoxDefinitionListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevBoxDefinitionListResult() + /// The DevBoxDefinition items on this page. + internal DevBoxDefinitionListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The DevBoxDefinition items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DevBoxDefinitionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DevBoxDefinitionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal DevBoxDefinitionListResult() + { + } + + /// The DevBoxDefinition items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDeleteMode.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDeleteMode.cs new file mode 100644 index 000000000000..2205bdffb17c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxDeleteMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates possible values for Dev Box delete mode. + public readonly partial struct DevBoxDeleteMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevBoxDeleteMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManualValue = "Manual"; + private const string AutoValue = "Auto"; + + /// Dev Boxes will not be deleted automatically, and user must manually delete. This is the default. + public static DevBoxDeleteMode Manual { get; } = new DevBoxDeleteMode(ManualValue); + /// Dev Boxes will be deleted automatically according to configured settings. + public static DevBoxDeleteMode Auto { get; } = new DevBoxDeleteMode(AutoValue); + /// Determines if two values are the same. + public static bool operator ==(DevBoxDeleteMode left, DevBoxDeleteMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevBoxDeleteMode left, DevBoxDeleteMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevBoxDeleteMode(string value) => new DevBoxDeleteMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevBoxDeleteMode other && Equals(other); + /// + public bool Equals(DevBoxDeleteMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.Serialization.cs new file mode 100644 index 000000000000..cfea9a8ad0f1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class DevBoxProvisioningSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevBoxProvisioningSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(InstallAzureMonitorAgentEnableStatus)) + { + writer.WritePropertyName("installAzureMonitorAgentEnableStatus"u8); + writer.WriteStringValue(InstallAzureMonitorAgentEnableStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevBoxProvisioningSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevBoxProvisioningSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevBoxProvisioningSettings(document.RootElement, options); + } + + internal static DevBoxProvisioningSettings DeserializeDevBoxProvisioningSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InstallAzureMonitorAgentEnableStatus? installAzureMonitorAgentEnableStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("installAzureMonitorAgentEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + installAzureMonitorAgentEnableStatus = new InstallAzureMonitorAgentEnableStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevBoxProvisioningSettings(installAzureMonitorAgentEnableStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevBoxProvisioningSettings)} does not support writing '{options.Format}' format."); + } + } + + DevBoxProvisioningSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevBoxProvisioningSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevBoxProvisioningSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.cs new file mode 100644 index 000000000000..a20f86bdda64 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxProvisioningSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Provisioning settings that apply to all Dev Boxes created in this dev center. + internal partial class DevBoxProvisioningSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevBoxProvisioningSettings() + { + } + + /// Initializes a new instance of . + /// Indicates whether to install the Azure Monitor Agent service on Dev Boxes that belong to this dev center. + /// Keeps track of any properties unknown to the library. + internal DevBoxProvisioningSettings(InstallAzureMonitorAgentEnableStatus? installAzureMonitorAgentEnableStatus, IDictionary serializedAdditionalRawData) + { + InstallAzureMonitorAgentEnableStatus = installAzureMonitorAgentEnableStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether to install the Azure Monitor Agent service on Dev Boxes that belong to this dev center. + public InstallAzureMonitorAgentEnableStatus? InstallAzureMonitorAgentEnableStatus { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxTunnelEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxTunnelEnableStatus.cs new file mode 100644 index 000000000000..33e5e70f9fd8 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevBoxTunnelEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether Dev Box Tunnel is enabled. + public readonly partial struct DevBoxTunnelEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevBoxTunnelEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Dev Box Tunnel is enabled. + public static DevBoxTunnelEnableStatus Disabled { get; } = new DevBoxTunnelEnableStatus(DisabledValue); + /// Dev Box Tunnel is disabled. + public static DevBoxTunnelEnableStatus Enabled { get; } = new DevBoxTunnelEnableStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(DevBoxTunnelEnableStatus left, DevBoxTunnelEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevBoxTunnelEnableStatus left, DevBoxTunnelEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevBoxTunnelEnableStatus(string value) => new DevBoxTunnelEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevBoxTunnelEnableStatus other && Equals(other); + /// + public bool Equals(DevBoxTunnelEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.Serialization.cs index b5a3e97aaeaa..94ad4c1ae5c8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterCatalogListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static DevCenterCatalogListResult DeserializeDevCenterCatalogListResult return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static DevCenterCatalogListResult DeserializeDevCenterCatalogListResult } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static DevCenterCatalogListResult DeserializeDevCenterCatalogListResult } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterCatalogListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DevCenterCatalogListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.cs index 94ecdea8899d..8e18d9a88d7c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the catalog list operation. + /// Paged collection of Catalog items. internal partial class DevCenterCatalogListResult { /// @@ -46,25 +47,31 @@ internal partial class DevCenterCatalogListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevCenterCatalogListResult() + /// The Catalog items on this page. + internal DevCenterCatalogListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Catalog items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DevCenterCatalogListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DevCenterCatalogListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal DevCenterCatalogListResult() + { + } + + /// The Catalog items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.Serialization.cs index fc0906dacb5a..eea545ae2928 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.Serialization.cs @@ -34,17 +34,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterCatalogPatch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GitHub)) @@ -57,6 +46,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("adoGit"u8); writer.WriteObjectValue(AdoGit, options); } + if (Optional.IsDefined(SyncType)) + { + writer.WritePropertyName("syncType"u8); + writer.WriteStringValue(SyncType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -95,27 +100,14 @@ internal static DevCenterCatalogPatch DeserializeDevCenterCatalogPatch(JsonEleme { return null; } - IDictionary tags = default; DevCenterGitCatalog gitHub = default; DevCenterGitCatalog adoGit = default; + CatalogSyncType? syncType = default; + IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -143,6 +135,29 @@ internal static DevCenterCatalogPatch DeserializeDevCenterCatalogPatch(JsonEleme adoGit = DevCenterGitCatalog.DeserializeDevCenterGitCatalog(property0.Value, options); continue; } + if (property0.NameEquals("syncType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + syncType = new CatalogSyncType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("tags"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + tags = dictionary; + continue; + } } continue; } @@ -152,7 +167,7 @@ internal static DevCenterCatalogPatch DeserializeDevCenterCatalogPatch(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterCatalogPatch(tags ?? new ChangeTrackingDictionary(), gitHub, adoGit, serializedAdditionalRawData); + return new DevCenterCatalogPatch(gitHub, adoGit, syncType, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.cs index 77f25de0c9eb..589c63bbbe8b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogPatch.cs @@ -52,23 +52,27 @@ public DevCenterCatalogPatch() } /// Initializes a new instance of . - /// Resource tags. /// Properties for a GitHub catalog type. /// Properties for an Azure DevOps catalog type. + /// Indicates the type of sync that is configured for the catalog. + /// Resource tags. /// Keeps track of any properties unknown to the library. - internal DevCenterCatalogPatch(IDictionary tags, DevCenterGitCatalog gitHub, DevCenterGitCatalog adoGit, IDictionary serializedAdditionalRawData) + internal DevCenterCatalogPatch(DevCenterGitCatalog gitHub, DevCenterGitCatalog adoGit, CatalogSyncType? syncType, IDictionary tags, IDictionary serializedAdditionalRawData) { - Tags = tags; GitHub = gitHub; AdoGit = adoGit; + SyncType = syncType; + Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource tags. - public IDictionary Tags { get; } /// Properties for a GitHub catalog type. public DevCenterGitCatalog GitHub { get; set; } /// Properties for an Azure DevOps catalog type. public DevCenterGitCatalog AdoGit { get; set; } + /// Indicates the type of sync that is configured for the catalog. + public CatalogSyncType? SyncType { get; set; } + /// Resource tags. + public IDictionary Tags { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogSyncState.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogSyncState.cs index 389b9c523c6f..b2058559de68 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogSyncState.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterCatalogSyncState.cs @@ -27,13 +27,13 @@ public DevCenterCatalogSyncState(string value) private const string FailedValue = "Failed"; private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Succeeded synchronization state. public static DevCenterCatalogSyncState Succeeded { get; } = new DevCenterCatalogSyncState(SucceededValue); - /// InProgress. + /// In progress synchronization state. public static DevCenterCatalogSyncState InProgress { get; } = new DevCenterCatalogSyncState(InProgressValue); - /// Failed. + /// Failed synchronization state. public static DevCenterCatalogSyncState Failed { get; } = new DevCenterCatalogSyncState(FailedValue); - /// Canceled. + /// Canceled synchronization state. public static DevCenterCatalogSyncState Canceled { get; } = new DevCenterCatalogSyncState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(DevCenterCatalogSyncState left, DevCenterCatalogSyncState right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.Serialization.cs new file mode 100644 index 000000000000..f5d0a563acec --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class DevCenterEncryptionSetPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEncryptionSetPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DevboxDisksEncryptionEnableStatus)) + { + writer.WritePropertyName("devboxDisksEncryptionEnableStatus"u8); + writer.WriteStringValue(DevboxDisksEncryptionEnableStatus.Value.ToString()); + } + if (Optional.IsDefined(KeyEncryptionKeyUri)) + { + writer.WritePropertyName("keyEncryptionKeyUrl"u8); + writer.WriteStringValue(KeyEncryptionKeyUri.AbsoluteUri); + } + if (Optional.IsDefined(KeyEncryptionKeyIdentity)) + { + writer.WritePropertyName("keyEncryptionKeyIdentity"u8); + writer.WriteObjectValue(KeyEncryptionKeyIdentity, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevCenterEncryptionSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterEncryptionSetPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterEncryptionSetPatch(document.RootElement, options); + } + + internal static DevCenterEncryptionSetPatch DeserializeDevCenterEncryptionSetPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation? location = default; + ManagedServiceIdentity identity = default; + DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus = default; + Uri keyEncryptionKeyUrl = default; + KeyEncryptionKeyIdentity keyEncryptionKeyIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("devboxDisksEncryptionEnableStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devboxDisksEncryptionEnableStatus = new DevboxDisksEncryptionEnableStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyEncryptionKeyUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyEncryptionKeyIdentity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyIdentity = KeyEncryptionKeyIdentity.DeserializeKeyEncryptionKeyIdentity(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterEncryptionSetPatch( + tags ?? new ChangeTrackingDictionary(), + location, + identity, + devboxDisksEncryptionEnableStatus, + keyEncryptionKeyUrl, + keyEncryptionKeyIdentity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterEncryptionSetPatch)} does not support writing '{options.Format}' format."); + } + } + + DevCenterEncryptionSetPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterEncryptionSetPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterEncryptionSetPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.cs new file mode 100644 index 000000000000..d3635def45d3 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEncryptionSetPatch.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. + public partial class DevCenterEncryptionSetPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterEncryptionSetPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The geo-location where the resource lives. + /// Managed identity properties. + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + /// The managed identity configuration used for key vault access. + /// Keeps track of any properties unknown to the library. + internal DevCenterEncryptionSetPatch(IDictionary tags, AzureLocation? location, ManagedServiceIdentity identity, DevboxDisksEncryptionEnableStatus? devboxDisksEncryptionEnableStatus, Uri keyEncryptionKeyUri, KeyEncryptionKeyIdentity keyEncryptionKeyIdentity, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Location = location; + Identity = identity; + DevboxDisksEncryptionEnableStatus = devboxDisksEncryptionEnableStatus; + KeyEncryptionKeyUri = keyEncryptionKeyUri; + KeyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The geo-location where the resource lives. + public AzureLocation? Location { get; set; } + /// Managed identity properties. + public ManagedServiceIdentity Identity { get; set; } + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + public DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get; set; } + /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + public Uri KeyEncryptionKeyUri { get; set; } + /// The managed identity configuration used for key vault access. + public KeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.Serialization.cs index 7f2bbd3365e2..077baf934601 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.Serialization.cs @@ -45,6 +45,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +91,7 @@ internal static DevCenterEnvironmentTypePatch DeserializeDevCenterEnvironmentTyp return null; } IDictionary tags = default; + string displayName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -101,13 +110,30 @@ internal static DevCenterEnvironmentTypePatch DeserializeDevCenterEnvironmentTyp tags = dictionary; continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + } + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterEnvironmentTypePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new DevCenterEnvironmentTypePatch(tags ?? new ChangeTrackingDictionary(), displayName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.cs index 91613350f194..caeeefc861d1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterEnvironmentTypePatch.cs @@ -53,14 +53,18 @@ public DevCenterEnvironmentTypePatch() /// Initializes a new instance of . /// Resource tags. + /// The display name of the environment type. /// Keeps track of any properties unknown to the library. - internal DevCenterEnvironmentTypePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + internal DevCenterEnvironmentTypePatch(IDictionary tags, string displayName, IDictionary serializedAdditionalRawData) { Tags = tags; + DisplayName = displayName; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } + /// The display name of the environment type. + public string DisplayName { get; set; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthCheckStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthCheckStatus.cs index 4e225dcd21b4..90f0a18c97f9 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthCheckStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthCheckStatus.cs @@ -28,19 +28,22 @@ public DevCenterHealthCheckStatus(string value) private const string PassedValue = "Passed"; private const string WarningValue = "Warning"; private const string FailedValue = "Failed"; + private const string InformationalValue = "Informational"; - /// Unknown. + /// Unknown health check status. public static DevCenterHealthCheckStatus Unknown { get; } = new DevCenterHealthCheckStatus(UnknownValue); - /// Pending. + /// Pending health check status. public static DevCenterHealthCheckStatus Pending { get; } = new DevCenterHealthCheckStatus(PendingValue); - /// Running. + /// Running health check status. public static DevCenterHealthCheckStatus Running { get; } = new DevCenterHealthCheckStatus(RunningValue); - /// Passed. + /// Passed health check status. public static DevCenterHealthCheckStatus Passed { get; } = new DevCenterHealthCheckStatus(PassedValue); - /// Warning. + /// Warning health check status. public static DevCenterHealthCheckStatus Warning { get; } = new DevCenterHealthCheckStatus(WarningValue); - /// Failed. + /// Failed health check status. public static DevCenterHealthCheckStatus Failed { get; } = new DevCenterHealthCheckStatus(FailedValue); + /// Informational health check status. + public static DevCenterHealthCheckStatus Informational { get; } = new DevCenterHealthCheckStatus(InformationalValue); /// Determines if two values are the same. public static bool operator ==(DevCenterHealthCheckStatus left, DevCenterHealthCheckStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthStatus.cs index 21b3ed18b5ce..1488220b2446 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHealthStatus.cs @@ -28,15 +28,15 @@ public DevCenterHealthStatus(string value) private const string WarningValue = "Warning"; private const string UnhealthyValue = "Unhealthy"; - /// Unknown. + /// Unknown health status. public static DevCenterHealthStatus Unknown { get; } = new DevCenterHealthStatus(UnknownValue); - /// Pending. + /// Pending health status. public static DevCenterHealthStatus Pending { get; } = new DevCenterHealthStatus(PendingValue); - /// Healthy. + /// Healthy health status. public static DevCenterHealthStatus Healthy { get; } = new DevCenterHealthStatus(HealthyValue); - /// Warning. + /// Warning health status. public static DevCenterHealthStatus Warning { get; } = new DevCenterHealthStatus(WarningValue); - /// Unhealthy. + /// Unhealthy health status. public static DevCenterHealthStatus Unhealthy { get; } = new DevCenterHealthStatus(UnhealthyValue); /// Determines if two values are the same. public static bool operator ==(DevCenterHealthStatus left, DevCenterHealthStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHibernateSupport.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHibernateSupport.cs index 6f30d3708364..9ed4eee13857 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHibernateSupport.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterHibernateSupport.cs @@ -25,9 +25,9 @@ public DevCenterHibernateSupport(string value) private const string IsDisabledValue = "Disabled"; private const string IsEnabledValue = "Enabled"; - /// Disabled. + /// Hibernate is disabled. public static DevCenterHibernateSupport IsDisabled { get; } = new DevCenterHibernateSupport(IsDisabledValue); - /// Enabled. + /// Hibernate is enabled. public static DevCenterHibernateSupport IsEnabled { get; } = new DevCenterHibernateSupport(IsEnabledValue); /// Determines if two values are the same. public static bool operator ==(DevCenterHibernateSupport left, DevCenterHibernateSupport right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.Serialization.cs index b335735acff1..b24c243638cf 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterImageListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static DevCenterImageListResult DeserializeDevCenterImageListResult(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static DevCenterImageListResult DeserializeDevCenterImageListResult(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static DevCenterImageListResult DeserializeDevCenterImageListResult(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterImageListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DevCenterImageListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.cs index c1b7e08e5a1f..9a011ea80c56 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterImageListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the image list operation. + /// Paged collection of Image items. internal partial class DevCenterImageListResult { /// @@ -46,25 +47,31 @@ internal partial class DevCenterImageListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevCenterImageListResult() + /// The Image items on this page. + internal DevCenterImageListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Image items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DevCenterImageListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DevCenterImageListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal DevCenterImageListResult() + { + } + + /// The Image items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterLicenseType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterLicenseType.cs index 81c3102fbc6d..d14fa80c019c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterLicenseType.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterLicenseType.cs @@ -24,7 +24,7 @@ public DevCenterLicenseType(string value) private const string WindowsClientValue = "Windows_Client"; - /// Windows_Client. + /// Windows Client license type. public static DevCenterLicenseType WindowsClient { get; } = new DevCenterLicenseType(WindowsClientValue); /// Determines if two values are the same. public static bool operator ==(DevCenterLicenseType left, DevCenterLicenseType right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.Serialization.cs index 7682241be99b..740c218fe4df 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static DevCenterListResult DeserializeDevCenterListResult(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static DevCenterListResult DeserializeDevCenterListResult(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static DevCenterListResult DeserializeDevCenterListResult(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DevCenterListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.cs index 3e3604d89d72..3fc101b30b0d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the list devcenters operation. + /// Paged collection of DevCenter items. internal partial class DevCenterListResult { /// @@ -46,25 +47,31 @@ internal partial class DevCenterListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DevCenterListResult() + /// The DevCenter items on this page. + internal DevCenterListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The DevCenter items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DevCenterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DevCenterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal DevCenterListResult() + { + } + + /// The DevCenter items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.Serialization.cs new file mode 100644 index 000000000000..570cfa80e23c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class DevCenterNetworkSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterNetworkSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MicrosoftHostedNetworkEnableStatus)) + { + writer.WritePropertyName("microsoftHostedNetworkEnableStatus"u8); + writer.WriteStringValue(MicrosoftHostedNetworkEnableStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevCenterNetworkSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterNetworkSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterNetworkSettings(document.RootElement, options); + } + + internal static DevCenterNetworkSettings DeserializeDevCenterNetworkSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("microsoftHostedNetworkEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + microsoftHostedNetworkEnableStatus = new MicrosoftHostedNetworkEnableStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterNetworkSettings(microsoftHostedNetworkEnableStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterNetworkSettings)} does not support writing '{options.Format}' format."); + } + } + + DevCenterNetworkSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterNetworkSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterNetworkSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.cs new file mode 100644 index 000000000000..712e27e5a1c4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterNetworkSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Network settings for the Dev Center. + internal partial class DevCenterNetworkSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterNetworkSettings() + { + } + + /// Initializes a new instance of . + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + /// Keeps track of any properties unknown to the library. + internal DevCenterNetworkSettings(MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus, IDictionary serializedAdditionalRawData) + { + MicrosoftHostedNetworkEnableStatus = microsoftHostedNetworkEnableStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + public MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.Serialization.cs index 72a43d3be9ca..efff8a3434b7 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.Serialization.cs @@ -37,11 +37,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (options.Format != "W" && Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -54,6 +49,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } } DevCenterOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -76,8 +76,8 @@ internal static DevCenterOperationStatus DeserializeDevCenterOperationStatus(Jso { return null; } - ResourceIdentifier resourceId = default; BinaryData properties = default; + ResourceIdentifier resourceId = default; ResourceIdentifier id = default; string name = default; string status = default; @@ -90,22 +90,22 @@ internal static DevCenterOperationStatus DeserializeDevCenterOperationStatus(Jso Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("resourceId"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - resourceId = new ResourceIdentifier(property.Value.GetString()); + properties = BinaryData.FromString(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("resourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = BinaryData.FromString(property.Value.GetRawText()); + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -202,8 +202,8 @@ internal static DevCenterOperationStatus DeserializeDevCenterOperationStatus(Jso endTime, operations ?? new ChangeTrackingList(), error, - resourceId, properties, + resourceId, serializedAdditionalRawData); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.cs index 047e79fd3ef7..c669031811fe 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterOperationStatus.cs @@ -62,13 +62,13 @@ internal DevCenterOperationStatus(string status) : base(status) /// The end time of the operation. /// The operations list. /// If present, details of the operation error. - /// The id of the resource. /// Custom operation properties, populated only for a successful operation. + /// The resource ID of the resource being operated on. /// Keeps track of any properties unknown to the library. - internal DevCenterOperationStatus(ResourceIdentifier id, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, ResourceIdentifier resourceId, BinaryData properties, IDictionary serializedAdditionalRawData) : base(id, name, status, percentComplete, startOn, endOn, operations, error) + internal DevCenterOperationStatus(ResourceIdentifier id, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, BinaryData properties, ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) : base(id, name, status, percentComplete, startOn, endOn, operations, error) { - ResourceId = resourceId; Properties = properties; + ResourceId = resourceId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -77,8 +77,6 @@ internal DevCenterOperationStatus() { } - /// The id of the resource. - public ResourceIdentifier ResourceId { get; } /// /// Custom operation properties, populated only for a successful operation. /// @@ -110,5 +108,7 @@ internal DevCenterOperationStatus() /// /// public BinaryData Properties { get; } + /// The resource ID of the resource being operated on. + public ResourceIdentifier ResourceId { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.Serialization.cs index 00368c3fa45c..04ca5bd3408c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.Serialization.cs @@ -37,11 +37,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(DevBoxDefinitionType)) + { + writer.WritePropertyName("devBoxDefinitionType"u8); + writer.WriteStringValue(DevBoxDefinitionType.Value.ToString()); + } if (Optional.IsDefined(DevBoxDefinitionName)) { writer.WritePropertyName("devBoxDefinitionName"u8); writer.WriteStringValue(DevBoxDefinitionName); } + if (Optional.IsDefined(DevBoxDefinition)) + { + writer.WritePropertyName("devBoxDefinition"u8); + writer.WriteObjectValue(DevBoxDefinition, options); + } if (Optional.IsDefined(NetworkConnectionName)) { writer.WritePropertyName("networkConnectionName"u8); @@ -62,6 +72,46 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("stopOnDisconnect"u8); writer.WriteObjectValue(StopOnDisconnect, options); } + if (Optional.IsDefined(StopOnNoConnect)) + { + writer.WritePropertyName("stopOnNoConnect"u8); + writer.WriteObjectValue(StopOnNoConnect, options); + } + if (Optional.IsDefined(SingleSignOnStatus)) + { + writer.WritePropertyName("singleSignOnStatus"u8); + writer.WriteStringValue(SingleSignOnStatus.Value.ToString()); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(VirtualNetworkType)) + { + writer.WritePropertyName("virtualNetworkType"u8); + writer.WriteStringValue(VirtualNetworkType.Value.ToString()); + } + if (Optional.IsCollectionDefined(ManagedVirtualNetworkRegions)) + { + writer.WritePropertyName("managedVirtualNetworkRegions"u8); + writer.WriteStartArray(); + foreach (var item in ManagedVirtualNetworkRegions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ActiveHoursConfiguration)) + { + writer.WritePropertyName("activeHoursConfiguration"u8); + writer.WriteObjectValue(ActiveHoursConfiguration, options); + } + if (Optional.IsDefined(DevBoxTunnelEnableStatus)) + { + writer.WritePropertyName("devBoxTunnelEnableStatus"u8); + writer.WriteStringValue(DevBoxTunnelEnableStatus.Value.ToString()); + } writer.WriteEndObject(); } @@ -87,11 +137,20 @@ internal static DevCenterPoolPatch DeserializeDevCenterPoolPatch(JsonElement ele } IDictionary tags = default; AzureLocation? location = default; + PoolDevBoxDefinitionType? devBoxDefinitionType = default; string devBoxDefinitionName = default; + PoolDevBox devBoxDefinition = default; string networkConnectionName = default; DevCenterLicenseType? licenseType = default; LocalAdminStatus? localAdministrator = default; StopOnDisconnectConfiguration stopOnDisconnect = default; + StopOnNoConnectConfiguration stopOnNoConnect = default; + PoolUpdateSingleSignOnStatus? singleSignOnStatus = default; + string displayName = default; + VirtualNetworkType? virtualNetworkType = default; + IList managedVirtualNetworkRegions = default; + ActiveHoursConfiguration activeHoursConfiguration = default; + DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -128,11 +187,29 @@ internal static DevCenterPoolPatch DeserializeDevCenterPoolPatch(JsonElement ele } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("devBoxDefinitionType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxDefinitionType = new PoolDevBoxDefinitionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("devBoxDefinitionName"u8)) { devBoxDefinitionName = property0.Value.GetString(); continue; } + if (property0.NameEquals("devBoxDefinition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxDefinition = PoolDevBox.DeserializePoolDevBox(property0.Value, options); + continue; + } if (property0.NameEquals("networkConnectionName"u8)) { networkConnectionName = property0.Value.GetString(); @@ -165,6 +242,70 @@ internal static DevCenterPoolPatch DeserializeDevCenterPoolPatch(JsonElement ele stopOnDisconnect = StopOnDisconnectConfiguration.DeserializeStopOnDisconnectConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("stopOnNoConnect"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stopOnNoConnect = StopOnNoConnectConfiguration.DeserializeStopOnNoConnectConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("singleSignOnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + singleSignOnStatus = new PoolUpdateSingleSignOnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("virtualNetworkType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkType = new VirtualNetworkType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("managedVirtualNetworkRegions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + managedVirtualNetworkRegions = array; + continue; + } + if (property0.NameEquals("activeHoursConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeHoursConfiguration = ActiveHoursConfiguration.DeserializeActiveHoursConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("devBoxTunnelEnableStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxTunnelEnableStatus = new DevBoxTunnelEnableStatus(property0.Value.GetString()); + continue; + } } continue; } @@ -178,11 +319,20 @@ internal static DevCenterPoolPatch DeserializeDevCenterPoolPatch(JsonElement ele tags ?? new ChangeTrackingDictionary(), location, serializedAdditionalRawData, + devBoxDefinitionType, devBoxDefinitionName, + devBoxDefinition, networkConnectionName, licenseType, localAdministrator, - stopOnDisconnect); + stopOnDisconnect, + stopOnNoConnect, + singleSignOnStatus, + displayName, + virtualNetworkType, + managedVirtualNetworkRegions ?? new ChangeTrackingList(), + activeHoursConfiguration, + devBoxTunnelEnableStatus); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.cs index 314d720ca520..1bc355798777 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterPoolPatch.cs @@ -17,28 +17,51 @@ public partial class DevCenterPoolPatch : DevCenterTrackedResourceUpdate /// Initializes a new instance of . public DevCenterPoolPatch() { + ManagedVirtualNetworkRegions = new ChangeTrackingList(); } /// Initializes a new instance of . /// Resource tags. /// The geo-location where the resource lives. /// Keeps track of any properties unknown to the library. - /// Name of a Dev Box definition in parent Project of this Pool. + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or not provided. /// Name of a Network Connection in parent Project of this Pool. /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - internal DevCenterPoolPatch(IDictionary tags, AzureLocation? location, IDictionary serializedAdditionalRawData, string devBoxDefinitionName, string networkConnectionName, DevCenterLicenseType? licenseType, LocalAdminStatus? localAdministrator, StopOnDisconnectConfiguration stopOnDisconnect) : base(tags, location, serializedAdditionalRawData) + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant. + /// The display name of the pool. + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// Active hours configuration settings for Dev Boxes created in this pool. + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + internal DevCenterPoolPatch(IDictionary tags, AzureLocation? location, IDictionary serializedAdditionalRawData, PoolDevBoxDefinitionType? devBoxDefinitionType, string devBoxDefinitionName, PoolDevBox devBoxDefinition, string networkConnectionName, DevCenterLicenseType? licenseType, LocalAdminStatus? localAdministrator, StopOnDisconnectConfiguration stopOnDisconnect, StopOnNoConnectConfiguration stopOnNoConnect, PoolUpdateSingleSignOnStatus? singleSignOnStatus, string displayName, VirtualNetworkType? virtualNetworkType, IList managedVirtualNetworkRegions, ActiveHoursConfiguration activeHoursConfiguration, DevBoxTunnelEnableStatus? devBoxTunnelEnableStatus) : base(tags, location, serializedAdditionalRawData) { + DevBoxDefinitionType = devBoxDefinitionType; DevBoxDefinitionName = devBoxDefinitionName; + DevBoxDefinition = devBoxDefinition; NetworkConnectionName = networkConnectionName; LicenseType = licenseType; LocalAdministrator = localAdministrator; StopOnDisconnect = stopOnDisconnect; + StopOnNoConnect = stopOnNoConnect; + SingleSignOnStatus = singleSignOnStatus; + DisplayName = displayName; + VirtualNetworkType = virtualNetworkType; + ManagedVirtualNetworkRegions = managedVirtualNetworkRegions; + ActiveHoursConfiguration = activeHoursConfiguration; + DevBoxTunnelEnableStatus = devBoxTunnelEnableStatus; } - /// Name of a Dev Box definition in parent Project of this Pool. + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + public PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. public string DevBoxDefinitionName { get; set; } + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or not provided. + public PoolDevBox DevBoxDefinition { get; set; } /// Name of a Network Connection in parent Project of this Pool. public string NetworkConnectionName { get; set; } /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. @@ -47,5 +70,19 @@ internal DevCenterPoolPatch(IDictionary tags, AzureLocation? loc public LocalAdminStatus? LocalAdministrator { get; set; } /// Stop on disconnect configuration settings for Dev Boxes created in this pool. public StopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public StopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant. + public PoolUpdateSingleSignOnStatus? SingleSignOnStatus { get; set; } + /// The display name of the pool. + public string DisplayName { get; set; } + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + public VirtualNetworkType? VirtualNetworkType { get; set; } + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + public IList ManagedVirtualNetworkRegions { get; } + /// Active hours configuration settings for Dev Boxes created in this pool. + public ActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + public DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.Serialization.cs new file mode 100644 index 000000000000..3e1ce81da031 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class DevCenterProjectCatalogSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterProjectCatalogSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CatalogItemSyncEnableStatus)) + { + writer.WritePropertyName("catalogItemSyncEnableStatus"u8); + writer.WriteStringValue(CatalogItemSyncEnableStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevCenterProjectCatalogSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterProjectCatalogSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterProjectCatalogSettings(document.RootElement, options); + } + + internal static DevCenterProjectCatalogSettings DeserializeDevCenterProjectCatalogSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("catalogItemSyncEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + catalogItemSyncEnableStatus = new CatalogItemSyncEnableStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterProjectCatalogSettings(catalogItemSyncEnableStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterProjectCatalogSettings)} does not support writing '{options.Format}' format."); + } + } + + DevCenterProjectCatalogSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterProjectCatalogSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterProjectCatalogSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.cs new file mode 100644 index 000000000000..2ec80a310f9b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectCatalogSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Project catalog settings for project catalogs under a project associated to this dev center. + internal partial class DevCenterProjectCatalogSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterProjectCatalogSettings() + { + } + + /// Initializes a new instance of . + /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + /// Keeps track of any properties unknown to the library. + internal DevCenterProjectCatalogSettings(CatalogItemSyncEnableStatus? catalogItemSyncEnableStatus, IDictionary serializedAdditionalRawData) + { + CatalogItemSyncEnableStatus = catalogItemSyncEnableStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + public CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.Serialization.cs index df8515026978..fa5abfa4637f 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.Serialization.cs @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("deploymentTargetId"u8); writer.WriteStringValue(DeploymentTargetId); } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -121,6 +126,7 @@ internal static DevCenterProjectEnvironmentPatch DeserializeDevCenterProjectEnvi IDictionary tags = default; ManagedServiceIdentity identity = default; ResourceIdentifier deploymentTargetId = default; + string displayName = default; EnvironmentTypeEnableStatus? status = default; ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment = default; IDictionary userRoleAssignments = default; @@ -169,6 +175,11 @@ internal static DevCenterProjectEnvironmentPatch DeserializeDevCenterProjectEnvi deploymentTargetId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("status"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -214,6 +225,7 @@ internal static DevCenterProjectEnvironmentPatch DeserializeDevCenterProjectEnvi tags ?? new ChangeTrackingDictionary(), identity, deploymentTargetId, + displayName, status, creatorRoleAssignment, userRoleAssignments ?? new ChangeTrackingDictionary(), diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.cs index 6f8c79f66a04..32a9bb8da6ca 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectEnvironmentPatch.cs @@ -58,15 +58,17 @@ public DevCenterProjectEnvironmentPatch() /// Resource tags. /// Managed identity properties. /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. + /// The display name of the project environment type. /// Defines whether this Environment Type can be used in this Project. /// The role definition assigned to the environment creator on backing resources. /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. /// Keeps track of any properties unknown to the library. - internal DevCenterProjectEnvironmentPatch(IDictionary tags, ManagedServiceIdentity identity, ResourceIdentifier deploymentTargetId, EnvironmentTypeEnableStatus? status, ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment, IDictionary userRoleAssignments, IDictionary serializedAdditionalRawData) + internal DevCenterProjectEnvironmentPatch(IDictionary tags, ManagedServiceIdentity identity, ResourceIdentifier deploymentTargetId, string displayName, EnvironmentTypeEnableStatus? status, ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment, IDictionary userRoleAssignments, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; DeploymentTargetId = deploymentTargetId; + DisplayName = displayName; Status = status; CreatorRoleAssignment = creatorRoleAssignment; UserRoleAssignments = userRoleAssignments; @@ -79,6 +81,8 @@ internal DevCenterProjectEnvironmentPatch(IDictionary tags, Mana public ManagedServiceIdentity Identity { get; set; } /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. public ResourceIdentifier DeploymentTargetId { get; set; } + /// The display name of the project environment type. + public string DisplayName { get; set; } /// Defines whether this Environment Type can be used in this Project. public EnvironmentTypeEnableStatus? Status { get; set; } /// The role definition assigned to the environment creator on backing resources. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.Serialization.cs index c2f0d79e8554..e7fd811c32b1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.Serialization.cs @@ -52,6 +52,41 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("maxDevBoxesPerUser"u8); writer.WriteNumberValue(MaxDevBoxesPerUser.Value); } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(CatalogSettings)) + { + writer.WritePropertyName("catalogSettings"u8); + writer.WriteObjectValue(CatalogSettings, options); + } + if (Optional.IsDefined(CustomizationSettings)) + { + writer.WritePropertyName("customizationSettings"u8); + writer.WriteObjectValue(CustomizationSettings, options); + } + if (Optional.IsDefined(DevBoxAutoDeleteSettings)) + { + writer.WritePropertyName("devBoxAutoDeleteSettings"u8); + writer.WriteObjectValue(DevBoxAutoDeleteSettings, options); + } + if (Optional.IsDefined(AzureAiServicesSettings)) + { + writer.WritePropertyName("azureAiServicesSettings"u8); + writer.WriteObjectValue(AzureAiServicesSettings, options); + } + if (Optional.IsDefined(ServerlessGpuSessionsSettings)) + { + writer.WritePropertyName("serverlessGpuSessionsSettings"u8); + writer.WriteObjectValue(ServerlessGpuSessionsSettings, options); + } + if (Optional.IsDefined(WorkspaceStorageSettings)) + { + writer.WritePropertyName("workspaceStorageSettings"u8); + writer.WriteObjectValue(WorkspaceStorageSettings, options); + } writer.WriteEndObject(); } @@ -80,6 +115,13 @@ internal static DevCenterProjectPatch DeserializeDevCenterProjectPatch(JsonEleme ResourceIdentifier devCenterId = default; string description = default; int? maxDevBoxesPerUser = default; + string displayName = default; + ProjectCatalogSettings catalogSettings = default; + ProjectCustomizationSettings customizationSettings = default; + DevBoxAutoDeleteSettings devBoxAutoDeleteSettings = default; + AzureAiServicesSettings azureAiServicesSettings = default; + ServerlessGpuSessionsSettings serverlessGpuSessionsSettings = default; + WorkspaceStorageSettings workspaceStorageSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -139,6 +181,65 @@ internal static DevCenterProjectPatch DeserializeDevCenterProjectPatch(JsonEleme maxDevBoxesPerUser = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("catalogSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + catalogSettings = ProjectCatalogSettings.DeserializeProjectCatalogSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("customizationSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customizationSettings = ProjectCustomizationSettings.DeserializeProjectCustomizationSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("devBoxAutoDeleteSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devBoxAutoDeleteSettings = DevBoxAutoDeleteSettings.DeserializeDevBoxAutoDeleteSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("azureAiServicesSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureAiServicesSettings = AzureAiServicesSettings.DeserializeAzureAiServicesSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("serverlessGpuSessionsSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverlessGpuSessionsSettings = ServerlessGpuSessionsSettings.DeserializeServerlessGpuSessionsSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("workspaceStorageSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceStorageSettings = WorkspaceStorageSettings.DeserializeWorkspaceStorageSettings(property0.Value, options); + continue; + } } continue; } @@ -154,7 +255,14 @@ internal static DevCenterProjectPatch DeserializeDevCenterProjectPatch(JsonEleme serializedAdditionalRawData, devCenterId, description, - maxDevBoxesPerUser); + maxDevBoxesPerUser, + displayName, + catalogSettings, + customizationSettings, + devBoxAutoDeleteSettings, + azureAiServicesSettings, + serverlessGpuSessionsSettings, + workspaceStorageSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.cs index cc3cad7d845b..e666b2a5664d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPatch.cs @@ -26,11 +26,25 @@ public DevCenterProjectPatch() /// Resource Id of an associated DevCenter. /// Description of the project. /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. - internal DevCenterProjectPatch(IDictionary tags, AzureLocation? location, IDictionary serializedAdditionalRawData, ResourceIdentifier devCenterId, string description, int? maxDevBoxesPerUser) : base(tags, location, serializedAdditionalRawData) + /// The display name of the project. + /// Settings to be used when associating a project with a catalog. + /// Settings to be used for customizations. + /// Dev Box Auto Delete settings. + /// Indicates whether Azure AI services are enabled for a project. + /// Settings to be used for serverless GPU. + /// Settings to be used for workspace storage. + internal DevCenterProjectPatch(IDictionary tags, AzureLocation? location, IDictionary serializedAdditionalRawData, ResourceIdentifier devCenterId, string description, int? maxDevBoxesPerUser, string displayName, ProjectCatalogSettings catalogSettings, ProjectCustomizationSettings customizationSettings, DevBoxAutoDeleteSettings devBoxAutoDeleteSettings, AzureAiServicesSettings azureAiServicesSettings, ServerlessGpuSessionsSettings serverlessGpuSessionsSettings, WorkspaceStorageSettings workspaceStorageSettings) : base(tags, location, serializedAdditionalRawData) { DevCenterId = devCenterId; Description = description; MaxDevBoxesPerUser = maxDevBoxesPerUser; + DisplayName = displayName; + CatalogSettings = catalogSettings; + CustomizationSettings = customizationSettings; + DevBoxAutoDeleteSettings = devBoxAutoDeleteSettings; + AzureAiServicesSettings = azureAiServicesSettings; + ServerlessGpuSessionsSettings = serverlessGpuSessionsSettings; + WorkspaceStorageSettings = workspaceStorageSettings; } /// Resource Id of an associated DevCenter. @@ -39,5 +53,53 @@ internal DevCenterProjectPatch(IDictionary tags, AzureLocation? public string Description { get; set; } /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. public int? MaxDevBoxesPerUser { get; set; } + /// The display name of the project. + public string DisplayName { get; set; } + /// Settings to be used when associating a project with a catalog. + internal ProjectCatalogSettings CatalogSettings { get; set; } + /// Indicates catalog item types that can be synced. + public IList CatalogItemSyncTypes + { + get + { + if (CatalogSettings is null) + CatalogSettings = new ProjectCatalogSettings(); + return CatalogSettings.CatalogItemSyncTypes; + } + } + + /// Settings to be used for customizations. + public ProjectCustomizationSettings CustomizationSettings { get; set; } + /// Dev Box Auto Delete settings. + public DevBoxAutoDeleteSettings DevBoxAutoDeleteSettings { get; set; } + /// Indicates whether Azure AI services are enabled for a project. + internal AzureAiServicesSettings AzureAiServicesSettings { get; set; } + /// The property indicates whether Azure AI services is enabled. + public AzureAiServicesMode? AzureAiServicesMode + { + get => AzureAiServicesSettings is null ? default : AzureAiServicesSettings.AzureAiServicesMode; + set + { + if (AzureAiServicesSettings is null) + AzureAiServicesSettings = new AzureAiServicesSettings(); + AzureAiServicesSettings.AzureAiServicesMode = value; + } + } + + /// Settings to be used for serverless GPU. + public ServerlessGpuSessionsSettings ServerlessGpuSessionsSettings { get; set; } + /// Settings to be used for workspace storage. + internal WorkspaceStorageSettings WorkspaceStorageSettings { get; set; } + /// Indicates whether workspace storage is enabled. + public WorkspaceStorageMode? WorkspaceStorageMode + { + get => WorkspaceStorageSettings is null ? default : WorkspaceStorageSettings.WorkspaceStorageMode; + set + { + if (WorkspaceStorageSettings is null) + WorkspaceStorageSettings = new WorkspaceStorageSettings(); + WorkspaceStorageSettings.WorkspaceStorageMode = value; + } + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.Serialization.cs new file mode 100644 index 000000000000..f7b6a1fa8e03 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class DevCenterProjectPolicyPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterProjectPolicyPatch)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ResourcePolicies)) + { + writer.WritePropertyName("resourcePolicies"u8); + writer.WriteStartArray(); + foreach (var item in ResourcePolicies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Scopes)) + { + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevCenterProjectPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevCenterProjectPolicyPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevCenterProjectPolicyPatch(document.RootElement, options); + } + + internal static DevCenterProjectPolicyPatch DeserializeDevCenterProjectPolicyPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourcePolicies = default; + IList scopes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourcePolicies"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProjectPolicyUpdateResourcePolicy.DeserializeProjectPolicyUpdateResourcePolicy(item, options)); + } + resourcePolicies = array; + continue; + } + if (property0.NameEquals("scopes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scopes = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevCenterProjectPolicyPatch(resourcePolicies ?? new ChangeTrackingList(), scopes ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(DevCenterProjectPolicyPatch)} does not support writing '{options.Format}' format."); + } + } + + DevCenterProjectPolicyPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDevCenterProjectPolicyPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevCenterProjectPolicyPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.cs new file mode 100644 index 000000000000..94da8c477f20 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProjectPolicyPatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + public partial class DevCenterProjectPolicyPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevCenterProjectPolicyPatch() + { + ResourcePolicies = new ChangeTrackingList(); + Scopes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource policies that are a part of this project policy. + /// Resources that have access to the shared resources that are a part of this project policy. + /// Keeps track of any properties unknown to the library. + internal DevCenterProjectPolicyPatch(IList resourcePolicies, IList scopes, IDictionary serializedAdditionalRawData) + { + ResourcePolicies = resourcePolicies; + Scopes = scopes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource policies that are a part of this project policy. + public IList ResourcePolicies { get; } + /// Resources that have access to the shared resources that are a part of this project policy. + public IList Scopes { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProvisioningState.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProvisioningState.cs index c379be83478a..11df7223ee8b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProvisioningState.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterProvisioningState.cs @@ -39,37 +39,37 @@ public DevCenterProvisioningState(string value) private const string RolloutInProgressValue = "RolloutInProgress"; private const string StorageProvisioningFailedValue = "StorageProvisioningFailed"; - /// NotSpecified. + /// Not specified provisioning state. public static DevCenterProvisioningState NotSpecified { get; } = new DevCenterProvisioningState(NotSpecifiedValue); - /// Accepted. + /// Accepted provisioning state. public static DevCenterProvisioningState Accepted { get; } = new DevCenterProvisioningState(AcceptedValue); - /// Running. + /// Running provisioning state. public static DevCenterProvisioningState Running { get; } = new DevCenterProvisioningState(RunningValue); - /// Creating. + /// Creating provisioning state. public static DevCenterProvisioningState Creating { get; } = new DevCenterProvisioningState(CreatingValue); - /// Created. + /// Created provisioning state. public static DevCenterProvisioningState Created { get; } = new DevCenterProvisioningState(CreatedValue); - /// Updating. + /// Updating provisioning state. public static DevCenterProvisioningState Updating { get; } = new DevCenterProvisioningState(UpdatingValue); - /// Updated. + /// Updated provisioning state. public static DevCenterProvisioningState Updated { get; } = new DevCenterProvisioningState(UpdatedValue); - /// Deleting. + /// Deleting provisioning state. public static DevCenterProvisioningState Deleting { get; } = new DevCenterProvisioningState(DeletingValue); - /// Deleted. + /// Deleted provisioning state. public static DevCenterProvisioningState Deleted { get; } = new DevCenterProvisioningState(DeletedValue); - /// Succeeded. + /// Succeeded provisioning state. public static DevCenterProvisioningState Succeeded { get; } = new DevCenterProvisioningState(SucceededValue); - /// Failed. + /// Failed provisioning state. public static DevCenterProvisioningState Failed { get; } = new DevCenterProvisioningState(FailedValue); - /// Canceled. + /// Canceled provisioning state. public static DevCenterProvisioningState Canceled { get; } = new DevCenterProvisioningState(CanceledValue); - /// MovingResources. + /// Moving resources provisioning state. public static DevCenterProvisioningState MovingResources { get; } = new DevCenterProvisioningState(MovingResourcesValue); - /// TransientFailure. + /// Transient failure provisioning state. public static DevCenterProvisioningState TransientFailure { get; } = new DevCenterProvisioningState(TransientFailureValue); - /// RolloutInProgress. + /// Rollout in progress provisioning state. public static DevCenterProvisioningState RolloutInProgress { get; } = new DevCenterProvisioningState(RolloutInProgressValue); - /// StorageProvisioningFailed. + /// Storage provisioning failed provisioning state. public static DevCenterProvisioningState StorageProvisioningFailed { get; } = new DevCenterProvisioningState(StorageProvisioningFailedValue); /// Determines if two values are the same. public static bool operator ==(DevCenterProvisioningState left, DevCenterProvisioningState right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterResourceType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterResourceType.cs new file mode 100644 index 000000000000..32b14548d8f7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterResourceType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates dev center resource types. + public readonly partial struct DevCenterResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevCenterResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImagesValue = "Images"; + private const string AttachedNetworksValue = "AttachedNetworks"; + private const string SkusValue = "Skus"; + + /// Images resource type. + public static DevCenterResourceType Images { get; } = new DevCenterResourceType(ImagesValue); + /// Attached networks resource type. + public static DevCenterResourceType AttachedNetworks { get; } = new DevCenterResourceType(AttachedNetworksValue); + /// Skus resource type. + public static DevCenterResourceType Skus { get; } = new DevCenterResourceType(SkusValue); + /// Determines if two values are the same. + public static bool operator ==(DevCenterResourceType left, DevCenterResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevCenterResourceType left, DevCenterResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevCenterResourceType(string value) => new DevCenterResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevCenterResourceType other && Equals(other); + /// + public bool Equals(DevCenterResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduleEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduleEnableStatus.cs index d14822deae68..118b21bbb4a8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduleEnableStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduleEnableStatus.cs @@ -25,9 +25,9 @@ public DevCenterScheduleEnableStatus(string value) private const string IsEnabledValue = "Enabled"; private const string IsDisabledValue = "Disabled"; - /// Enabled. + /// Schedule is enabled. public static DevCenterScheduleEnableStatus IsEnabled { get; } = new DevCenterScheduleEnableStatus(IsEnabledValue); - /// Disabled. + /// Schedule is disabled. public static DevCenterScheduleEnableStatus IsDisabled { get; } = new DevCenterScheduleEnableStatus(IsDisabledValue); /// Determines if two values are the same. public static bool operator ==(DevCenterScheduleEnableStatus left, DevCenterScheduleEnableStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledFrequency.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledFrequency.cs index 8498bc04525b..2f9a5ba5ca3e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledFrequency.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledFrequency.cs @@ -24,7 +24,7 @@ public DevCenterScheduledFrequency(string value) private const string DailyValue = "Daily"; - /// Daily. + /// The scheduled task will run daily. public static DevCenterScheduledFrequency Daily { get; } = new DevCenterScheduledFrequency(DailyValue); /// Determines if two values are the same. public static bool operator ==(DevCenterScheduledFrequency left, DevCenterScheduledFrequency right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledType.cs index 9ed0d6826476..a28207f630fe 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledType.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterScheduledType.cs @@ -24,7 +24,7 @@ public DevCenterScheduledType(string value) private const string StopDevBoxValue = "StopDevBox"; - /// StopDevBox. + /// Stop Dev Box task type. public static DevCenterScheduledType StopDevBox { get; } = new DevCenterScheduledType(StopDevBoxValue); /// Determines if two values are the same. public static bool operator ==(DevCenterScheduledType left, DevCenterScheduledType right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSku.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSku.cs index d050675837d6..63c85f3295c2 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSku.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSku.cs @@ -46,7 +46,7 @@ public partial class DevCenterSku private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. /// is null. public DevCenterSku(string name) { @@ -56,7 +56,7 @@ public DevCenterSku(string name) } /// Initializes a new instance of . - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// If the service has different generations of hardware, for the same SKU, then that can be captured here. @@ -77,7 +77,7 @@ internal DevCenterSku() { } - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. public string Name { get; set; } /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. public DevCenterSkuTier? Tier { get; set; } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSkuDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSkuDetails.cs index 422e78d7f3e7..dc08dffb1e6d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSkuDetails.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterSkuDetails.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.DevCenter.Models public partial class DevCenterSkuDetails : DevCenterSku { /// Initializes a new instance of . - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. /// is null. public DevCenterSkuDetails(string name) : base(name) { @@ -26,7 +26,7 @@ public DevCenterSkuDetails(string name) : base(name) } /// Initializes a new instance of . - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// If the service has different generations of hardware, for the same SKU, then that can be captured here. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.Serialization.cs index ff4c163b720a..849f41c22975 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteObjectValue(Name, options); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +100,7 @@ internal static DevCenterUsage DeserializeDevCenterUsage(JsonElement element, Mo long? limit = default; DevCenterUsageUnit? unit = default; DevCenterUsageName name = default; + ResourceIdentifier id = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -135,13 +141,28 @@ internal static DevCenterUsage DeserializeDevCenterUsage(JsonElement element, Mo name = DevCenterUsageName.DeserializeDevCenterUsageName(property.Value, options); continue; } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevCenterUsage(currentValue, limit, unit, name, serializedAdditionalRawData); + return new DevCenterUsage( + currentValue, + limit, + unit, + name, + id, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.cs index 44598b225d52..ada20ae163bb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevCenterUsage.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.DevCenter.Models { @@ -55,13 +56,15 @@ internal DevCenterUsage() /// The limit integer. /// The unit details. /// The name. + /// The fully qualified arm resource id. /// Keeps track of any properties unknown to the library. - internal DevCenterUsage(long? currentValue, long? limit, DevCenterUsageUnit? unit, DevCenterUsageName name, IDictionary serializedAdditionalRawData) + internal DevCenterUsage(long? currentValue, long? limit, DevCenterUsageUnit? unit, DevCenterUsageName name, ResourceIdentifier id, IDictionary serializedAdditionalRawData) { CurrentValue = currentValue; Limit = limit; Unit = unit; Name = name; + Id = id; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -73,5 +76,7 @@ internal DevCenterUsage(long? currentValue, long? limit, DevCenterUsageUnit? uni public DevCenterUsageUnit? Unit { get; } /// The name. public DevCenterUsageName Name { get; } + /// The fully qualified arm resource id. + public ResourceIdentifier Id { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevboxDisksEncryptionEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevboxDisksEncryptionEnableStatus.cs new file mode 100644 index 000000000000..ba3c59bb249a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DevboxDisksEncryptionEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption is enabled or not. + public readonly partial struct DevboxDisksEncryptionEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevboxDisksEncryptionEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Devbox disks encryption is enabled. + public static DevboxDisksEncryptionEnableStatus Enabled { get; } = new DevboxDisksEncryptionEnableStatus(EnabledValue); + /// Devbox disks encryption is disabled. + public static DevboxDisksEncryptionEnableStatus Disabled { get; } = new DevboxDisksEncryptionEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DevboxDisksEncryptionEnableStatus left, DevboxDisksEncryptionEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevboxDisksEncryptionEnableStatus left, DevboxDisksEncryptionEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevboxDisksEncryptionEnableStatus(string value) => new DevboxDisksEncryptionEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevboxDisksEncryptionEnableStatus other && Equals(other); + /// + public bool Equals(DevboxDisksEncryptionEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DomainJoinType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DomainJoinType.cs index 8bd83056530b..2b2921c14399 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DomainJoinType.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/DomainJoinType.cs @@ -24,11 +24,14 @@ public DomainJoinType(string value) private const string HybridAadJoinValue = "HybridAzureADJoin"; private const string AadJoinValue = "AzureADJoin"; + private const string NoneValue = "None"; - /// HybridAzureADJoin. + /// Hybrid Azure AD Join type. public static DomainJoinType HybridAadJoin { get; } = new DomainJoinType(HybridAadJoinValue); - /// AzureADJoin. + /// Azure AD Join type. public static DomainJoinType AadJoin { get; } = new DomainJoinType(AadJoinValue); + /// No Active Directory join type. + public static DomainJoinType None { get; } = new DomainJoinType(NoneValue); /// Determines if two values are the same. public static bool operator ==(DomainJoinType left, DomainJoinType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.Serialization.cs new file mode 100644 index 000000000000..4fa031c3709c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class Encryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Encryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CustomerManagedKeyEncryption)) + { + writer.WritePropertyName("customerManagedKeyEncryption"u8); + writer.WriteObjectValue(CustomerManagedKeyEncryption, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Encryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Encryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEncryption(document.RootElement, options); + } + + internal static Encryption DeserializeEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomerManagedKeyEncryption customerManagedKeyEncryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customerManagedKeyEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customerManagedKeyEncryption = CustomerManagedKeyEncryption.DeserializeCustomerManagedKeyEncryption(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Encryption(customerManagedKeyEncryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(Encryption)} does not support writing '{options.Format}' format."); + } + } + + Encryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Encryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.cs new file mode 100644 index 000000000000..259547d80166 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/Encryption.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Encryption properties. + internal partial class Encryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Encryption() + { + } + + /// Initializes a new instance of . + /// All Customer-managed key encryption properties for the resource. + /// Keeps track of any properties unknown to the library. + internal Encryption(CustomerManagedKeyEncryption customerManagedKeyEncryption, IDictionary serializedAdditionalRawData) + { + CustomerManagedKeyEncryption = customerManagedKeyEncryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// All Customer-managed key encryption properties for the resource. + public CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.Serialization.cs new file mode 100644 index 000000000000..10479c351c36 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class EncryptionSetListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EncryptionSetListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EncryptionSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EncryptionSetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEncryptionSetListResult(document.RootElement, options); + } + + internal static EncryptionSetListResult DeserializeEncryptionSetListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevCenterEncryptionSetData.DeserializeDevCenterEncryptionSetData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EncryptionSetListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(EncryptionSetListResult)} does not support writing '{options.Format}' format."); + } + } + + EncryptionSetListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEncryptionSetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EncryptionSetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.cs new file mode 100644 index 000000000000..09fc693bf72b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EncryptionSetListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of DevCenterEncryptionSet items. + internal partial class EncryptionSetListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DevCenterEncryptionSet items on this page. + internal EncryptionSetListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DevCenterEncryptionSet items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EncryptionSetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EncryptionSetListResult() + { + } + + /// The DevCenterEncryptionSet items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.Serialization.cs new file mode 100644 index 000000000000..2b3b5fb477af --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class EnvironmentDefinitionContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentDefinitionContent)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id.Value); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(ParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ParameterType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(IsReadOnly)) + { + writer.WritePropertyName("readOnly"u8); + writer.WriteBooleanValue(IsReadOnly.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsRequired)) + { + writer.WritePropertyName("required"u8); + writer.WriteBooleanValue(IsRequired.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnvironmentDefinitionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentDefinitionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnvironmentDefinitionContent(document.RootElement, options); + } + + internal static EnvironmentDefinitionContent DeserializeEnvironmentDefinitionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid? id = default; + string name = default; + string description = default; + EnvironmentDefinitionParameterType? type = default; + bool? readOnly = default; + bool? required = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new EnvironmentDefinitionParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("readOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("required"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + required = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnvironmentDefinitionContent( + id, + name, + description, + type, + readOnly, + required, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(EnvironmentDefinitionContent)} does not support writing '{options.Format}' format."); + } + } + + EnvironmentDefinitionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnvironmentDefinitionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnvironmentDefinitionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.cs new file mode 100644 index 000000000000..a2c58f429ed7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionContent.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Properties of an Environment Definition parameter. + public partial class EnvironmentDefinitionContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal EnvironmentDefinitionContent() + { + } + + /// Initializes a new instance of . + /// Unique ID of the parameter. + /// Display name of the parameter. + /// Description of the parameter. + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string). + /// Whether or not this parameter is read-only. If true, default should have a value. + /// Whether or not this parameter is required. + /// Keeps track of any properties unknown to the library. + internal EnvironmentDefinitionContent(Guid? id, string name, string description, EnvironmentDefinitionParameterType? parameterType, bool? isReadOnly, bool? isRequired, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + Description = description; + ParameterType = parameterType; + IsReadOnly = isReadOnly; + IsRequired = isRequired; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique ID of the parameter. + public Guid? Id { get; } + /// Display name of the parameter. + public string Name { get; } + /// Description of the parameter. + public string Description { get; } + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string). + public EnvironmentDefinitionParameterType? ParameterType { get; } + /// Whether or not this parameter is read-only. If true, default should have a value. + public bool? IsReadOnly { get; } + /// Whether or not this parameter is required. + public bool? IsRequired { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.Serialization.cs new file mode 100644 index 000000000000..9c03de18c9eb --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class EnvironmentDefinitionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentDefinitionListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnvironmentDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentDefinitionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnvironmentDefinitionListResult(document.RootElement, options); + } + + internal static EnvironmentDefinitionListResult DeserializeEnvironmentDefinitionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnvironmentDefinitionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(EnvironmentDefinitionListResult)} does not support writing '{options.Format}' format."); + } + } + + EnvironmentDefinitionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnvironmentDefinitionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnvironmentDefinitionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.cs new file mode 100644 index 000000000000..92ba86bcff0b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of EnvironmentDefinition items. + internal partial class EnvironmentDefinitionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The EnvironmentDefinition items on this page. + internal EnvironmentDefinitionListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The EnvironmentDefinition items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EnvironmentDefinitionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EnvironmentDefinitionListResult() + { + } + + /// The EnvironmentDefinition items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionParameterType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionParameterType.cs new file mode 100644 index 000000000000..d05681088ebe --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentDefinitionParameterType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The type of data a parameter accepts. + public readonly partial struct EnvironmentDefinitionParameterType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnvironmentDefinitionParameterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ArrayValue = "array"; + private const string BooleanValue = "boolean"; + private const string IntegerValue = "integer"; + private const string NumberValue = "number"; + private const string ObjectValue = "object"; + private const string StringValue = "string"; + + /// The parameter accepts an array of values. + public static EnvironmentDefinitionParameterType Array { get; } = new EnvironmentDefinitionParameterType(ArrayValue); + /// The parameter accepts a boolean value. + public static EnvironmentDefinitionParameterType Boolean { get; } = new EnvironmentDefinitionParameterType(BooleanValue); + /// The parameter accepts an integer value. + public static EnvironmentDefinitionParameterType Integer { get; } = new EnvironmentDefinitionParameterType(IntegerValue); + /// The parameter accepts a number value. + public static EnvironmentDefinitionParameterType Number { get; } = new EnvironmentDefinitionParameterType(NumberValue); + /// The parameter accepts an object value. + public static EnvironmentDefinitionParameterType Object { get; } = new EnvironmentDefinitionParameterType(ObjectValue); + /// The parameter accepts a string value. + public static EnvironmentDefinitionParameterType String { get; } = new EnvironmentDefinitionParameterType(StringValue); + /// Determines if two values are the same. + public static bool operator ==(EnvironmentDefinitionParameterType left, EnvironmentDefinitionParameterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnvironmentDefinitionParameterType left, EnvironmentDefinitionParameterType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnvironmentDefinitionParameterType(string value) => new EnvironmentDefinitionParameterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnvironmentDefinitionParameterType other && Equals(other); + /// + public bool Equals(EnvironmentDefinitionParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeEnableStatus.cs index d44f0a55b705..1a13b48b681e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeEnableStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeEnableStatus.cs @@ -25,9 +25,9 @@ public EnvironmentTypeEnableStatus(string value) private const string IsEnabledValue = "Enabled"; private const string IsDisabledValue = "Disabled"; - /// Enabled. + /// Environment type is enabled. public static EnvironmentTypeEnableStatus IsEnabled { get; } = new EnvironmentTypeEnableStatus(IsEnabledValue); - /// Disabled. + /// Environment type is disabled. public static EnvironmentTypeEnableStatus IsDisabled { get; } = new EnvironmentTypeEnableStatus(IsDisabledValue); /// Determines if two values are the same. public static bool operator ==(EnvironmentTypeEnableStatus left, EnvironmentTypeEnableStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.Serialization.cs index e527cd7e3aad..2a1dbbabdfea 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EnvironmentTypeListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static EnvironmentTypeListResult DeserializeEnvironmentTypeListResult(J return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static EnvironmentTypeListResult DeserializeEnvironmentTypeListResult(J } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static EnvironmentTypeListResult DeserializeEnvironmentTypeListResult(J } } serializedAdditionalRawData = rawDataDictionary; - return new EnvironmentTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new EnvironmentTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.cs index d9ec64cd37d9..ae2c59f1ff22 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/EnvironmentTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the environment type list operation. + /// Paged collection of EnvironmentType items. internal partial class EnvironmentTypeListResult { /// @@ -46,25 +47,31 @@ internal partial class EnvironmentTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EnvironmentTypeListResult() + /// The EnvironmentType items on this page. + internal EnvironmentTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The EnvironmentType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal EnvironmentTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal EnvironmentTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal EnvironmentTypeListResult() + { + } + + /// The EnvironmentType items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.Serialization.cs index 8809bab0c2f9..0fd978cb5352 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GalleryListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static GalleryListResult DeserializeGalleryListResult(JsonElement eleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static GalleryListResult DeserializeGalleryListResult(JsonElement eleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static GalleryListResult DeserializeGalleryListResult(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new GalleryListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new GalleryListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.cs index 6b1615a8db93..f8c6c95a4171 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/GalleryListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the gallery list operation. + /// Paged collection of Gallery items. internal partial class GalleryListResult { /// @@ -46,25 +47,31 @@ internal partial class GalleryListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal GalleryListResult() + /// The Gallery items on this page. + internal GalleryListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Gallery items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal GalleryListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal GalleryListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal GalleryListResult() + { + } + + /// The Gallery items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.Serialization.cs index d965c58caaf6..0a6b3d435b90 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthCheckStatusDetailsListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static HealthCheckStatusDetailsListResult DeserializeHealthCheckStatusD return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static HealthCheckStatusDetailsListResult DeserializeHealthCheckStatusD } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static HealthCheckStatusDetailsListResult DeserializeHealthCheckStatusD } } serializedAdditionalRawData = rawDataDictionary; - return new HealthCheckStatusDetailsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new HealthCheckStatusDetailsListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.cs index 6c638e3cb6ac..46da12b129e7 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/HealthCheckStatusDetailsListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the network health check list operation. + /// Paged collection of HealthCheckStatusDetails items. internal partial class HealthCheckStatusDetailsListResult { /// @@ -46,25 +47,31 @@ internal partial class HealthCheckStatusDetailsListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal HealthCheckStatusDetailsListResult() + /// The HealthCheckStatusDetails items on this page. + internal HealthCheckStatusDetailsListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The HealthCheckStatusDetails items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal HealthCheckStatusDetailsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal HealthCheckStatusDetailsListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal HealthCheckStatusDetailsListResult() + { + } + + /// The HealthCheckStatusDetails items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/IdentityType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/IdentityType.cs new file mode 100644 index 000000000000..2797c567bb44 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/IdentityType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public readonly partial struct IdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "systemAssignedIdentity"; + private const string UserAssignedIdentityValue = "userAssignedIdentity"; + private const string DelegatedResourceIdentityValue = "delegatedResourceIdentity"; + + /// systemAssignedIdentity. + public static IdentityType SystemAssignedIdentity { get; } = new IdentityType(SystemAssignedIdentityValue); + /// userAssignedIdentity. + public static IdentityType UserAssignedIdentity { get; } = new IdentityType(UserAssignedIdentityValue); + /// delegatedResourceIdentity. + public static IdentityType DelegatedResourceIdentity { get; } = new IdentityType(DelegatedResourceIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(IdentityType left, IdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IdentityType left, IdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IdentityType(string value) => new IdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IdentityType other && Equals(other); + /// + public bool Equals(IdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.Serialization.cs new file mode 100644 index 000000000000..10616b512d91 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageCreationErrorDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageCreationErrorDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageCreationErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageCreationErrorDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageCreationErrorDetails(document.RootElement, options); + } + + internal static ImageCreationErrorDetails DeserializeImageCreationErrorDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageCreationErrorDetails(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageCreationErrorDetails)} does not support writing '{options.Format}' format."); + } + } + + ImageCreationErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageCreationErrorDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageCreationErrorDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.cs new file mode 100644 index 000000000000..48793bbb4ed5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageCreationErrorDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Image creation error details. + public partial class ImageCreationErrorDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ImageCreationErrorDetails() + { + } + + /// Initializes a new instance of . + /// An identifier for the error. + /// A message describing the error. + /// Keeps track of any properties unknown to the library. + internal ImageCreationErrorDetails(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the error. + public string Code { get; } + /// A message describing the error. + public string Message { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.Serialization.cs new file mode 100644 index 000000000000..236da167e7f3 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageDefinitionBuildDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ImageReference)) + { + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + writer.WriteObjectValue(ErrorDetails, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(TaskGroups)) + { + writer.WritePropertyName("taskGroups"u8); + writer.WriteStartArray(); + foreach (var item in TaskGroups) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ImageDefinitionBuildDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionBuildDetails(document.RootElement, options); + } + + internal static ImageDefinitionBuildDetails DeserializeImageDefinitionBuildDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DevCenterImageReference imageReference = default; + ImageDefinitionBuildStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + ImageCreationErrorDetails errorDetails = default; + IReadOnlyList taskGroups = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ImageDefinitionBuildStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ImageCreationErrorDetails.DeserializeImageCreationErrorDetails(property.Value, options); + continue; + } + if (property.NameEquals("taskGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageDefinitionBuildTaskGroup.DeserializeImageDefinitionBuildTaskGroup(item, options)); + } + taskGroups = array; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionBuildDetails( + id, + name, + type, + systemData, + imageReference, + status, + startTime, + endTime, + errorDetails, + taskGroups ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildDetails)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionBuildDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionBuildDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.cs new file mode 100644 index 000000000000..d5bc105c8def --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildDetails.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Represents a specific build of an Image Definition. + public partial class ImageDefinitionBuildDetails : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ImageDefinitionBuildDetails() + { + TaskGroups = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The specific image version used by the build. + /// The status of the build. + /// Start time of the task group. + /// End time of the task group. + /// Details for image creation error. Populated when the image creation is not successful. + /// The list of task groups executed during the image definition build. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionBuildDetails(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevCenterImageReference imageReference, ImageDefinitionBuildStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ImageCreationErrorDetails errorDetails, IReadOnlyList taskGroups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ImageReference = imageReference; + Status = status; + StartOn = startOn; + EndOn = endOn; + ErrorDetails = errorDetails; + TaskGroups = taskGroups; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The specific image version used by the build. + public DevCenterImageReference ImageReference { get; } + /// The status of the build. + public ImageDefinitionBuildStatus? Status { get; } + /// Start time of the task group. + public DateTimeOffset? StartOn { get; } + /// End time of the task group. + public DateTimeOffset? EndOn { get; } + /// Details for image creation error. Populated when the image creation is not successful. + public ImageCreationErrorDetails ErrorDetails { get; } + /// The list of task groups executed during the image definition build. + public IReadOnlyList TaskGroups { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.Serialization.cs new file mode 100644 index 000000000000..8da2850ec5c5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class ImageDefinitionBuildListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionBuildListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionBuildListResult(document.RootElement, options); + } + + internal static ImageDefinitionBuildListResult DeserializeImageDefinitionBuildListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionBuildListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildListResult)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionBuildListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionBuildListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.cs new file mode 100644 index 000000000000..dea32409dbaa --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of ImageDefinitionBuild items. + internal partial class ImageDefinitionBuildListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ImageDefinitionBuild items on this page. + internal ImageDefinitionBuildListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ImageDefinitionBuild items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionBuildListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImageDefinitionBuildListResult() + { + } + + /// The ImageDefinitionBuild items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildStatus.cs new file mode 100644 index 000000000000..a37096b0caf8 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildStatus.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The state of an Image Definition Build. + public readonly partial struct ImageDefinitionBuildStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageDefinitionBuildStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string RunningValue = "Running"; + private const string ValidationFailedValue = "ValidationFailed"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string TimedOutValue = "TimedOut"; + + /// The image build has succeeded. + public static ImageDefinitionBuildStatus Succeeded { get; } = new ImageDefinitionBuildStatus(SucceededValue); + /// The image build is running. + public static ImageDefinitionBuildStatus Running { get; } = new ImageDefinitionBuildStatus(RunningValue); + /// The built image has failed validation. + public static ImageDefinitionBuildStatus ValidationFailed { get; } = new ImageDefinitionBuildStatus(ValidationFailedValue); + /// The image build has failed. + public static ImageDefinitionBuildStatus Failed { get; } = new ImageDefinitionBuildStatus(FailedValue); + /// The image build has been cancelled. + public static ImageDefinitionBuildStatus Cancelled { get; } = new ImageDefinitionBuildStatus(CancelledValue); + /// The image build has timed out. + public static ImageDefinitionBuildStatus TimedOut { get; } = new ImageDefinitionBuildStatus(TimedOutValue); + /// Determines if two values are the same. + public static bool operator ==(ImageDefinitionBuildStatus left, ImageDefinitionBuildStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageDefinitionBuildStatus left, ImageDefinitionBuildStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ImageDefinitionBuildStatus(string value) => new ImageDefinitionBuildStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageDefinitionBuildStatus other && Equals(other); + /// + public bool Equals(ImageDefinitionBuildStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.Serialization.cs new file mode 100644 index 000000000000..521029662ae9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageDefinitionBuildTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTask)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LogUri)) + { + writer.WritePropertyName("logUri"u8); + writer.WriteStringValue(LogUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionBuildTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionBuildTask(document.RootElement, options); + } + + internal static ImageDefinitionBuildTask DeserializeImageDefinitionBuildTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IReadOnlyList parameters = default; + string displayName = default; + string id = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + ImageDefinitionBuildStatus? status = default; + Uri logUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageDefinitionBuildTaskParametersItem.DeserializeImageDefinitionBuildTaskParametersItem(item, options)); + } + parameters = array; + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ImageDefinitionBuildStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("logUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionBuildTask( + name, + parameters ?? new ChangeTrackingList(), + displayName, + id, + startTime, + endTime, + status, + logUri, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTask)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionBuildTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionBuildTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.cs new file mode 100644 index 000000000000..c0c09289933e --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTask.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A task executed during the image definition build. + public partial class ImageDefinitionBuildTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ImageDefinitionBuildTask() + { + Parameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the task. + /// Parameters for the task. + /// Display name to help differentiate multiple instances of the same task. + /// ID of the task instance. + /// Start time of the task. + /// End time of the task. + /// The status of the task. + /// The URI for retrieving logs for the task execution. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionBuildTask(string name, IReadOnlyList parameters, string displayName, string id, DateTimeOffset? startOn, DateTimeOffset? endOn, ImageDefinitionBuildStatus? status, Uri logUri, IDictionary serializedAdditionalRawData) + { + Name = name; + Parameters = parameters; + DisplayName = displayName; + Id = id; + StartOn = startOn; + EndOn = endOn; + Status = status; + LogUri = logUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the task. + public string Name { get; } + /// Parameters for the task. + public IReadOnlyList Parameters { get; } + /// Display name to help differentiate multiple instances of the same task. + public string DisplayName { get; } + /// ID of the task instance. + public string Id { get; } + /// Start time of the task. + public DateTimeOffset? StartOn { get; } + /// End time of the task. + public DateTimeOffset? EndOn { get; } + /// The status of the task. + public ImageDefinitionBuildStatus? Status { get; } + /// The URI for retrieving logs for the task execution. + public Uri LogUri { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.Serialization.cs new file mode 100644 index 000000000000..a8a987d61202 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageDefinitionBuildTaskGroup : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskGroup)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Tasks)) + { + writer.WritePropertyName("tasks"u8); + writer.WriteStartArray(); + foreach (var item in Tasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionBuildTaskGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskGroup)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionBuildTaskGroup(document.RootElement, options); + } + + internal static ImageDefinitionBuildTaskGroup DeserializeImageDefinitionBuildTaskGroup(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ImageDefinitionBuildStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IReadOnlyList tasks = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ImageDefinitionBuildStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("tasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageDefinitionBuildTask.DeserializeImageDefinitionBuildTask(item, options)); + } + tasks = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionBuildTaskGroup( + name, + status, + startTime, + endTime, + tasks ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskGroup)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionBuildTaskGroup IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionBuildTaskGroup(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskGroup)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.cs new file mode 100644 index 000000000000..7035f0e41eea --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskGroup.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A task group executed during the image definition build. + public partial class ImageDefinitionBuildTaskGroup + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ImageDefinitionBuildTaskGroup() + { + Tasks = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the task group. + /// The status of the task group. + /// Start time of the task group. + /// End time of the task group. + /// The list of tasks executed during the task group. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionBuildTaskGroup(string name, ImageDefinitionBuildStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList tasks, IDictionary serializedAdditionalRawData) + { + Name = name; + Status = status; + StartOn = startOn; + EndOn = endOn; + Tasks = tasks; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the task group. + public string Name { get; } + /// The status of the task group. + public ImageDefinitionBuildStatus? Status { get; } + /// Start time of the task group. + public DateTimeOffset? StartOn { get; } + /// End time of the task group. + public DateTimeOffset? EndOn { get; } + /// The list of tasks executed during the task group. + public IReadOnlyList Tasks { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.Serialization.cs new file mode 100644 index 000000000000..a9e5b3c16bbc --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageDefinitionBuildTaskParametersItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskParametersItem)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionBuildTaskParametersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskParametersItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionBuildTaskParametersItem(document.RootElement, options); + } + + internal static ImageDefinitionBuildTaskParametersItem DeserializeImageDefinitionBuildTaskParametersItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionBuildTaskParametersItem(key, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskParametersItem)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionBuildTaskParametersItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionBuildTaskParametersItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionBuildTaskParametersItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.cs new file mode 100644 index 000000000000..7d6cf80bad39 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionBuildTaskParametersItem.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Parameters for an image definition build task. + public partial class ImageDefinitionBuildTaskParametersItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Key of the parameter. + /// Value of the parameter. + /// or is null. + internal ImageDefinitionBuildTaskParametersItem(string key, string value) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + Key = key; + Value = value; + } + + /// Initializes a new instance of . + /// Key of the parameter. + /// Value of the parameter. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionBuildTaskParametersItem(string key, string value, IDictionary serializedAdditionalRawData) + { + Key = key; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImageDefinitionBuildTaskParametersItem() + { + } + + /// Key of the parameter. + public string Key { get; } + /// Value of the parameter. + public string Value { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.Serialization.cs new file mode 100644 index 000000000000..635e896d4978 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class ImageDefinitionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionListResult(document.RootElement, options); + } + + internal static ImageDefinitionListResult DeserializeImageDefinitionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionListResult)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.cs new file mode 100644 index 000000000000..3d2fa5bccba7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of ImageDefinition items. + internal partial class ImageDefinitionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ImageDefinition items on this page. + internal ImageDefinitionListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ImageDefinition items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImageDefinitionListResult() + { + } + + /// The ImageDefinition items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.Serialization.cs new file mode 100644 index 000000000000..b789f986fad2 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ImageDefinitionReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionReference)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("imageDefinition"u8); + writer.WriteStringValue(ImageDefinition); + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageDefinitionReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageDefinitionReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageDefinitionReference(document.RootElement, options); + } + + internal static ImageDefinitionReference DeserializeImageDefinitionReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string imageDefinition = default; + IList parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageDefinition"u8)) + { + imageDefinition = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DefinitionParametersItem.DeserializeDefinitionParametersItem(item, options)); + } + parameters = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageDefinitionReference(imageDefinition, parameters ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ImageDefinitionReference)} does not support writing '{options.Format}' format."); + } + } + + ImageDefinitionReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageDefinitionReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageDefinitionReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.cs new file mode 100644 index 000000000000..89602729d1bf --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageDefinitionReference.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A reference to an Image Definition. + public partial class ImageDefinitionReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the referenced Image Definition. + /// is null. + public ImageDefinitionReference(string imageDefinition) + { + Argument.AssertNotNull(imageDefinition, nameof(imageDefinition)); + + ImageDefinition = imageDefinition; + Parameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the referenced Image Definition. + /// Parameters for the referenced Image Definition. + /// Keeps track of any properties unknown to the library. + internal ImageDefinitionReference(string imageDefinition, IList parameters, IDictionary serializedAdditionalRawData) + { + ImageDefinition = imageDefinition; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImageDefinitionReference() + { + } + + /// Name of the referenced Image Definition. + public string ImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + public IList Parameters { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageValidationStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageValidationStatus.cs index b26fc53b9f83..68f9177fe681 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageValidationStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageValidationStatus.cs @@ -28,15 +28,15 @@ public ImageValidationStatus(string value) private const string FailedValue = "Failed"; private const string TimedOutValue = "TimedOut"; - /// Unknown. + /// Unknown image validation status. public static ImageValidationStatus Unknown { get; } = new ImageValidationStatus(UnknownValue); - /// Pending. + /// Pending image validation status. public static ImageValidationStatus Pending { get; } = new ImageValidationStatus(PendingValue); - /// Succeeded. + /// Succeeded image validation status. public static ImageValidationStatus Succeeded { get; } = new ImageValidationStatus(SucceededValue); - /// Failed. + /// Failed image validation status. public static ImageValidationStatus Failed { get; } = new ImageValidationStatus(FailedValue); - /// TimedOut. + /// Timed out image validation status. public static ImageValidationStatus TimedOut { get; } = new ImageValidationStatus(TimedOutValue); /// Determines if two values are the same. public static bool operator ==(ImageValidationStatus left, ImageValidationStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.Serialization.cs index e89760a9d43c..a235be65ca91 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ImageVersionListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ImageVersionListResult DeserializeImageVersionListResult(JsonEle return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ImageVersionListResult DeserializeImageVersionListResult(JsonEle } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ImageVersionListResult DeserializeImageVersionListResult(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new ImageVersionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ImageVersionListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.cs index e01b16c18b40..cfa74b87a6e4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ImageVersionListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the image version list operation. + /// Paged collection of ImageVersion items. internal partial class ImageVersionListResult { /// @@ -46,25 +47,31 @@ internal partial class ImageVersionListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ImageVersionListResult() + /// The ImageVersion items on this page. + internal ImageVersionListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The ImageVersion items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ImageVersionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ImageVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal ImageVersionListResult() + { + } + + /// The ImageVersion items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.Serialization.cs new file mode 100644 index 000000000000..24755cb963ae --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class InheritedSettingsForProject : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InheritedSettingsForProject)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProjectCatalogSettings)) + { + writer.WritePropertyName("projectCatalogSettings"u8); + writer.WriteObjectValue(ProjectCatalogSettings, options); + } + if (options.Format != "W" && Optional.IsDefined(NetworkSettings)) + { + writer.WritePropertyName("networkSettings"u8); + writer.WriteObjectValue(NetworkSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InheritedSettingsForProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InheritedSettingsForProject)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInheritedSettingsForProject(document.RootElement, options); + } + + internal static InheritedSettingsForProject DeserializeInheritedSettingsForProject(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DevCenterProjectCatalogSettings projectCatalogSettings = default; + ProjectNetworkSettings networkSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectCatalogSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + projectCatalogSettings = DevCenterProjectCatalogSettings.DeserializeDevCenterProjectCatalogSettings(property.Value, options); + continue; + } + if (property.NameEquals("networkSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkSettings = ProjectNetworkSettings.DeserializeProjectNetworkSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InheritedSettingsForProject(projectCatalogSettings, networkSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(InheritedSettingsForProject)} does not support writing '{options.Format}' format."); + } + } + + InheritedSettingsForProject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInheritedSettingsForProject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InheritedSettingsForProject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.cs new file mode 100644 index 000000000000..6d3f1bbe7c78 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InheritedSettingsForProject.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Applicable inherited settings for a project. + public partial class InheritedSettingsForProject + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal InheritedSettingsForProject() + { + } + + /// Initializes a new instance of . + /// Dev Center settings to be used when associating a project with a catalog. + /// Network settings that will be enforced on this project. + /// Keeps track of any properties unknown to the library. + internal InheritedSettingsForProject(DevCenterProjectCatalogSettings projectCatalogSettings, ProjectNetworkSettings networkSettings, IDictionary serializedAdditionalRawData) + { + ProjectCatalogSettings = projectCatalogSettings; + NetworkSettings = networkSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Dev Center settings to be used when associating a project with a catalog. + internal DevCenterProjectCatalogSettings ProjectCatalogSettings { get; } + /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + public CatalogItemSyncEnableStatus? CatalogItemSyncEnableStatus + { + get => ProjectCatalogSettings?.CatalogItemSyncEnableStatus; + } + + /// Network settings that will be enforced on this project. + internal ProjectNetworkSettings NetworkSettings { get; } + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + public MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus + { + get => NetworkSettings?.MicrosoftHostedNetworkEnableStatus; + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InstallAzureMonitorAgentEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InstallAzureMonitorAgentEnableStatus.cs new file mode 100644 index 000000000000..ddc1f4952cda --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/InstallAzureMonitorAgentEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Setting to be used when determining whether to install the Azure Monitor Agent service on Dev Boxes that belong to this dev center. + public readonly partial struct InstallAzureMonitorAgentEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InstallAzureMonitorAgentEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Azure Monitor Agent service is enabled. + public static InstallAzureMonitorAgentEnableStatus Enabled { get; } = new InstallAzureMonitorAgentEnableStatus(EnabledValue); + /// Azure Monitor Agent service is disabled. + public static InstallAzureMonitorAgentEnableStatus Disabled { get; } = new InstallAzureMonitorAgentEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(InstallAzureMonitorAgentEnableStatus left, InstallAzureMonitorAgentEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InstallAzureMonitorAgentEnableStatus left, InstallAzureMonitorAgentEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InstallAzureMonitorAgentEnableStatus(string value) => new InstallAzureMonitorAgentEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InstallAzureMonitorAgentEnableStatus other && Equals(other); + /// + public bool Equals(InstallAzureMonitorAgentEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeepAwakeEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeepAwakeEnableStatus.cs new file mode 100644 index 000000000000..d712e5db7190 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeepAwakeEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Enables or disables whether Dev Boxes should be kept awake during active hours. + public readonly partial struct KeepAwakeEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KeepAwakeEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Keep awake is enabled. + public static KeepAwakeEnableStatus Enabled { get; } = new KeepAwakeEnableStatus(EnabledValue); + /// Keep awake is disabled. + public static KeepAwakeEnableStatus Disabled { get; } = new KeepAwakeEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(KeepAwakeEnableStatus left, KeepAwakeEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KeepAwakeEnableStatus left, KeepAwakeEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KeepAwakeEnableStatus(string value) => new KeepAwakeEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KeepAwakeEnableStatus other && Equals(other); + /// + public bool Equals(KeepAwakeEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.Serialization.cs new file mode 100644 index 000000000000..4ca935aed819 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class KeyEncryptionKeyIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KeyEncryptionKeyIdentity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CmkIdentityType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(CmkIdentityType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + KeyEncryptionKeyIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KeyEncryptionKeyIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKeyEncryptionKeyIdentity(document.RootElement, options); + } + + internal static KeyEncryptionKeyIdentity DeserializeKeyEncryptionKeyIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CmkIdentityType? type = default; + string userAssignedIdentityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new CmkIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + userAssignedIdentityResourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KeyEncryptionKeyIdentity(type, userAssignedIdentityResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(KeyEncryptionKeyIdentity)} does not support writing '{options.Format}' format."); + } + } + + KeyEncryptionKeyIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKeyEncryptionKeyIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KeyEncryptionKeyIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.cs new file mode 100644 index 000000000000..e9117285aabf --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/KeyEncryptionKeyIdentity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// The managed identity configuration used for key vault access. + public partial class KeyEncryptionKeyIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public KeyEncryptionKeyIdentity() + { + } + + /// Initializes a new instance of . + /// The type of managed identity to use for key vault access. + /// For system assigned identity, this will be null. For user assigned identity, this should be the resource ID of the identity. + /// Keeps track of any properties unknown to the library. + internal KeyEncryptionKeyIdentity(CmkIdentityType? cmkIdentityType, string userAssignedIdentityResourceId, IDictionary serializedAdditionalRawData) + { + CmkIdentityType = cmkIdentityType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of managed identity to use for key vault access. + public CmkIdentityType? CmkIdentityType { get; set; } + /// For system assigned identity, this will be null. For user assigned identity, this should be the resource ID of the identity. + public string UserAssignedIdentityResourceId { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.Serialization.cs new file mode 100644 index 000000000000..5ab414ba734d --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class LatestImageBuild : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LatestImageBuild)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LatestImageBuild IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LatestImageBuild)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLatestImageBuild(document.RootElement, options); + } + + internal static LatestImageBuild DeserializeLatestImageBuild(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + ImageDefinitionBuildStatus? status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ImageDefinitionBuildStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LatestImageBuild(name, startTime, endTime, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(LatestImageBuild)} does not support writing '{options.Format}' format."); + } + } + + LatestImageBuild IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLatestImageBuild(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LatestImageBuild)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.cs new file mode 100644 index 000000000000..538fbb87d31b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LatestImageBuild.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Details about the latest build. + public partial class LatestImageBuild + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LatestImageBuild() + { + } + + /// Initializes a new instance of . + /// Identifier of a build. + /// Start time of the task group. + /// End time of the task group. + /// The state of an Image Definition Build. + /// Keeps track of any properties unknown to the library. + internal LatestImageBuild(string name, DateTimeOffset? startOn, DateTimeOffset? endOn, ImageDefinitionBuildStatus? status, IDictionary serializedAdditionalRawData) + { + Name = name; + StartOn = startOn; + EndOn = endOn; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Identifier of a build. + public string Name { get; } + /// Start time of the task group. + public DateTimeOffset? StartOn { get; } + /// End time of the task group. + public DateTimeOffset? EndOn { get; } + /// The state of an Image Definition Build. + public ImageDefinitionBuildStatus? Status { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.Serialization.cs index 856780417858..f9f19def25d1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ListUsagesResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ListUsagesResult DeserializeListUsagesResult(JsonElement element return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ListUsagesResult DeserializeListUsagesResult(JsonElement element } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ListUsagesResult DeserializeListUsagesResult(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new ListUsagesResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ListUsagesResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.cs index 8b3a828b909e..1e727bd567d3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ListUsagesResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { @@ -46,25 +47,31 @@ internal partial class ListUsagesResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ListUsagesResult() + /// The Usage items on this page. + internal ListUsagesResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// The array page of Usages. - /// The link to get the next page of Usage result. + /// The Usage items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ListUsagesResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ListUsagesResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The array page of Usages. + /// Initializes a new instance of for deserialization. + internal ListUsagesResult() + { + } + + /// The Usage items on this page. public IReadOnlyList Value { get; } - /// The link to get the next page of Usage result. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LocalAdminStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LocalAdminStatus.cs index 20e94f9b9b7b..c65a36aa2f1a 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LocalAdminStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/LocalAdminStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DevCenter.Models { - /// The LocalAdminStatus. + /// Local Administrator enable or disable status. Indicates whether owners of Dev Boxes are added as local administrators on the Dev Box. public readonly partial struct LocalAdminStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public LocalAdminStatus(string value) private const string IsDisabledValue = "Disabled"; private const string IsEnabledValue = "Enabled"; - /// Disabled. + /// Local administrator is disabled. public static LocalAdminStatus IsDisabled { get; } = new LocalAdminStatus(IsDisabledValue); - /// Enabled. + /// Local administrator is enabled. public static LocalAdminStatus IsEnabled { get; } = new LocalAdminStatus(IsEnabledValue); /// Determines if two values are the same. public static bool operator ==(LocalAdminStatus left, LocalAdminStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/MicrosoftHostedNetworkEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/MicrosoftHostedNetworkEnableStatus.cs new file mode 100644 index 000000000000..56cb3e0341fe --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/MicrosoftHostedNetworkEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + public readonly partial struct MicrosoftHostedNetworkEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MicrosoftHostedNetworkEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Microsoft Hosted Networks are enabled for this Dev Center. + public static MicrosoftHostedNetworkEnableStatus Enabled { get; } = new MicrosoftHostedNetworkEnableStatus(EnabledValue); + /// Microsoft Hosted Networks are disabled for this Dev Center. + public static MicrosoftHostedNetworkEnableStatus Disabled { get; } = new MicrosoftHostedNetworkEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MicrosoftHostedNetworkEnableStatus left, MicrosoftHostedNetworkEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MicrosoftHostedNetworkEnableStatus left, MicrosoftHostedNetworkEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MicrosoftHostedNetworkEnableStatus(string value) => new MicrosoftHostedNetworkEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MicrosoftHostedNetworkEnableStatus other && Equals(other); + /// + public bool Equals(MicrosoftHostedNetworkEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.Serialization.cs index 81229bbe94b5..41f636aacb3f 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkConnectionListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static NetworkConnectionListResult DeserializeNetworkConnectionListResu return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static NetworkConnectionListResult DeserializeNetworkConnectionListResu } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static NetworkConnectionListResult DeserializeNetworkConnectionListResu } } serializedAdditionalRawData = rawDataDictionary; - return new NetworkConnectionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NetworkConnectionListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.cs index 452bbb8b4374..9b302b9814e6 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/NetworkConnectionListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the network connection list operation. + /// Paged collection of NetworkConnection items. internal partial class NetworkConnectionListResult { /// @@ -46,25 +47,31 @@ internal partial class NetworkConnectionListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NetworkConnectionListResult() + /// The NetworkConnection items on this page. + internal NetworkConnectionListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The NetworkConnection items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NetworkConnectionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NetworkConnectionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal NetworkConnectionListResult() + { + } + + /// The NetworkConnection items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs index 0f854667b1cb..0107a86e92e8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OutboundEnvironmentEndpointCollection)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static OutboundEnvironmentEndpointCollection DeserializeOutboundEnviron return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static OutboundEnvironmentEndpointCollection DeserializeOutboundEnviron } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static OutboundEnvironmentEndpointCollection DeserializeOutboundEnviron } } serializedAdditionalRawData = rawDataDictionary; - return new OutboundEnvironmentEndpointCollection(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new OutboundEnvironmentEndpointCollection(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs index 02cc979e1cfc..a9d7b8ac426b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { @@ -46,25 +47,31 @@ internal partial class OutboundEnvironmentEndpointCollection private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal OutboundEnvironmentEndpointCollection() + /// The OutboundEnvironmentEndpoint items on this page. + internal OutboundEnvironmentEndpointCollection(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// The collection of outbound network dependency endpoints returned by the listing operation. - /// The continuation token. + /// The OutboundEnvironmentEndpoint items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal OutboundEnvironmentEndpointCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal OutboundEnvironmentEndpointCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The collection of outbound network dependency endpoints returned by the listing operation. + /// Initializes a new instance of for deserialization. + internal OutboundEnvironmentEndpointCollection() + { + } + + /// The OutboundEnvironmentEndpoint items on this page. public IReadOnlyList Value { get; } - /// The continuation token. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PolicyAction.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PolicyAction.cs new file mode 100644 index 000000000000..7d4bdeec1359 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PolicyAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates what action to perform for the policy. + public readonly partial struct PolicyAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow action for the policy. + public static PolicyAction Allow { get; } = new PolicyAction(AllowValue); + /// Deny action for the policy. + public static PolicyAction Deny { get; } = new PolicyAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyAction left, PolicyAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyAction left, PolicyAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyAction(string value) => new PolicyAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyAction other && Equals(other); + /// + public bool Equals(PolicyAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.Serialization.cs new file mode 100644 index 000000000000..a32236356543 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class PoolDevBox : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PoolDevBox)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ImageReference)) + { + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && Optional.IsDefined(ActiveImageReference)) + { + writer.WritePropertyName("activeImageReference"u8); + writer.WriteObjectValue(ActiveImageReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PoolDevBox IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PoolDevBox)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePoolDevBox(document.RootElement, options); + } + + internal static PoolDevBox DeserializePoolDevBox(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DevCenterImageReference imageReference = default; + DevCenterSku sku = default; + DevCenterImageReference activeImageReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property.Value, options); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DevCenterSku.DeserializeDevCenterSku(property.Value, options); + continue; + } + if (property.NameEquals("activeImageReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeImageReference = DevCenterImageReference.DeserializeDevCenterImageReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PoolDevBox(imageReference, sku, activeImageReference, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(PoolDevBox)} does not support writing '{options.Format}' format."); + } + } + + PoolDevBox IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePoolDevBox(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PoolDevBox)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.cs new file mode 100644 index 000000000000..2540d9b14217 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBox.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Represents a definition for a Developer Machine. + public partial class PoolDevBox + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PoolDevBox() + { + } + + /// Initializes a new instance of . + /// Image reference information. + /// The SKU for Dev Boxes created from the Pool. + /// Image reference information for the currently active image (only populated during updates). + /// Keeps track of any properties unknown to the library. + internal PoolDevBox(DevCenterImageReference imageReference, DevCenterSku sku, DevCenterImageReference activeImageReference, IDictionary serializedAdditionalRawData) + { + ImageReference = imageReference; + Sku = sku; + ActiveImageReference = activeImageReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Image reference information. + public DevCenterImageReference ImageReference { get; set; } + /// The SKU for Dev Boxes created from the Pool. + public DevCenterSku Sku { get; set; } + /// Image reference information for the currently active image (only populated during updates). + public DevCenterImageReference ActiveImageReference { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBoxDefinitionType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBoxDefinitionType.cs new file mode 100644 index 000000000000..4f090227b7d1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolDevBoxDefinitionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + public readonly partial struct PoolDevBoxDefinitionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PoolDevBoxDefinitionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReferenceValue = "Reference"; + private const string ValueValue = "Value"; + + /// Indicates the pool is created from an existing Dev Box definition. + public static PoolDevBoxDefinitionType Reference { get; } = new PoolDevBoxDefinitionType(ReferenceValue); + /// Indicates the pool is created from a Dev Box definition that's created from an image reference and a SKU directly. This is used for creating an image definition pool or an image pool. + public static PoolDevBoxDefinitionType Value { get; } = new PoolDevBoxDefinitionType(ValueValue); + /// Determines if two values are the same. + public static bool operator ==(PoolDevBoxDefinitionType left, PoolDevBoxDefinitionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PoolDevBoxDefinitionType left, PoolDevBoxDefinitionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PoolDevBoxDefinitionType(string value) => new PoolDevBoxDefinitionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PoolDevBoxDefinitionType other && Equals(other); + /// + public bool Equals(PoolDevBoxDefinitionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.Serialization.cs index caf52c9cd97c..f9f8b2658f93 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PoolListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static PoolListResult DeserializePoolListResult(JsonElement element, Mo return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static PoolListResult DeserializePoolListResult(JsonElement element, Mo } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static PoolListResult DeserializePoolListResult(JsonElement element, Mo } } serializedAdditionalRawData = rawDataDictionary; - return new PoolListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new PoolListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.cs index d03f40c339db..356798396713 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the machine pool list operation. + /// Paged collection of Pool items. internal partial class PoolListResult { /// @@ -46,25 +47,31 @@ internal partial class PoolListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal PoolListResult() + /// The Pool items on this page. + internal PoolListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Pool items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal PoolListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal PoolListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal PoolListResult() + { + } + + /// The Pool items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolUpdateSingleSignOnStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolUpdateSingleSignOnStatus.cs new file mode 100644 index 000000000000..bebcb9787f69 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/PoolUpdateSingleSignOnStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// SingleSignOn (SSO) enable or disable status. Indicates whether Dev Boxes in the Pool will have SSO enabled or disabled. + public readonly partial struct PoolUpdateSingleSignOnStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PoolUpdateSingleSignOnStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Single Sign On is disabled. + public static PoolUpdateSingleSignOnStatus Disabled { get; } = new PoolUpdateSingleSignOnStatus(DisabledValue); + /// Single Sign On is enabled. + public static PoolUpdateSingleSignOnStatus Enabled { get; } = new PoolUpdateSingleSignOnStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(PoolUpdateSingleSignOnStatus left, PoolUpdateSingleSignOnStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PoolUpdateSingleSignOnStatus left, PoolUpdateSingleSignOnStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PoolUpdateSingleSignOnStatus(string value) => new PoolUpdateSingleSignOnStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PoolUpdateSingleSignOnStatus other && Equals(other); + /// + public bool Equals(PoolUpdateSingleSignOnStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.Serialization.cs new file mode 100644 index 000000000000..5ccf01e2666b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class ProjectCatalogSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCatalogSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(CatalogItemSyncTypes)) + { + writer.WritePropertyName("catalogItemSyncTypes"u8); + writer.WriteStartArray(); + foreach (var item in CatalogItemSyncTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectCatalogSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCatalogSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectCatalogSettings(document.RootElement, options); + } + + internal static ProjectCatalogSettings DeserializeProjectCatalogSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList catalogItemSyncTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("catalogItemSyncTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new CatalogItemType(item.GetString())); + } + catalogItemSyncTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectCatalogSettings(catalogItemSyncTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectCatalogSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectCatalogSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectCatalogSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectCatalogSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.cs new file mode 100644 index 000000000000..82d913318dfa --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCatalogSettings.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Settings to be used when associating a project with a catalog. + internal partial class ProjectCatalogSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectCatalogSettings() + { + CatalogItemSyncTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Indicates catalog item types that can be synced. + /// Keeps track of any properties unknown to the library. + internal ProjectCatalogSettings(IList catalogItemSyncTypes, IDictionary serializedAdditionalRawData) + { + CatalogItemSyncTypes = catalogItemSyncTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates catalog item types that can be synced. + public IList CatalogItemSyncTypes { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationIdentityType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationIdentityType.cs new file mode 100644 index 000000000000..7c1245640a70 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public readonly partial struct ProjectCustomizationIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProjectCustomizationIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "systemAssignedIdentity"; + private const string UserAssignedIdentityValue = "userAssignedIdentity"; + + /// System assigned identity type. + public static ProjectCustomizationIdentityType SystemAssignedIdentity { get; } = new ProjectCustomizationIdentityType(SystemAssignedIdentityValue); + /// User assigned identity type. + public static ProjectCustomizationIdentityType UserAssignedIdentity { get; } = new ProjectCustomizationIdentityType(UserAssignedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(ProjectCustomizationIdentityType left, ProjectCustomizationIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProjectCustomizationIdentityType left, ProjectCustomizationIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProjectCustomizationIdentityType(string value) => new ProjectCustomizationIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProjectCustomizationIdentityType other && Equals(other); + /// + public bool Equals(ProjectCustomizationIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.Serialization.cs new file mode 100644 index 000000000000..98b79882aab0 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ProjectCustomizationManagedIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCustomizationManagedIdentity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IdentityType)) + { + writer.WritePropertyName("identityType"u8); + writer.WriteStringValue(IdentityType.Value.ToString()); + } + if (Optional.IsDefined(IdentityResourceId)) + { + writer.WritePropertyName("identityResourceId"u8); + writer.WriteStringValue(IdentityResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectCustomizationManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCustomizationManagedIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectCustomizationManagedIdentity(document.RootElement, options); + } + + internal static ProjectCustomizationManagedIdentity DeserializeProjectCustomizationManagedIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectCustomizationIdentityType? identityType = default; + ResourceIdentifier identityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityType = new ProjectCustomizationIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("identityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectCustomizationManagedIdentity(identityType, identityResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectCustomizationManagedIdentity)} does not support writing '{options.Format}' format."); + } + } + + ProjectCustomizationManagedIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectCustomizationManagedIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectCustomizationManagedIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.cs new file mode 100644 index 000000000000..70a019481aa5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationManagedIdentity.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A reference to a Managed Identity that is attached to the Project. + public partial class ProjectCustomizationManagedIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectCustomizationManagedIdentity() + { + } + + /// Initializes a new instance of . + /// Values can be systemAssignedIdentity or userAssignedIdentity. + /// Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + /// Keeps track of any properties unknown to the library. + internal ProjectCustomizationManagedIdentity(ProjectCustomizationIdentityType? identityType, ResourceIdentifier identityResourceId, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + IdentityResourceId = identityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public ProjectCustomizationIdentityType? IdentityType { get; set; } + /// Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + public ResourceIdentifier IdentityResourceId { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.Serialization.cs new file mode 100644 index 000000000000..a723c2dd75d9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ProjectCustomizationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCustomizationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Identities)) + { + writer.WritePropertyName("identities"u8); + writer.WriteStartArray(); + foreach (var item in Identities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(UserCustomizationsEnableStatus)) + { + writer.WritePropertyName("userCustomizationsEnableStatus"u8); + writer.WriteStringValue(UserCustomizationsEnableStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectCustomizationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectCustomizationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectCustomizationSettings(document.RootElement, options); + } + + internal static ProjectCustomizationSettings DeserializeProjectCustomizationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList identities = default; + UserCustomizationsEnableStatus? userCustomizationsEnableStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProjectCustomizationManagedIdentity.DeserializeProjectCustomizationManagedIdentity(item, options)); + } + identities = array; + continue; + } + if (property.NameEquals("userCustomizationsEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userCustomizationsEnableStatus = new UserCustomizationsEnableStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectCustomizationSettings(identities ?? new ChangeTrackingList(), userCustomizationsEnableStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectCustomizationSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectCustomizationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectCustomizationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectCustomizationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.cs new file mode 100644 index 000000000000..3a17961f7951 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectCustomizationSettings.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Settings to be used for customizations. + public partial class ProjectCustomizationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectCustomizationSettings() + { + Identities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// Indicates whether user customizations are enabled. + /// Keeps track of any properties unknown to the library. + internal ProjectCustomizationSettings(IList identities, UserCustomizationsEnableStatus? userCustomizationsEnableStatus, IDictionary serializedAdditionalRawData) + { + Identities = identities; + UserCustomizationsEnableStatus = userCustomizationsEnableStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + public IList Identities { get; } + /// Indicates whether user customizations are enabled. + public UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.Serialization.cs index a6cb0e59440f..0188d2f407cb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProjectEnvironmentTypeListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ProjectEnvironmentTypeListResult DeserializeProjectEnvironmentTy return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ProjectEnvironmentTypeListResult DeserializeProjectEnvironmentTy } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ProjectEnvironmentTypeListResult DeserializeProjectEnvironmentTy } } serializedAdditionalRawData = rawDataDictionary; - return new ProjectEnvironmentTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ProjectEnvironmentTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.cs index 0b3336f6540a..d9bbc9fdbf25 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectEnvironmentTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the project environment type list operation. + /// Paged collection of ProjectEnvironmentType items. internal partial class ProjectEnvironmentTypeListResult { /// @@ -46,25 +47,31 @@ internal partial class ProjectEnvironmentTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ProjectEnvironmentTypeListResult() + /// The ProjectEnvironmentType items on this page. + internal ProjectEnvironmentTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The ProjectEnvironmentType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ProjectEnvironmentTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ProjectEnvironmentTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal ProjectEnvironmentTypeListResult() + { + } + + /// The ProjectEnvironmentType items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.Serialization.cs index ea06abd97c22..a8b8f4c956fe 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProjectListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ProjectListResult DeserializeProjectListResult(JsonElement eleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ProjectListResult DeserializeProjectListResult(JsonElement eleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ProjectListResult DeserializeProjectListResult(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new ProjectListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ProjectListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.cs index 25058dd6cf73..b25374ab257b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Results of the project list operation. + /// Paged collection of Project items. internal partial class ProjectListResult { /// @@ -46,25 +47,31 @@ internal partial class ProjectListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ProjectListResult() + /// The Project items on this page. + internal ProjectListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Project items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ProjectListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ProjectListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal ProjectListResult() + { + } + + /// The Project items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.Serialization.cs new file mode 100644 index 000000000000..a9e170f2af3a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class ProjectNetworkSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectNetworkSettings)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MicrosoftHostedNetworkEnableStatus)) + { + writer.WritePropertyName("microsoftHostedNetworkEnableStatus"u8); + writer.WriteStringValue(MicrosoftHostedNetworkEnableStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectNetworkSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectNetworkSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectNetworkSettings(document.RootElement, options); + } + + internal static ProjectNetworkSettings DeserializeProjectNetworkSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("microsoftHostedNetworkEnableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + microsoftHostedNetworkEnableStatus = new MicrosoftHostedNetworkEnableStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectNetworkSettings(microsoftHostedNetworkEnableStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectNetworkSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectNetworkSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectNetworkSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectNetworkSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.cs new file mode 100644 index 000000000000..3ac6977ea57b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectNetworkSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Network settings for the project. + internal partial class ProjectNetworkSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProjectNetworkSettings() + { + } + + /// Initializes a new instance of . + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + /// Keeps track of any properties unknown to the library. + internal ProjectNetworkSettings(MicrosoftHostedNetworkEnableStatus? microsoftHostedNetworkEnableStatus, IDictionary serializedAdditionalRawData) + { + MicrosoftHostedNetworkEnableStatus = microsoftHostedNetworkEnableStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. + public MicrosoftHostedNetworkEnableStatus? MicrosoftHostedNetworkEnableStatus { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.Serialization.cs new file mode 100644 index 000000000000..b7ffe725bd05 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class ProjectPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectPolicyListResult(document.RootElement, options); + } + + internal static ProjectPolicyListResult DeserializeProjectPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProjectPolicyData.DeserializeProjectPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectPolicyListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + ProjectPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.cs new file mode 100644 index 000000000000..a6d52d79165f --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Paged collection of ProjectPolicy items. + internal partial class ProjectPolicyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ProjectPolicy items on this page. + internal ProjectPolicyListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ProjectPolicy items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ProjectPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectPolicyListResult() + { + } + + /// The ProjectPolicy items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.Serialization.cs new file mode 100644 index 000000000000..54e6fc845be9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ProjectPolicyUpdateResourcePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyUpdateResourcePolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStringValue(Resources); + } + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); + writer.WriteStringValue(Filter); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectPolicyUpdateResourcePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyUpdateResourcePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectPolicyUpdateResourcePolicy(document.RootElement, options); + } + + internal static ProjectPolicyUpdateResourcePolicy DeserializeProjectPolicyUpdateResourcePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resources = default; + string filter = default; + PolicyAction? action = default; + DevCenterResourceType? resourceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + resources = property.Value.GetString(); + continue; + } + if (property.NameEquals("filter"u8)) + { + filter = property.Value.GetString(); + continue; + } + if (property.NameEquals("action"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + action = new PolicyAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new DevCenterResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectPolicyUpdateResourcePolicy(resources, filter, action, resourceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectPolicyUpdateResourcePolicy)} does not support writing '{options.Format}' format."); + } + } + + ProjectPolicyUpdateResourcePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectPolicyUpdateResourcePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectPolicyUpdateResourcePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.cs new file mode 100644 index 000000000000..457b3e0ad169 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ProjectPolicyUpdateResourcePolicy.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// A resource policy. + public partial class ProjectPolicyUpdateResourcePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectPolicyUpdateResourcePolicy() + { + } + + /// Initializes a new instance of . + /// Resources that are included and shared as a part of a project policy. + /// Optional. When specified, this expression is used to filter the resources. + /// Policy action to be taken on the resources. This is optional, and defaults to allow. + /// Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. + /// Keeps track of any properties unknown to the library. + internal ProjectPolicyUpdateResourcePolicy(string resources, string filter, PolicyAction? action, DevCenterResourceType? resourceType, IDictionary serializedAdditionalRawData) + { + Resources = resources; + Filter = filter; + Action = action; + ResourceType = resourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resources that are included and shared as a part of a project policy. + public string Resources { get; set; } + /// Optional. When specified, this expression is used to filter the resources. + public string Filter { get; set; } + /// Policy action to be taken on the resources. This is optional, and defaults to allow. + public PolicyAction? Action { get; set; } + /// Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. + public DevCenterResourceType? ResourceType { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.Serialization.cs index e32599fc4b4b..335685c680de 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScheduleListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ScheduleListResult DeserializeScheduleListResult(JsonElement ele return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ScheduleListResult DeserializeScheduleListResult(JsonElement ele } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ScheduleListResult DeserializeScheduleListResult(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new ScheduleListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ScheduleListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.cs index f56f8276168e..a26a564e7ca9 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ScheduleListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { - /// Result of the schedule list operation. + /// Paged collection of Schedule items. internal partial class ScheduleListResult { /// @@ -46,25 +47,31 @@ internal partial class ScheduleListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ScheduleListResult() + /// The Schedule items on this page. + internal ScheduleListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The Schedule items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ScheduleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ScheduleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal ScheduleListResult() + { + } + + /// The Schedule items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsMode.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsMode.cs new file mode 100644 index 000000000000..1d040deb394b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether serverless GPU session access is enabled. + public readonly partial struct ServerlessGpuSessionsMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServerlessGpuSessionsMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string AutoDeployValue = "AutoDeploy"; + + /// Serverless GPU session access is disabled. + public static ServerlessGpuSessionsMode Disabled { get; } = new ServerlessGpuSessionsMode(DisabledValue); + /// Serverless GPU session access is enabled and necessary resources will be automatically setup. + public static ServerlessGpuSessionsMode AutoDeploy { get; } = new ServerlessGpuSessionsMode(AutoDeployValue); + /// Determines if two values are the same. + public static bool operator ==(ServerlessGpuSessionsMode left, ServerlessGpuSessionsMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServerlessGpuSessionsMode left, ServerlessGpuSessionsMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServerlessGpuSessionsMode(string value) => new ServerlessGpuSessionsMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServerlessGpuSessionsMode other && Equals(other); + /// + public bool Equals(ServerlessGpuSessionsMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.Serialization.cs new file mode 100644 index 000000000000..f3722b1210f1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class ServerlessGpuSessionsSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServerlessGpuSessionsSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServerlessGpuSessionsMode)) + { + writer.WritePropertyName("serverlessGpuSessionsMode"u8); + writer.WriteStringValue(ServerlessGpuSessionsMode.Value.ToString()); + } + if (Optional.IsDefined(MaxConcurrentSessionsPerProject)) + { + writer.WritePropertyName("maxConcurrentSessionsPerProject"u8); + writer.WriteNumberValue(MaxConcurrentSessionsPerProject.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ServerlessGpuSessionsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServerlessGpuSessionsSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServerlessGpuSessionsSettings(document.RootElement, options); + } + + internal static ServerlessGpuSessionsSettings DeserializeServerlessGpuSessionsSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ServerlessGpuSessionsMode? serverlessGpuSessionsMode = default; + int? maxConcurrentSessionsPerProject = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serverlessGpuSessionsMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverlessGpuSessionsMode = new ServerlessGpuSessionsMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("maxConcurrentSessionsPerProject"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConcurrentSessionsPerProject = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServerlessGpuSessionsSettings(serverlessGpuSessionsMode, maxConcurrentSessionsPerProject, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ServerlessGpuSessionsSettings)} does not support writing '{options.Format}' format."); + } + } + + ServerlessGpuSessionsSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServerlessGpuSessionsSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServerlessGpuSessionsSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.cs new file mode 100644 index 000000000000..ac446a09c7e2 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/ServerlessGpuSessionsSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Represents settings for serverless GPU access. + public partial class ServerlessGpuSessionsSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ServerlessGpuSessionsSettings() + { + } + + /// Initializes a new instance of . + /// The property indicates whether serverless GPU access is enabled on the project. + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// Keeps track of any properties unknown to the library. + internal ServerlessGpuSessionsSettings(ServerlessGpuSessionsMode? serverlessGpuSessionsMode, int? maxConcurrentSessionsPerProject, IDictionary serializedAdditionalRawData) + { + ServerlessGpuSessionsMode = serverlessGpuSessionsMode; + MaxConcurrentSessionsPerProject = maxConcurrentSessionsPerProject; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The property indicates whether serverless GPU access is enabled on the project. + public ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get; set; } + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + public int? MaxConcurrentSessionsPerProject { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.Serialization.cs index 52f6ace34c17..42c8c20d4300 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SkuListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static SkuListResult DeserializeSkuListResult(JsonElement element, Mode return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static SkuListResult DeserializeSkuListResult(JsonElement element, Mode } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static SkuListResult DeserializeSkuListResult(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new SkuListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new SkuListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.cs index 2c69dbbdc06d..b5025453f7fb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/SkuListResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.DevCenter.Models { @@ -46,25 +47,31 @@ internal partial class SkuListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal SkuListResult() + /// The DevCenterSku items on this page. + internal SkuListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Current page of results. - /// URL to get the next set of results if there are any. + /// The DevCenterSku items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal SkuListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal SkuListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current page of results. + /// Initializes a new instance of for deserialization. + internal SkuListResult() + { + } + + /// The DevCenterSku items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnDisconnectEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnDisconnectEnableStatus.cs index e482df65f8ed..48f488d6ea2d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnDisconnectEnableStatus.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnDisconnectEnableStatus.cs @@ -25,9 +25,9 @@ public StopOnDisconnectEnableStatus(string value) private const string IsEnabledValue = "Enabled"; private const string IsDisabledValue = "Disabled"; - /// Enabled. + /// Stop on disconnect is enabled. public static StopOnDisconnectEnableStatus IsEnabled { get; } = new StopOnDisconnectEnableStatus(IsEnabledValue); - /// Disabled. + /// Stop on disconnect is disabled. public static StopOnDisconnectEnableStatus IsDisabled { get; } = new StopOnDisconnectEnableStatus(IsDisabledValue); /// Determines if two values are the same. public static bool operator ==(StopOnDisconnectEnableStatus left, StopOnDisconnectEnableStatus right) => left.Equals(right); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.Serialization.cs new file mode 100644 index 000000000000..afa4966ec14b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + public partial class StopOnNoConnectConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopOnNoConnectConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(GracePeriodMinutes)) + { + writer.WritePropertyName("gracePeriodMinutes"u8); + writer.WriteNumberValue(GracePeriodMinutes.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StopOnNoConnectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopOnNoConnectConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStopOnNoConnectConfiguration(document.RootElement, options); + } + + internal static StopOnNoConnectConfiguration DeserializeStopOnNoConnectConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StopOnNoConnectEnableStatus? status = default; + int? gracePeriodMinutes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new StopOnNoConnectEnableStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("gracePeriodMinutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gracePeriodMinutes = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StopOnNoConnectConfiguration(status, gracePeriodMinutes, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(StopOnNoConnectConfiguration)} does not support writing '{options.Format}' format."); + } + } + + StopOnNoConnectConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStopOnNoConnectConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StopOnNoConnectConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.cs new file mode 100644 index 000000000000..f884ccec0852 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial class StopOnNoConnectConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StopOnNoConnectConfiguration() + { + } + + /// Initializes a new instance of . + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// Keeps track of any properties unknown to the library. + internal StopOnNoConnectConfiguration(StopOnNoConnectEnableStatus? status, int? gracePeriodMinutes, IDictionary serializedAdditionalRawData) + { + Status = status; + GracePeriodMinutes = gracePeriodMinutes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + public StopOnNoConnectEnableStatus? Status { get; set; } + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + public int? GracePeriodMinutes { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectEnableStatus.cs new file mode 100644 index 000000000000..8c3084f2c060 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/StopOnNoConnectEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Stop on no connect enable or disable status. + public readonly partial struct StopOnNoConnectEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StopOnNoConnectEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Stop on no connect is enabled. + public static StopOnNoConnectEnableStatus Enabled { get; } = new StopOnNoConnectEnableStatus(EnabledValue); + /// Stop on no connect is disabled. + public static StopOnNoConnectEnableStatus Disabled { get; } = new StopOnNoConnectEnableStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(StopOnNoConnectEnableStatus left, StopOnNoConnectEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StopOnNoConnectEnableStatus left, StopOnNoConnectEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StopOnNoConnectEnableStatus(string value) => new StopOnNoConnectEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StopOnNoConnectEnableStatus other && Equals(other); + /// + public bool Equals(StopOnNoConnectEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/UserCustomizationsEnableStatus.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/UserCustomizationsEnableStatus.cs new file mode 100644 index 000000000000..a719353097ec --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/UserCustomizationsEnableStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether user customizations are enabled. + public readonly partial struct UserCustomizationsEnableStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UserCustomizationsEnableStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// User customizations are disabled. + public static UserCustomizationsEnableStatus Disabled { get; } = new UserCustomizationsEnableStatus(DisabledValue); + /// User customizations are enabled. + public static UserCustomizationsEnableStatus Enabled { get; } = new UserCustomizationsEnableStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(UserCustomizationsEnableStatus left, UserCustomizationsEnableStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UserCustomizationsEnableStatus left, UserCustomizationsEnableStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator UserCustomizationsEnableStatus(string value) => new UserCustomizationsEnableStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UserCustomizationsEnableStatus other && Equals(other); + /// + public bool Equals(UserCustomizationsEnableStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/VirtualNetworkType.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/VirtualNetworkType.cs new file mode 100644 index 000000000000..c447637a5d35 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/VirtualNetworkType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates a pool uses a Virtual Network managed by Microsoft (Managed), or a customer provided Network (Unmanaged). + public readonly partial struct VirtualNetworkType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VirtualNetworkType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "Managed"; + private const string UnmanagedValue = "Unmanaged"; + + /// Virtual Network is managed by Microsoft. + public static VirtualNetworkType Managed { get; } = new VirtualNetworkType(ManagedValue); + /// Virtual Network is managed by user. + public static VirtualNetworkType Unmanaged { get; } = new VirtualNetworkType(UnmanagedValue); + /// Determines if two values are the same. + public static bool operator ==(VirtualNetworkType left, VirtualNetworkType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VirtualNetworkType left, VirtualNetworkType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VirtualNetworkType(string value) => new VirtualNetworkType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VirtualNetworkType other && Equals(other); + /// + public bool Equals(VirtualNetworkType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageMode.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageMode.cs new file mode 100644 index 000000000000..e4a774cbac05 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Indicates whether workspace storage is enabled. + public readonly partial struct WorkspaceStorageMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkspaceStorageMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string AutoDeployValue = "AutoDeploy"; + + /// Workspace storage is disabled. + public static WorkspaceStorageMode Disabled { get; } = new WorkspaceStorageMode(DisabledValue); + /// Workspace storage is enabled and necessary resources will be automatically setup. + public static WorkspaceStorageMode AutoDeploy { get; } = new WorkspaceStorageMode(AutoDeployValue); + /// Determines if two values are the same. + public static bool operator ==(WorkspaceStorageMode left, WorkspaceStorageMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkspaceStorageMode left, WorkspaceStorageMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WorkspaceStorageMode(string value) => new WorkspaceStorageMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkspaceStorageMode other && Equals(other); + /// + public bool Equals(WorkspaceStorageMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.Serialization.cs new file mode 100644 index 000000000000..dc4cda571fe4 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevCenter.Models +{ + internal partial class WorkspaceStorageSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkspaceStorageSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(WorkspaceStorageMode)) + { + writer.WritePropertyName("workspaceStorageMode"u8); + writer.WriteStringValue(WorkspaceStorageMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WorkspaceStorageSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkspaceStorageSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkspaceStorageSettings(document.RootElement, options); + } + + internal static WorkspaceStorageSettings DeserializeWorkspaceStorageSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkspaceStorageMode? workspaceStorageMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workspaceStorageMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceStorageMode = new WorkspaceStorageMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkspaceStorageSettings(workspaceStorageMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(WorkspaceStorageSettings)} does not support writing '{options.Format}' format."); + } + } + + WorkspaceStorageSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkspaceStorageSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkspaceStorageSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.cs new file mode 100644 index 000000000000..4c5c7198dd5c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/Models/WorkspaceStorageSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevCenter.Models +{ + /// Settings to be used for workspace storage. + internal partial class WorkspaceStorageSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkspaceStorageSettings() + { + } + + /// Initializes a new instance of . + /// Indicates whether workspace storage is enabled. + /// Keeps track of any properties unknown to the library. + internal WorkspaceStorageSettings(WorkspaceStorageMode? workspaceStorageMode, IDictionary serializedAdditionalRawData) + { + WorkspaceStorageMode = workspaceStorageMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether workspace storage is enabled. + public WorkspaceStorageMode? WorkspaceStorageMode { get; set; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionCollection.cs index 15d81043b85c..4153aa94b784 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string att /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(int? to /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string attachedNetworkConn /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string attachedNetworkConnectionName, Cance /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.cs index e13917d301c8..e1b3a8bed83f 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionCollection.cs index 5ef65450bd4f..a7c92d8df869 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets a Dev Box definition configured for a project + /// Gets a Dev Box definition configured for a project. /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -97,7 +97,7 @@ public virtual async Task> GetAsync(st } /// - /// Gets a Dev Box definition configured for a project + /// Gets a Dev Box definition configured for a project. /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string devBoxDefini /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(int? t /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(int? top = null, /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string devBoxDefinitionNam /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string devBoxDefinitionName, CancellationTo /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.cs index 2b588349591e..effc4d51cf15 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets a Dev Box definition configured for a project + /// Gets a Dev Box definition configured for a project. /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Ca } /// - /// Gets a Dev Box definition configured for a project + /// Gets a Dev Box definition configured for a project. /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-04-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.Serialization.cs new file mode 100644 index 000000000000..f5b95907f099 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + public partial class ProjectPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ResourcePolicies)) + { + writer.WritePropertyName("resourcePolicies"u8); + writer.WriteStartArray(); + foreach (var item in ResourcePolicies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Scopes)) + { + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + ProjectPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectPolicyData(document.RootElement, options); + } + + internal static ProjectPolicyData DeserializeProjectPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IList resourcePolicies = default; + IList scopes = default; + DevCenterProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDevCenterContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourcePolicies"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProjectPolicyUpdateResourcePolicy.DeserializeProjectPolicyUpdateResourcePolicy(item, options)); + } + resourcePolicies = array; + continue; + } + if (property0.NameEquals("scopes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scopes = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DevCenterProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectPolicyData( + id, + name, + type, + systemData, + resourcePolicies ?? new ChangeTrackingList(), + scopes ?? new ChangeTrackingList(), + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDevCenterContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectPolicyData)} does not support writing '{options.Format}' format."); + } + } + + ProjectPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.cs new file mode 100644 index 000000000000..b17f7f88abb7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectPolicyData.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DevCenter +{ + /// + /// A class representing the ProjectPolicy data model. + /// Represents an project policy resource. + /// + public partial class ProjectPolicyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectPolicyData() + { + ResourcePolicies = new ChangeTrackingList(); + Scopes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource policies that are a part of this project policy. + /// Resources that have access to the shared resources that are a part of this project policy. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal ProjectPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList resourcePolicies, IList scopes, DevCenterProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ResourcePolicies = resourcePolicies; + Scopes = scopes; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource policies that are a part of this project policy. + public IList ResourcePolicies { get; } + /// Resources that have access to the shared resources that are a part of this project policy. + public IList Scopes { get; } + /// The provisioning state of the resource. + public DevCenterProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/AttachedNetworksRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/AttachedNetworksRestOperations.cs index c3f6ba2d26e5..a85627834fec 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/AttachedNetworksRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/AttachedNetworksRestOperations.cs @@ -32,11 +32,11 @@ public AttachedNetworksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, int? top) + internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,8 +44,8 @@ internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); - uri.AppendPath(projectName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); uri.AppendPath("/attachednetworks", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -55,7 +55,7 @@ internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateListByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, int? top) + internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -66,8 +66,8 @@ internal HttpMessage CreateListByProjectRequest(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); - uri.AppendPath(projectName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); uri.AppendPath("/attachednetworks", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -80,21 +80,21 @@ internal HttpMessage CreateListByProjectRequest(string subscriptionId, string re return message; } - /// Lists the attached NetworkConnections for a Project. - /// The ID of the target subscription. + /// Lists the attached NetworkConnections for a DevCenter. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, top); + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -110,21 +110,21 @@ public async Task> ListByProjectAsync(string } } - /// Lists the attached NetworkConnections for a Project. - /// The ID of the target subscription. + /// Lists the attached NetworkConnections for a DevCenter. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByProject(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, top); + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -140,7 +140,7 @@ public Response ListByProject(string subscriptionId, } } - internal RequestUriBuilder CreateGetByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName) + internal RequestUriBuilder CreateGetByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -148,15 +148,15 @@ internal RequestUriBuilder CreateGetByProjectRequestUri(string subscriptionId, s uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); - uri.AppendPath(projectName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); uri.AppendPath("/attachednetworks/", false); uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName) + internal HttpMessage CreateGetByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -167,8 +167,8 @@ internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); - uri.AppendPath(projectName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); uri.AppendPath("/attachednetworks/", false); uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -179,21 +179,21 @@ internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string res } /// Gets an attached NetworkConnection. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The name of the attached NetworkConnection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, attachedNetworkConnectionName); + using var message = CreateGetByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -212,21 +212,21 @@ public async Task> GetByProjectAsync(str } /// Gets an attached NetworkConnection. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The name of the attached NetworkConnection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetByProject(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, attachedNetworkConnectionName); + using var message = CreateGetByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -244,7 +244,7 @@ public Response GetByProject(string subscriptionI } } - internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -254,20 +254,17 @@ internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); uri.AppendPath(devCenterName, true); - uri.AppendPath("/attachednetworks", false); + uri.AppendPath("/attachednetworks/", false); + uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } return uri; } - internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -276,79 +273,78 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); uri.AppendPath(devCenterName, true); - uri.AppendPath("/attachednetworks", false); + uri.AppendPath("/attachednetworks/", false); + uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists the attached NetworkConnections for a DevCenter. - /// The ID of the target subscription. + /// Creates or updates an attached NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the attached NetworkConnection. + /// Represents an attached NetworkConnection. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AttachedNetworkListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AttachedNetworkListResult.DeserializeAttachedNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists the attached NetworkConnections for a DevCenter. - /// The ID of the target subscription. + /// Creates or updates an attached NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the attached NetworkConnection. + /// Represents an attached NetworkConnection. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AttachedNetworkListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AttachedNetworkListResult.DeserializeAttachedNetworkListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -364,11 +360,11 @@ internal RequestUriBuilder CreateGetByDevCenterRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateGetByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -386,73 +382,61 @@ internal HttpMessage CreateGetByDevCenterRequest(string subscriptionId, string r return message; } - /// Gets an attached NetworkConnection. - /// The ID of the target subscription. + /// Un-attach a NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the attached NetworkConnection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateGetByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - AttachedNetworkConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AttachedNetworkConnectionData.DeserializeAttachedNetworkConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AttachedNetworkConnectionData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets an attached NetworkConnection. - /// The ID of the target subscription. + /// Un-attach a NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the attached NetworkConnection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateGetByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - AttachedNetworkConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AttachedNetworkConnectionData.DeserializeAttachedNetworkConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AttachedNetworkConnectionData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data) + internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -460,97 +444,103 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); - uri.AppendPath("/attachednetworks/", false); - uri.AppendPath(attachedNetworkConnectionName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/attachednetworks", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data) + internal HttpMessage CreateListByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); - uri.AppendPath("/attachednetworks/", false); - uri.AppendPath(attachedNetworkConnectionName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/attachednetworks", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates an attached NetworkConnection. - /// The ID of the target subscription. + /// Lists the attached NetworkConnections for a Project. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the attached NetworkConnection. - /// Represents an attached NetworkConnection. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName, data); + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 201: - return message.Response; + case 200: + { + AttachedNetworkListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AttachedNetworkListResult.DeserializeAttachedNetworkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates or updates an attached NetworkConnection. - /// The ID of the target subscription. + /// Lists the attached NetworkConnections for a Project. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the attached NetworkConnection. - /// Represents an attached NetworkConnection. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, AttachedNetworkConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProject(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName, data); + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 201: - return message.Response; + case 200: + { + AttachedNetworkListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AttachedNetworkListResult.DeserializeAttachedNetworkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) + internal RequestUriBuilder CreateGetByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -558,27 +548,27 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); uri.AppendPath("/attachednetworks/", false); uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName) + internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); uri.AppendPath("/attachednetworks/", false); uri.AppendPath(attachedNetworkConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -588,63 +578,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Un-attach a NetworkConnection. - /// The ID of the target subscription. + /// Gets an attached NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. + /// The name of the project. /// The name of the attached NetworkConnection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, attachedNetworkConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + AttachedNetworkConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AttachedNetworkConnectionData.DeserializeAttachedNetworkConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AttachedNetworkConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Un-attach a NetworkConnection. - /// The ID of the target subscription. + /// Gets an attached NetworkConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. + /// The name of the project. /// The name of the attached NetworkConnection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetByProject(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); Argument.AssertNotNullOrEmpty(attachedNetworkConnectionName, nameof(attachedNetworkConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, attachedNetworkConnectionName); + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, attachedNetworkConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + AttachedNetworkConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AttachedNetworkConnectionData.DeserializeAttachedNetworkConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AttachedNetworkConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) + internal RequestUriBuilder CreateListByDevCenterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -652,7 +652,7 @@ internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink return uri; } - internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) + internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -666,23 +666,23 @@ internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string return message; } - /// Lists the attached NetworkConnections for a Project. + /// Lists the attached NetworkConnections for a DevCenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByProjectNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); + using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -698,23 +698,23 @@ public async Task> ListByProjectNextPageAsyn } } - /// Lists the attached NetworkConnections for a Project. + /// Lists the attached NetworkConnections for a DevCenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByProjectNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); + using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -730,7 +730,7 @@ public Response ListByProjectNextPage(string nextLink } } - internal RequestUriBuilder CreateListByDevCenterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -738,7 +738,7 @@ internal RequestUriBuilder CreateListByDevCenterNextPageRequestUri(string nextLi return uri; } - internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -752,23 +752,23 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin return message; } - /// Lists the attached NetworkConnections for a DevCenter. + /// Lists the attached NetworkConnections for a Project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. + /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByDevCenterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -784,23 +784,23 @@ public async Task> ListByDevCenterNextPageAs } } - /// Lists the attached NetworkConnections for a DevCenter. + /// Lists the attached NetworkConnections for a Project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. + /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByDevCenterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProjectNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CatalogsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CatalogsRestOperations.cs index dd977db1781f..16eb55866ecd 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CatalogsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CatalogsRestOperations.cs @@ -32,7 +32,7 @@ public CatalogsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string } /// Lists catalogs for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListByDevCenterAsync(str } /// Lists catalogs for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscriptionId } /// Gets a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -307,6 +307,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 201: return message.Response; default: @@ -315,7 +316,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -335,6 +336,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 201: return message.Response; default: @@ -385,7 +387,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -414,7 +416,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a catalog. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -481,7 +483,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a catalog resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -499,7 +501,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -509,7 +510,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a catalog resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -527,7 +528,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string d _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -536,6 +536,200 @@ public Response Delete(string subscriptionId, string resourceGroupName, string d } } + internal RequestUriBuilder CreateConnectRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/connect", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateConnectRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/connect", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Connects a catalog to enable syncing. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ConnectAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateConnectRequest(subscriptionId, resourceGroupName, devCenterName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Connects a catalog to enable syncing. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Connect(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateConnectRequest(subscriptionId, resourceGroupName, devCenterName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSyncErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/getSyncErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSyncErrorDetailsRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/getSyncErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets catalog synchronization error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetSyncErrorDetailsAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetSyncErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogSyncErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogSyncErrorDetails.DeserializeCatalogSyncErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets catalog synchronization error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetSyncErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetSyncErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogSyncErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogSyncErrorDetails.DeserializeCatalogSyncErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateSyncRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName) { var uri = new RawRequestUriBuilder(); @@ -577,7 +771,7 @@ internal HttpMessage CreateSyncRequest(string subscriptionId, string resourceGro } /// Syncs templates for a template source. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -603,7 +797,7 @@ public async Task SyncAsync(string subscriptionId, string resourceGrou } /// Syncs templates for a template source. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Catalog. @@ -652,7 +846,7 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin /// Lists catalogs for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -684,7 +878,7 @@ public async Task> ListByDevCenterNextPageA /// Lists catalogs for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs index 9125bf7bb530..199c48a4f2c0 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -32,7 +32,7 @@ public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,8 +69,8 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, DevCenterNameAv } /// Check the availability of name for resource. - /// The ID of the target subscription. - /// The required parameters for checking if resource name is available. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -96,8 +96,8 @@ public async Task> ExecuteAsync(string } /// Check the availability of name for resource. - /// The ID of the target subscription. - /// The required parameters for checking if resource name is available. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckScopedNameAvailabilityRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckScopedNameAvailabilityRestOperations.cs new file mode 100644 index 000000000000..10418f2ee1d5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CheckScopedNameAvailabilityRestOperations.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class CheckScopedNameAvailabilityRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CheckScopedNameAvailabilityRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public CheckScopedNameAvailabilityRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateExecuteRequestUri(string subscriptionId, CheckScopedNameAvailabilityContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DevCenter/checkScopedNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateExecuteRequest(string subscriptionId, CheckScopedNameAvailabilityContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DevCenter/checkScopedNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Check the availability of name for resource. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteAsync(string subscriptionId, CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterNameAvailabilityResult.DeserializeDevCenterNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the availability of name for resource. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Execute(string subscriptionId, CheckScopedNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterNameAvailabilityResult.DeserializeDevCenterNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CustomizationTasksRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CustomizationTasksRestOperations.cs new file mode 100644 index 000000000000..33dd225e20b9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/CustomizationTasksRestOperations.cs @@ -0,0 +1,463 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class CustomizationTasksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CustomizationTasksRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public CustomizationTasksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Tasks in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCatalogAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CustomizationTaskListResult.DeserializeCustomizationTaskListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Tasks in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CustomizationTaskListResult.DeserializeCustomizationTaskListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Task from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Customization Task. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CustomizationTaskData.DeserializeCustomizationTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomizationTaskData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Task from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Customization Task. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CustomizationTaskData.DeserializeCustomizationTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomizationTaskData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetErrorDetailsRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Customization Task error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Customization Task. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetErrorDetailsAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Customization Task error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Customization Task. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByCatalogNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByCatalogNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Tasks in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCatalogNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CustomizationTaskListResult.DeserializeCustomizationTaskListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Tasks in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCatalogNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomizationTaskListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CustomizationTaskListResult.DeserializeCustomizationTaskListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevBoxDefinitionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevBoxDefinitionsRestOperations.cs index 822b531e9617..b2fdffa72068 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevBoxDefinitionsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevBoxDefinitionsRestOperations.cs @@ -32,7 +32,7 @@ public DevBoxDefinitionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string } /// List Dev Box definitions for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListByDevCenterAsync(str } /// List Dev Box definitions for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscriptionId } /// Gets a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -316,7 +316,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -387,7 +387,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -416,7 +416,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -483,7 +483,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -501,7 +501,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -511,7 +510,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a Dev Box definition. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the Dev Box definition. @@ -529,7 +528,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string d _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -583,7 +581,7 @@ internal HttpMessage CreateListByProjectRequest(string subscriptionId, string re } /// List Dev Box definitions configured for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -613,7 +611,7 @@ public async Task> ListByProjectAsync(strin } /// List Dev Box definitions configured for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -681,7 +679,7 @@ internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string res } /// Gets a Dev Box definition configured for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Dev Box definition. @@ -714,7 +712,7 @@ public async Task> GetByProjectAsync(string subsc } /// Gets a Dev Box definition configured for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Dev Box definition. @@ -770,7 +768,7 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin /// List Dev Box definitions for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -802,7 +800,7 @@ public async Task> ListByDevCenterNextPageA /// List Dev Box definitions for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -856,7 +854,7 @@ internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string /// List Dev Box definitions configured for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -888,7 +886,7 @@ public async Task> ListByProjectNextPageAsy /// List Dev Box definitions configured for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionBuildRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionBuildRestOperations.cs new file mode 100644 index 000000000000..93f83b8037c0 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionBuildRestOperations.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class DevCenterCatalogImageDefinitionBuildRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DevCenterCatalogImageDefinitionBuildRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DevCenterCatalogImageDefinitionBuildRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByImageDefinitionRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByImageDefinitionRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists builds for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByImageDefinitionAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists builds for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByImageDefinition(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a build for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionBuildData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionBuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a build for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionBuildData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionBuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Cancels the specified build for an image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancels the specified build for an image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Cancel(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDetailsRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/getBuildDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetBuildDetailsRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/getBuildDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Build details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDetailsAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetBuildDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildDetails.DeserializeImageDefinitionBuildDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Build details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetBuildDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildDetails.DeserializeImageDefinitionBuildDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByImageDefinitionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByImageDefinitionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists builds for a specified image definition. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByImageDefinitionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists builds for a specified image definition. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByImageDefinitionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionsRestOperations.cs new file mode 100644 index 000000000000..abdda3075b96 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCenterCatalogImageDefinitionsRestOperations.cs @@ -0,0 +1,563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class DevCenterCatalogImageDefinitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DevCenterCatalogImageDefinitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DevCenterCatalogImageDefinitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByDevCenterCatalogRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByDevCenterCatalogRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Image Definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterCatalogAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByDevCenterCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Image Definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenterCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByDevCenterCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetByDevCenterCatalogRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetByDevCenterCatalogRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an Image Definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetByDevCenterCatalogAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetByDevCenterCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an Image Definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetByDevCenterCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetByDevCenterCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateBuildImageRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/buildImage", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBuildImageRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/buildImage", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Builds an image for the specified Image Definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task BuildImageAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateBuildImageRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Builds an image for the specified Image Definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response BuildImage(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateBuildImageRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetErrorDetailsRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Image Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetErrorDetailsAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Image Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDevCenterCatalogNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByDevCenterCatalogNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Image Definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterCatalogNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByDevCenterCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Image Definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenterCatalogNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByDevCenterCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCentersRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCentersRestOperations.cs index d93a1720f777..f901372d1daa 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCentersRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/DevCentersRestOperations.cs @@ -32,7 +32,7 @@ public DevCentersRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, int? } /// Lists all devcenters in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -99,7 +99,7 @@ public async Task> ListBySubscriptionAsync(string } /// Lists all devcenters in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -165,7 +165,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists all devcenters in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -193,7 +193,7 @@ public async Task> ListByResourceGroupAsync(string } /// Lists all devcenters in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -255,7 +255,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The cancellation token to use. @@ -286,7 +286,7 @@ public async Task> GetAsync(string subscriptionId, strin } /// Gets a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The cancellation token to use. @@ -355,7 +355,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a devcenter resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// Represents a devcenter. @@ -382,7 +382,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a devcenter resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// Represents a devcenter. @@ -447,7 +447,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// Updatable devcenter properties. @@ -474,7 +474,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// Updatable devcenter properties. @@ -535,7 +535,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The cancellation token to use. @@ -551,7 +551,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -561,7 +560,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The cancellation token to use. @@ -577,7 +576,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string d _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -610,7 +608,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all devcenters in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -638,7 +636,7 @@ public async Task> ListBySubscriptionNextPageAsync /// Lists all devcenters in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -688,7 +686,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists all devcenters in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -718,7 +716,7 @@ public async Task> ListByResourceGroupNextPageAsyn /// Lists all devcenters in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EncryptionSetsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EncryptionSetsRestOperations.cs new file mode 100644 index 000000000000..ade43a3a9ac0 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EncryptionSetsRestOperations.cs @@ -0,0 +1,625 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class EncryptionSetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EncryptionSetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public EncryptionSetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all encryption sets in the devcenter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, devCenterName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EncryptionSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EncryptionSetListResult.DeserializeEncryptionSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all encryption sets in the devcenter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, devCenterName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EncryptionSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EncryptionSetListResult.DeserializeEncryptionSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterEncryptionSetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterEncryptionSetData.DeserializeDevCenterEncryptionSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEncryptionSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterEncryptionSetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterEncryptionSetData.DeserializeDevCenterEncryptionSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEncryptionSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a devcenter encryption set resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a devcenter encryption set resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Partially updates a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Updatable devcenter encryption set properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Partially updates a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Updatable devcenter encryption set properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, DevCenterEncryptionSetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/encryptionSets/", false); + uri.AppendPath(encryptionSetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a devcenter encryption set. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(encryptionSetName, nameof(encryptionSetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all encryption sets in the devcenter. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EncryptionSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EncryptionSetListResult.DeserializeEncryptionSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all encryption sets in the devcenter. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EncryptionSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EncryptionSetListResult.DeserializeEncryptionSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentDefinitionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentDefinitionsRestOperations.cs new file mode 100644 index 000000000000..27a6f0b8c789 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentDefinitionsRestOperations.cs @@ -0,0 +1,765 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class EnvironmentDefinitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EnvironmentDefinitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public EnvironmentDefinitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List environment definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCatalogAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List environment definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an environment definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterEnvironmentDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEnvironmentDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an environment definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterEnvironmentDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEnvironmentDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetErrorDetailsRequest(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Environment Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetErrorDetailsAsync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Environment Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByProjectCatalogRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByProjectCatalogRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the environment definitions in this project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectCatalogAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the environment definitions in this project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetByProjectCatalogRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetByProjectCatalogRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an environment definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetByProjectCatalogAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterEnvironmentDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEnvironmentDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an environment definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterEnvironmentDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterEnvironmentDefinitionData.DeserializeDevCenterEnvironmentDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterEnvironmentDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByCatalogNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByCatalogNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List environment definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCatalogNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List environment definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCatalogNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByProjectCatalogNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByProjectCatalogNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the environment definitions in this project catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectCatalogNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the environment definitions in this project catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProjectCatalogNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EnvironmentDefinitionListResult.DeserializeEnvironmentDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentTypesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentTypesRestOperations.cs index d6c9d0a32a78..eeb3077499fe 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentTypesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/EnvironmentTypesRestOperations.cs @@ -32,7 +32,7 @@ public EnvironmentTypesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string } /// Lists environment types for the devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListByDevCenterAsync(stri } /// Lists environment types for the devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscr } /// Gets an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -308,6 +308,7 @@ public async Task> CreateOrUpdateAsync(st switch (message.Response.Status) { case 200: + case 201: { DevCenterEnvironmentTypeData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); @@ -320,7 +321,7 @@ public async Task> CreateOrUpdateAsync(st } /// Creates or updates an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -341,6 +342,7 @@ public Response CreateOrUpdate(string subscription switch (message.Response.Status) { case 200: + case 201: { DevCenterEnvironmentTypeData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); @@ -395,7 +397,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -428,7 +430,7 @@ public async Task> UpdateAsync(string sub } /// Partially updates an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -499,7 +501,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -526,7 +528,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. @@ -576,7 +578,7 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin /// Lists environment types for the devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -608,7 +610,7 @@ public async Task> ListByDevCenterNextPageAs /// Lists environment types for the devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/GalleriesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/GalleriesRestOperations.cs index 71ab7eb32d66..20b61fbb78f5 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/GalleriesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/GalleriesRestOperations.cs @@ -32,7 +32,7 @@ public GalleriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string } /// Lists galleries for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListByDevCenterAsync(string subsc } /// Lists galleries for a devcenter. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a gallery. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscriptionId } /// Gets a gallery. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a gallery. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -307,6 +307,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 201: return message.Response; default: @@ -315,7 +316,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a gallery. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -335,6 +336,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 201: return message.Response; default: @@ -381,7 +383,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a gallery resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -399,7 +401,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -409,7 +410,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a gallery resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -427,7 +428,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string d _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -460,7 +460,7 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin /// Lists galleries for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -492,7 +492,7 @@ public async Task> ListByDevCenterNextPageAsync(stri /// Lists galleries for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImageVersionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImageVersionsRestOperations.cs index f493cce7f073..4c731acb9506 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImageVersionsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public ImageVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByImageRequest(string subscriptionId, string reso } /// Lists versions for an image. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -114,7 +114,7 @@ public async Task> ListByImageAsync(string subs } /// Lists versions for an image. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -193,7 +193,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an image version. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -230,7 +230,7 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets an image version. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -266,6 +266,220 @@ public Response Get(string subscriptionId, string resourceGrou } } + internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists versions for an image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageVersionListResult.DeserializeImageVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists versions for an image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageVersionListResult.DeserializeImageVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an image version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The version of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName, versionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageVersionData.DeserializeImageVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ImageVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an image version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The version of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName, versionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageVersionData.DeserializeImageVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ImageVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByImageNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName) { var uri = new RawRequestUriBuilder(); @@ -290,7 +504,7 @@ internal HttpMessage CreateListByImageNextPageRequest(string nextLink, string su /// Lists versions for an image. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -325,7 +539,7 @@ public async Task> ListByImageNextPageAsync(str /// Lists versions for an image. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. @@ -357,5 +571,93 @@ public Response ListByImageNextPage(string nextLink, str throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists versions for an image. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageVersionListResult.DeserializeImageVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists versions for an image. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProjectNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageVersionListResult.DeserializeImageVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImagesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImagesRestOperations.cs index 874f831a2942..3becbe230960 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImagesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ImagesRestOperations.cs @@ -32,11 +32,11 @@ public ImagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal RequestUriBuilder CreateListByGalleryRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,6 +46,8 @@ internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); uri.AppendPath(devCenterName, true); + uri.AppendPath("/galleries/", false); + uri.AppendPath(galleryName, true); uri.AppendPath("/images", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -55,7 +57,7 @@ internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId return uri; } - internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + internal HttpMessage CreateListByGalleryRequest(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,6 +70,8 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); uri.AppendPath(devCenterName, true); + uri.AppendPath("/galleries/", false); + uri.AppendPath(galleryName, true); uri.AppendPath("/images", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -80,21 +84,23 @@ internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string return message; } - /// Lists images for a devcenter. - /// The ID of the target subscription. + /// Lists images for a gallery. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryAsync(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); - using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -110,21 +116,23 @@ public async Task> ListByDevCenterAsync(strin } } - /// Lists images for a devcenter. - /// The ID of the target subscription. + /// Lists images for a gallery. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByGallery(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); - using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -140,7 +148,7 @@ public Response ListByDevCenter(string subscriptionId, } } - internal RequestUriBuilder CreateListByGalleryRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -152,6 +160,116 @@ internal RequestUriBuilder CreateListByGalleryRequestUri(string subscriptionId, uri.AppendPath(devCenterName, true); uri.AppendPath("/galleries/", false); uri.AppendPath(galleryName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a gallery image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the gallery. + /// The name of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageData.DeserializeDevCenterImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a gallery image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the gallery. + /// The name of the image. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageData.DeserializeDevCenterImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); uri.AppendPath("/images", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -161,7 +279,7 @@ internal RequestUriBuilder CreateListByGalleryRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateListByGalleryRequest(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -174,8 +292,6 @@ internal HttpMessage CreateListByGalleryRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); uri.AppendPath(devCenterName, true); - uri.AppendPath("/galleries/", false); - uri.AppendPath(galleryName, true); uri.AppendPath("/images", false); uri.AppendQuery("api-version", _apiVersion, true); if (top != null) @@ -188,23 +304,21 @@ internal HttpMessage CreateListByGalleryRequest(string subscriptionId, string re return message; } - /// Lists images for a gallery. - /// The ID of the target subscription. + /// Lists images for a devcenter. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByGalleryAsync(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); - using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, top); + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -220,23 +334,21 @@ public async Task> ListByGalleryAsync(string } } - /// Lists images for a gallery. - /// The ID of the target subscription. + /// Lists images for a devcenter. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListByGallery(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); - using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, top); + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -252,7 +364,7 @@ public Response ListByGallery(string subscriptionId, s } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName) + internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -260,17 +372,109 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); - uri.AppendPath("/galleries/", false); - uri.AppendPath(galleryName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByProjectRequest(string subscriptionId, string resourceGroupName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists images for a project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageListResult.DeserializeDevCenterImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists images for a project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProject(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageListResult.DeserializeDevCenterImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string imageName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); uri.AppendPath("/images/", false); uri.AppendPath(imageName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName) + internal HttpMessage CreateGetByProjectRequest(string subscriptionId, string resourceGroupName, string projectName, string imageName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -281,10 +485,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); - uri.AppendPath(devCenterName, true); - uri.AppendPath("/galleries/", false); - uri.AppendPath(galleryName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); uri.AppendPath("/images/", false); uri.AppendPath(imageName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -294,24 +496,22 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets a gallery image. - /// The ID of the target subscription. + /// Gets an image. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. + /// The name of the project. /// The name of the image. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, imageName); + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -329,24 +529,22 @@ public async Task> GetAsync(string subscriptionId, } } - /// Gets a gallery image. - /// The ID of the target subscription. + /// Gets an image. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. + /// The name of the project. /// The name of the image. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, galleryName, imageName); + using var message = CreateGetByProjectRequest(subscriptionId, resourceGroupName, projectName, imageName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -364,6 +562,96 @@ public Response Get(string subscriptionId, string resourceGr } } + internal RequestUriBuilder CreateListByGalleryNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByGalleryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists images for a gallery. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the gallery. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, galleryName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageListResult.DeserializeDevCenterImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists images for a gallery. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the gallery. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByGalleryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, galleryName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageListResult.DeserializeDevCenterImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByDevCenterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) { var uri = new RawRequestUriBuilder(); @@ -388,7 +676,7 @@ internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, strin /// Lists images for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -420,7 +708,7 @@ public async Task> ListByDevCenterNextPageAsy /// Lists images for a devcenter. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -450,7 +738,7 @@ public Response ListByDevCenterNextPage(string nextLin } } - internal RequestUriBuilder CreateListByGalleryNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -458,7 +746,7 @@ internal RequestUriBuilder CreateListByGalleryNextPageRequestUri(string nextLink return uri; } - internal HttpMessage CreateListByGalleryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top) + internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -472,25 +760,22 @@ internal HttpMessage CreateListByGalleryNextPageRequest(string nextLink, string return message; } - /// Lists images for a gallery. + /// Lists images for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByGalleryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, galleryName, top); + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -506,25 +791,22 @@ public async Task> ListByGalleryNextPageAsync } } - /// Lists images for a gallery. + /// Lists images for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListByGalleryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? top = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProjectNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); - Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, galleryName, top); + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/NetworkConnectionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/NetworkConnectionsRestOperations.cs index d97dddc0b35b..b28629dbba54 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/NetworkConnectionsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/NetworkConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkConnectionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, int? } /// Lists network connections in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -99,7 +99,7 @@ public async Task> ListBySubscriptionAsync } /// Lists network connections in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -165,7 +165,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists network connections in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -193,7 +193,7 @@ public async Task> ListByResourceGroupAsyn } /// Lists network connections in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -255,7 +255,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a network connection resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -286,7 +286,7 @@ public async Task> GetAsync(string subs } /// Gets a network connection resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -355,7 +355,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Network Connections resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// Represents network connection. @@ -382,7 +382,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Network Connections resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// Represents network connection. @@ -447,7 +447,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a Network Connection. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// Represents network connection. @@ -474,7 +474,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a Network Connection. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// Represents network connection. @@ -535,7 +535,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a Network Connections resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -551,7 +551,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -561,7 +560,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a Network Connections resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -577,7 +576,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -631,7 +629,7 @@ internal HttpMessage CreateListHealthDetailsRequest(string subscriptionId, strin } /// Lists health check status details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -661,7 +659,7 @@ public async Task> ListHealthDetail } /// Lists health check status details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -727,7 +725,7 @@ internal HttpMessage CreateGetHealthDetailsRequest(string subscriptionId, string } /// Gets health check status details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -758,7 +756,7 @@ public async Task> GetHealthDetailsAsync(s } /// Gets health check status details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The cancellation token to use. @@ -788,7 +786,7 @@ public Response GetHealthDetails(string subscriptio } } - internal RequestUriBuilder CreateRunHealthChecksRequestUri(string subscriptionId, string resourceGroupName, string networkConnectionName) + internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -798,16 +796,20 @@ internal RequestUriBuilder CreateRunHealthChecksRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/networkConnections/", false); uri.AppendPath(networkConnectionName, true); - uri.AppendPath("/runHealthChecks", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } return uri; } - internal HttpMessage CreateRunHealthChecksRequest(string subscriptionId, string resourceGroupName, string networkConnectionName) + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -816,65 +818,79 @@ internal HttpMessage CreateRunHealthChecksRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/networkConnections/", false); uri.AppendPath(networkConnectionName, true); - uri.AppendPath("/runHealthChecks", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. - /// The ID of the target subscription. + /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RunHealthChecksAsync(string subscriptionId, string resourceGroupName, string networkConnectionName, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkConnectionName, nameof(networkConnectionName)); - using var message = CreateRunHealthChecksRequest(subscriptionId, resourceGroupName, networkConnectionName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, networkConnectionName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + OutboundEnvironmentEndpointCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. - /// The ID of the target subscription. + /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RunHealthChecks(string subscriptionId, string resourceGroupName, string networkConnectionName, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkConnectionName, nameof(networkConnectionName)); - using var message = CreateRunHealthChecksRequest(subscriptionId, resourceGroupName, networkConnectionName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, networkConnectionName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + OutboundEnvironmentEndpointCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top) + internal RequestUriBuilder CreateRunHealthChecksRequestUri(string subscriptionId, string resourceGroupName, string networkConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -884,20 +900,16 @@ internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/networkConnections/", false); uri.AppendPath(networkConnectionName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/runHealthChecks", false); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } return uri; } - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top) + internal HttpMessage CreateRunHealthChecksRequest(string subscriptionId, string resourceGroupName, string networkConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -906,73 +918,57 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DevCenter/networkConnections/", false); uri.AppendPath(networkConnectionName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/runHealthChecks", false); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. - /// The ID of the target subscription. + /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top = null, CancellationToken cancellationToken = default) + public async Task RunHealthChecksAsync(string subscriptionId, string resourceGroupName, string networkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkConnectionName, nameof(networkConnectionName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, networkConnectionName, top); + using var message = CreateRunHealthChecksRequest(subscriptionId, resourceGroupName, networkConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - OutboundEnvironmentEndpointCollection value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. - /// The ID of the target subscription. + /// Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string networkConnectionName, int? top = null, CancellationToken cancellationToken = default) + public Response RunHealthChecks(string subscriptionId, string resourceGroupName, string networkConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkConnectionName, nameof(networkConnectionName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, networkConnectionName, top); + using var message = CreateRunHealthChecksRequest(subscriptionId, resourceGroupName, networkConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - OutboundEnvironmentEndpointCollection value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -1002,7 +998,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists network connections in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -1030,7 +1026,7 @@ public async Task> ListBySubscriptionNextP /// Lists network connections in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -1080,7 +1076,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists network connections in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -1110,7 +1106,7 @@ public async Task> ListByResourceGroupNext /// Lists network connections in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -1162,7 +1158,7 @@ internal HttpMessage CreateListHealthDetailsNextPageRequest(string nextLink, str /// Lists health check status details. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -1194,7 +1190,7 @@ public async Task> ListHealthDetail /// Lists health check status details. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -1248,7 +1244,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsNextPageReque /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -1280,7 +1276,7 @@ public async Task> ListOutboundN /// Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Connection that can be applied to a Pool. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/OperationStatusesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/OperationStatusesRestOperations.cs index a74004870f9d..bfb7421f478c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/OperationStatusesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/OperationStatusesRestOperations.cs @@ -32,7 +32,7 @@ public OperationStatusesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Gets the current status of an async operation. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// or is null. @@ -100,8 +100,8 @@ public async Task> GetAsync(string subscripti } /// Gets the current status of an async operation. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The ID of an ongoing async operation. /// The cancellation token to use. /// or is null. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/PoolsRestOperations.cs index e4f23eef2b2b..1b42f2b121c1 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/PoolsRestOperations.cs @@ -32,7 +32,7 @@ public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListByProjectRequest(string subscriptionId, string re } /// Lists pools for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListByProjectAsync(string subscripti } /// Lists pools for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -316,7 +316,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -387,7 +387,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -416,7 +416,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -483,7 +483,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -501,7 +501,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -511,7 +510,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a machine pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -529,7 +528,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -579,7 +577,7 @@ internal HttpMessage CreateRunHealthChecksRequest(string subscriptionId, string } /// Triggers a refresh of the pool status. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -597,7 +595,6 @@ public async Task RunHealthChecksAsync(string subscriptionId, string r await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -606,7 +603,7 @@ public async Task RunHealthChecksAsync(string subscriptionId, string r } /// Triggers a refresh of the pool status. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -624,7 +621,6 @@ public Response RunHealthChecks(string subscriptionId, string resourceGroupName, _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -656,7 +652,7 @@ internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string /// Lists pools for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -688,7 +684,7 @@ public async Task> ListByProjectNextPageAsync(string ne /// Lists pools for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectAllowedEnvironmentTypesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectAllowedEnvironmentTypesRestOperations.cs index ee07132d94d8..41dd278641f3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectAllowedEnvironmentTypesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectAllowedEnvironmentTypesRestOperations.cs @@ -32,7 +32,7 @@ public ProjectAllowedEnvironmentTypesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists allowed environment types for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListAsync(string s } /// Lists allowed environment types for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an allowed environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -212,7 +212,7 @@ public async Task> GetAsync(string subscrip } /// Gets an allowed environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -268,7 +268,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists allowed environment types for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -300,7 +300,7 @@ public async Task> ListNextPageAsync( /// Lists allowed environment types for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogEnvironmentDefinitionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogEnvironmentDefinitionsRestOperations.cs new file mode 100644 index 000000000000..57b328846909 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogEnvironmentDefinitionsRestOperations.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class ProjectCatalogEnvironmentDefinitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectCatalogEnvironmentDefinitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProjectCatalogEnvironmentDefinitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetErrorDetailsRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/environmentDefinitions/", false); + uri.AppendPath(environmentDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Environment Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetErrorDetailsAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Environment Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(environmentDefinitionName, nameof(environmentDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionBuildRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionBuildRestOperations.cs new file mode 100644 index 000000000000..a1a2a7dc7eee --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionBuildRestOperations.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class ProjectCatalogImageDefinitionBuildRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectCatalogImageDefinitionBuildRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProjectCatalogImageDefinitionBuildRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByImageDefinitionRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByImageDefinitionRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists builds for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByImageDefinitionAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists builds for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByImageDefinition(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a build for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionBuildData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionBuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a build for a specified image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionBuildData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageDefinitionBuildData.DeserializeDevCenterImageDefinitionBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionBuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Cancels the specified build for an image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancels the specified build for an image definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Cancel(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDetailsRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/getBuildDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetBuildDetailsRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/getBuildDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Build details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDetailsAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetBuildDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildDetails.DeserializeImageDefinitionBuildDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Build details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetBuildDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildDetails.DeserializeImageDefinitionBuildDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByImageDefinitionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByImageDefinitionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists builds for a specified image definition. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByImageDefinitionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists builds for a specified image definition. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByImageDefinitionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateListByImageDefinitionNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionBuildListResult.DeserializeImageDefinitionBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionsRestOperations.cs new file mode 100644 index 000000000000..d08c5221d019 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogImageDefinitionsRestOperations.cs @@ -0,0 +1,563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class ProjectCatalogImageDefinitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectCatalogImageDefinitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProjectCatalogImageDefinitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByProjectCatalogRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByProjectCatalogRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Image Definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectCatalogAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Image Definitions in the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetByProjectCatalogRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetByProjectCatalogRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an Image Definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetByProjectCatalogAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an Image Definition from the catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetByProjectCatalogRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterImageDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterImageDefinitionData.DeserializeDevCenterImageDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterImageDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateBuildImageRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/buildImage", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBuildImageRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/buildImage", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Builds an image for the specified Image Definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task BuildImageAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateBuildImageRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Builds an image for the specified Image Definition. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response BuildImage(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateBuildImageRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetErrorDetailsRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/imageDefinitions/", false); + uri.AppendPath(imageDefinitionName, true); + uri.AppendPath("/getErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Image Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetErrorDetailsAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Image Definition error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNullOrEmpty(imageDefinitionName, nameof(imageDefinitionName)); + + using var message = CreateGetErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogResourceValidationErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogResourceValidationErrorDetails.DeserializeCatalogResourceValidationErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByProjectCatalogNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByProjectCatalogNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Image Definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectCatalogNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Image Definitions in the catalog. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByProjectCatalogNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateListByProjectCatalogNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, catalogName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageDefinitionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageDefinitionListResult.DeserializeImageDefinitionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogsRestOperations.cs new file mode 100644 index 000000000000..bbffa0d041b1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectCatalogsRestOperations.cs @@ -0,0 +1,911 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class ProjectCatalogsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectCatalogsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProjectCatalogsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string projectName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string projectName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the catalogs associated with a project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, projectName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterCatalogListResult.DeserializeDevCenterCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the catalogs associated with a project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, projectName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterCatalogListResult.DeserializeDevCenterCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an associated project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterCatalogData.DeserializeDevCenterCatalogData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterCatalogData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an associated project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterCatalogData.DeserializeDevCenterCatalogData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevCenterCatalogData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// Represents a catalog. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, projectName, catalogName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// Represents a catalog. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, projectName, catalogName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePatchRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePatchRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Partially updates a project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// Updatable project catalog properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PatchAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreatePatchRequest(subscriptionId, resourceGroupName, projectName, catalogName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Partially updates a project catalog. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// Updatable project catalog properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Patch(string subscriptionId, string resourceGroupName, string projectName, string catalogName, DevCenterCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreatePatchRequest(subscriptionId, resourceGroupName, projectName, catalogName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a project catalog resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a project catalog resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateConnectRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/connect", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateConnectRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/connect", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Connects a project catalog to enable syncing. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ConnectAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateConnectRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Connects a project catalog to enable syncing. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Connect(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateConnectRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSyncErrorDetailsRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/getSyncErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSyncErrorDetailsRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/getSyncErrorDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets project catalog synchronization error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetSyncErrorDetailsAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetSyncErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CatalogSyncErrorDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CatalogSyncErrorDetails.DeserializeCatalogSyncErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets project catalog synchronization error details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetSyncErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetSyncErrorDetailsRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CatalogSyncErrorDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CatalogSyncErrorDetails.DeserializeCatalogSyncErrorDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateSyncRequestUri(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/sync", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSyncRequest(string subscriptionId, string resourceGroupName, string projectName, string catalogName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/catalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendPath("/sync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Syncs templates for a template source. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task SyncAsync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateSyncRequest(subscriptionId, resourceGroupName, projectName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Syncs templates for a template source. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Sync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateSyncRequest(subscriptionId, resourceGroupName, projectName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the catalogs associated with a project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DevCenterCatalogListResult.DeserializeDevCenterCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the catalogs associated with a project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevCenterCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DevCenterCatalogListResult.DeserializeDevCenterCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectEnvironmentTypesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectEnvironmentTypesRestOperations.cs index 3a51b56b58ce..ad71bc6b6b3a 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectEnvironmentTypesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectEnvironmentTypesRestOperations.cs @@ -32,7 +32,7 @@ public ProjectEnvironmentTypesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists environment types for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -111,7 +111,7 @@ public async Task> ListAsync(string s } /// Lists environment types for a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -212,7 +212,7 @@ public async Task> GetAsync(string sub } /// Gets a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -287,7 +287,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -308,6 +308,7 @@ public async Task> CreateOrUpdateAsync switch (message.Response.Status) { case 200: + case 201: { DevCenterProjectEnvironmentData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); @@ -320,7 +321,7 @@ public async Task> CreateOrUpdateAsync } /// Creates or updates a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -341,6 +342,7 @@ public Response CreateOrUpdate(string subscript switch (message.Response.Status) { case 200: + case 201: { DevCenterProjectEnvironmentData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); @@ -395,7 +397,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -428,7 +430,7 @@ public async Task> UpdateAsync(string } /// Partially updates a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -499,7 +501,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -526,7 +528,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a project environment type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the environment type. @@ -576,7 +578,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists environment types for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -608,7 +610,7 @@ public async Task> ListNextPageAsync( /// Lists environment types for a project. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The maximum number of resources to return from the operation. Example: '$top=10'. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectPoliciesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectPoliciesRestOperations.cs new file mode 100644 index 000000000000..17d8234f6fae --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectPoliciesRestOperations.cs @@ -0,0 +1,625 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DevCenter.Models; + +namespace Azure.ResourceManager.DevCenter +{ + internal partial class ProjectPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectPoliciesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProjectPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByDevCenterRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByDevCenterRequest(string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all project policies in the dev center. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterAsync(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectPolicyListResult.DeserializeProjectPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all project policies in the dev center. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListByDevCenterRequest(subscriptionId, resourceGroupName, devCenterName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectPolicyListResult.DeserializeProjectPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a specific project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectPolicyData.DeserializeProjectPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a specific project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectPolicyData.DeserializeProjectPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, ProjectPolicyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, ProjectPolicyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// Represents an project policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, ProjectPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// Represents an project policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, ProjectPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, DevCenterProjectPolicyPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, DevCenterProjectPolicyPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Partially updates an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// Updatable project policy properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, DevCenterProjectPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Partially updates an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// Updatable project policy properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, DevCenterProjectPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/devcenters/", false); + uri.AppendPath(devCenterName, true); + uri.AppendPath("/projectPolicies/", false); + uri.AppendPath(projectPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes an project policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the project policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + Argument.AssertNotNullOrEmpty(projectPolicyName, nameof(projectPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDevCenterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByDevCenterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all project policies in the dev center. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDevCenterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectPolicyListResult.DeserializeProjectPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all project policies in the dev center. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDevCenterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string devCenterName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(devCenterName, nameof(devCenterName)); + + using var message = CreateListByDevCenterNextPageRequest(nextLink, subscriptionId, resourceGroupName, devCenterName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectPolicyListResult.DeserializeProjectPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectsRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectsRestOperations.cs index 12c50a73a5c3..e664d8f1a375 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectsRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/ProjectsRestOperations.cs @@ -32,7 +32,7 @@ public ProjectsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, int? } /// Lists all projects in the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -99,7 +99,7 @@ public async Task> ListBySubscriptionAsync(string su } /// Lists all projects in the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -165,7 +165,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists all projects in the resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -193,7 +193,7 @@ public async Task> ListByResourceGroupAsync(string s } /// Lists all projects in the resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -255,7 +255,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a specific project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The cancellation token to use. @@ -286,7 +286,7 @@ public async Task> GetAsync(string subscriptionId } /// Gets a specific project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The cancellation token to use. @@ -355,7 +355,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Represents a project. @@ -382,7 +382,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Represents a project. @@ -447,7 +447,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Partially updates a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Updatable project properties. @@ -474,7 +474,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Partially updates a project. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Updatable project properties. @@ -535,7 +535,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a project resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The cancellation token to use. @@ -551,7 +551,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -561,7 +560,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a project resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The cancellation token to use. @@ -577,7 +576,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -586,6 +584,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p } } + internal RequestUriBuilder CreateGetInheritedSettingsRequestUri(string subscriptionId, string resourceGroupName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getInheritedSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetInheritedSettingsRequest(string subscriptionId, string resourceGroupName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getInheritedSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets applicable inherited settings for this project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetInheritedSettingsAsync(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetInheritedSettingsRequest(subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InheritedSettingsForProject value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InheritedSettingsForProject.DeserializeInheritedSettingsForProject(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets applicable inherited settings for this project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetInheritedSettings(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetInheritedSettingsRequest(subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InheritedSettingsForProject value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InheritedSettingsForProject.DeserializeInheritedSettingsForProject(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, int? top) { var uri = new RawRequestUriBuilder(); @@ -610,7 +702,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all projects in the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -638,7 +730,7 @@ public async Task> ListBySubscriptionNextPageAsync(s /// Lists all projects in the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -688,7 +780,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists all projects in the resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. @@ -718,7 +810,7 @@ public async Task> ListByResourceGroupNextPageAsync( /// Lists all projects in the resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SchedulesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SchedulesRestOperations.cs index dcfb73db299e..b8a7cc33a2a4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -32,7 +32,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -85,7 +85,7 @@ internal HttpMessage CreateListByPoolRequest(string subscriptionId, string resou } /// Lists schedules for a pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -117,7 +117,7 @@ public async Task> ListByPoolAsync(string subscript } /// Lists schedules for a pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -148,7 +148,7 @@ public Response ListByPool(string subscriptionId, string res } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? top) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -163,14 +163,10 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath("/schedules/", false); uri.AppendPath(scheduleName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? top) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -188,10 +184,6 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/schedules/", false); uri.AppendPath(scheduleName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (top != null) - { - uri.AppendQuery("$top", top.Value, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -199,16 +191,15 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a schedule resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -216,7 +207,7 @@ public async Task> GetAsync(string subscriptionI Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, poolName, scheduleName, top); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, poolName, scheduleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -235,16 +226,15 @@ public async Task> GetAsync(string subscriptionI } /// Gets a schedule resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. /// The name of the schedule that uniquely identifies it. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? top = null, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -252,7 +242,7 @@ public Response Get(string subscriptionId, string resourc Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); Argument.AssertNotNullOrEmpty(scheduleName, nameof(scheduleName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, poolName, scheduleName, top); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, projectName, poolName, scheduleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -325,7 +315,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Schedule. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -357,7 +347,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Schedule. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -442,8 +432,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Partially updates a Scheduled. - /// The ID of the target subscription. + /// Partially updates a Schedule. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -474,8 +464,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Partially updates a Scheduled. - /// The ID of the target subscription. + /// Partially updates a Schedule. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -556,8 +546,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a Scheduled. - /// The ID of the target subscription. + /// Deletes a Schedule. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -578,7 +568,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -587,8 +576,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes a Scheduled. - /// The ID of the target subscription. + /// Deletes a Schedule. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -609,7 +598,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -642,7 +630,7 @@ internal HttpMessage CreateListByPoolNextPageRequest(string nextLink, string sub /// Lists schedules for a pool. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. @@ -676,7 +664,7 @@ public async Task> ListByPoolNextPageAsync(string n /// Lists schedules for a pool. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// Name of the pool. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SkusRestOperations.cs index 75b72249ba26..bf893ff81c54 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/SkusRestOperations.cs @@ -32,7 +32,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, int? } /// Lists the Microsoft.DevCenter SKUs available in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -99,7 +99,7 @@ public async Task> ListBySubscriptionAsync(string subscr } /// Lists the Microsoft.DevCenter SKUs available in a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// is null. @@ -124,6 +124,100 @@ public Response ListBySubscription(string subscriptionId, int? to } } + internal RequestUriBuilder CreateListByProjectRequestUri(string subscriptionId, string resourceGroupName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/listSkus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByProjectRequest(string subscriptionId, string resourceGroupName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DevCenter/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/listSkus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists SKUs available to the project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectAsync(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists SKUs available to the project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProject(string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectRequest(subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, int? top) { var uri = new RawRequestUriBuilder(); @@ -148,7 +242,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -176,7 +270,7 @@ public async Task> ListBySubscriptionNextPageAsync(strin /// Lists the Microsoft.DevCenter SKUs available in a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// The cancellation token to use. /// or is null. @@ -201,5 +295,89 @@ public Response ListBySubscriptionNextPage(string nextLink, strin throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListByProjectNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByProjectNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists SKUs available to the project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByProjectNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists SKUs available to the project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByProjectNextPage(string nextLink, string subscriptionId, string resourceGroupName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListByProjectNextPageRequest(nextLink, subscriptionId, resourceGroupName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/UsagesRestOperations.cs index b7f87a5acb11..a5322cb5e866 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/RestOperations/UsagesRestOperations.cs @@ -32,7 +32,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,8 +69,8 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc } /// Lists the current usages and limits in this location for the provided subscription. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> ListByLocationAsync(string subscri } /// Lists the current usages and limits in this location for the provided subscription. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -144,8 +144,8 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string /// Lists the current usages and limits in this location for the provided subscription. /// The URL to the next page of results. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -172,8 +172,8 @@ public async Task> ListByLocationNextPageAsync(string /// Lists the current usages and limits in this location for the provided subscription. /// The URL to the next page of results. - /// The ID of the target subscription. - /// The Azure region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Properties/AssemblyInfo.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Properties/AssemblyInfo.cs index be5aa91b85ec..ea70c396586e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Properties/AssemblyInfo.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Properties/AssemblyInfo.cs @@ -4,6 +4,5 @@ using System.Runtime.CompilerServices; [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.DevCenter")] - [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] [assembly: InternalsVisibleTo("Azure.ResourceManager.DevCenter.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/autorest.md b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/autorest.md index e30d82c43a62..7c25c43ce10c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/autorest.md +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/autorest.md @@ -9,7 +9,8 @@ generate-model-factory: true csharp: true library-name: DevCenter namespace: Azure.ResourceManager.DevCenter -require: https://github.com/Azure/azure-rest-api-specs/blob/07c55de803057861912799405580ea9d022853fc/specification/devcenter/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/c0ba17235b00917bf1b734b7b537bf532fe7fce0/specification/devcenter/resource-manager/readme.md +# tag: package-preview-2025-07-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -99,7 +100,6 @@ rename-mapping: ProjectEnvironmentType.properties.deploymentTargetId: -|arm-id ProjectEnvironmentTypeUpdate.properties.deploymentTargetId: -|arm-id ImageReference.id: -|arm-id - OperationStatus.resourceId: -|arm-id DevCenterSku.resourceType: -|resource-type CheckNameAvailabilityRequest.type: -|resource-type EnvironmentTypeEnableStatus.Enabled: IsEnabled @@ -113,7 +113,7 @@ rename-mapping: StopOnDisconnectEnableStatus.Enabled: IsEnabled StopOnDisconnectEnableStatus.Disabled: IsDisabled AttachedNetworkConnection.properties.networkConnectionLocation: -|azure-location - UserRoleAssignmentValue: DevCenterUserRoleAssignments + UserRoleAssignment: DevCenterUserRoleAssignments DomainJoinType.HybridAzureADJoin: HybridAadJoin DomainJoinType.AzureADJoin: AadJoin CheckNameAvailabilityResponse.nameAvailable: IsNameAvailable @@ -121,8 +121,26 @@ rename-mapping: CheckNameAvailabilityResponse: DevCenterNameAvailabilityResult CheckNameAvailabilityReason: DevCenterNameUnavailableReason ProjectEnvironmentType: DevCenterProjectEnvironment - ImageVersion.properties.osDiskImageSizeInGb: OsDiskImageSizeInGB + ImageVersion.properties.osDiskImageSizeInGb: OsDiskImageSizeInGB ImageVersion.properties.excludeFromLatest: IsExcludedFromLatest + EnvironmentDefinitionParameter: EnvironmentDefinitionContent + EnvironmentDefinitionParameter.id: -|uuid + EnvironmentDefinitionParameter.readOnly: IsReadOnly + EnvironmentDefinitionParameter.required: IsRequired + ParameterType: EnvironmentDefinitionParameterType + PoolDevBoxDefinition: PoolDevBox + CatalogUpdate: DevCenterCatalogPatch + CheckScopedNameAvailabilityRequest.type: -|resource-type + CustomizationTaskInput.required: IsRequired + Usage.id: -|arm-id + SyncStats: CatalogSyncStats + SyncErrorDetails: CatalogSyncErrorDetails + SingleSignOnStatus: PoolUpdateSingleSignOnStatus + ResourcePolicy: ProjectPolicyUpdateResourcePolicy + EnvironmentDefinition: DevCenterEnvironmentDefinition + ImageDefinitionBuild: DevCenterImageDefinitionBuild + ImageDefinition: DevCenterImageDefinition + OperationStatusResult.id: -|arm-id override-operation-name: OperationStatuses_Get: GetDevCenterOperationStatus @@ -130,25 +148,119 @@ override-operation-name: CheckNameAvailability_Execute: CheckDevCenterNameAvailability Skus_ListBySubscription: GetDevCenterSkusBySubscription NetworkConnections_ListOutboundNetworkDependenciesEndpoints: GetOutboundEnvironmentEndpoints + Images_ListByDevCenter: GetImagesByDevCenter request-path-to-resource-name: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks: AttachedNetworkConnection - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}: AttachedNetworkConnection - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks: ProjectAttachedNetworkConnectionCollection - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}: ProjectAttachedNetworkConnection - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions: DevBoxDefinition - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}: DevBoxDefinition - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions: ProjectDevBoxDefinition - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName}: ProjectDevBoxDefinition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}: AttachedNetworkConnection # It is originally called AttachedNetworkConnection and cannot be renamed to DevCenterAttachedNetworkConnection. + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}: ProjectAttachedNetworkConnection # It is originally called ProjectAttachedNetworkConnection and cannot be renamed to DevCenterProjectAttachedNetworkConnection. + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}: DevBoxDefinition # It is originally called DevBoxDefinition and cannot be renamed to DevCenterDevBoxDefinition. + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName}: ProjectDevBoxDefinition # It is originally called ProjectDevBoxDefinition and cannot be renamed to DevCenterProjectDevBoxDefinition. + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}: DevCenterCatalog + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}: DevCenterImage + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}: ImageVersion # It is originally called ImageVersion and cannot be renamed to DevCenterImageVersion. + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}: DevCenterProjectCatalog + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}: DevCenterCatalogEnvironmentDefinition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}: DevCenterCatalogImageDefinition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}: DevCenterCatalogImageDefinitionBuild + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}: DevCenterProjectCatalogEnvironmentDefinition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}: DevCenterProjectCatalogImageDefinitionBuild + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}: DevCenterProjectCatalogImageDefinition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}: DevCenterProjectImage + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}: DevCenterProjectImageVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}: DevCenterProjectPolicy -### Directive renaming "type" property of ScheduleUpdateProperties to "ScheduledType" (to avoid it being generated as TypePropertiesType) directive: - - from: swagger-document - where: "$.definitions.ScheduleUpdateProperties.properties.type" - transform: > - $["x-ms-client-name"] = "ScheduledType"; - - from: types.json - where: $.definitions.OperationStatusResult - transform: > - $.properties.id['x-ms-format'] = 'arm-id'; + # Add missing definitions + - from: swagger-document + where: $.definitions + transform: > + $.Tags = { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }; + $.TrackedResourceUpdate = { + "description": "Base tracked resource type for PATCH updates", + "type": "object", + "properties": { + "tags": { + "$ref": "#/definitions/Tags", + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + } + }; + $.TrackedResourceUpdate['x-ms-client-name'] = "DevCenterTrackedResourceUpdate"; + # The following adds the newly added TrackedResourceUpdate to the allof of the corresponding model + # Solved the issue of no inheritance class + # Unwanted properties need to be deleted. + - from: swagger-document + where: $.definitions + transform: > + const updateModels = ['DevBoxDefinitionUpdate', 'NetworkConnectionUpdate', 'DevCenterUpdate', 'PoolUpdate', 'ProjectUpdate', 'ScheduleUpdate']; + updateModels.forEach(modelName => { + const model = $[modelName]; + if (model && model.properties) { + delete model.properties.location; + delete model.properties.tags; + if (modelName === 'DevCenterUpdate') { + delete model.properties.properties; + } + if (modelName === 'ProjectUpdate') { + delete model.properties.identity; + } + model.allOf = model.allOf || []; + model.allOf.push({"$ref": "#/definitions/TrackedResourceUpdate"}); + } + }); + - from: swagger-document + where: $.definitions.ScheduleUpdateProperties + transform: > + delete $.properties.location; + delete $.properties.tags; + # Directive renaming "type" property of ScheduleUpdateProperties to "ScheduledType" (to avoid it being generated as TypePropertiesType) + - from: swagger-document + where: "$.definitions.ScheduleUpdateProperties.properties.type" + transform: > + $["x-ms-client-name"] = "ScheduledType"; + #- from: types.json + # where: $.definitions.OperationStatusResult + # transform: > + # $.properties.id['x-ms-format'] = 'arm-id'; + - from: swagger-document + where: "$.definitions.ScheduleProperties.properties.type" + transform: > + $["x-ms-client-name"] = "ScheduledType"; + # Add missing attributes + - from: swagger-document + where: "$.definitions.OperationStatus" + transform: > + $.properties.resourceId = { + "type": "string", + "description": "The resource ID of the resource being operated on.", + "x-ms-format": "arm-id" + }; + $.properties.properties['additionalProperties'] = false; + # Rename operations to solve the problem of generating duplicate code + - rename-operation: + from: ProjectCatalogImageDefinitionBuilds_ListByImageDefinition + to: ProjectCatalogImageDefinitionBuild_ListByImageDefinition + - rename-operation: + from: DevCenterCatalogImageDefinitionBuilds_ListByImageDefinition + to: DevCenterCatalogImageDefinitionBuild_ListByImageDefinition + ``` diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Azure.ResourceManager.DevCenter.Tests.csproj b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Azure.ResourceManager.DevCenter.Tests.csproj index 7710781a4c56..c72e9950a985 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Azure.ResourceManager.DevCenter.Tests.csproj +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Azure.ResourceManager.DevCenter.Tests.csproj @@ -12,4 +12,7 @@ + + + diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeCollection.cs index cccee5313e5f..e31e59da7648 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_AllowedEnvironmentTypeCollection [Ignore("Only validating compilation of examples")] public async Task Get_ProjectAllowedEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectAllowedEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_ProjectAllowedEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "Contoso"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -53,7 +53,7 @@ public async Task Get_ProjectAllowedEnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProjectAllowedEnvironmentTypesList() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json // this example is just showing the usage of "ProjectAllowedEnvironmentTypes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_ProjectAllowedEnvironmentTypesList() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "Contoso"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -89,7 +89,7 @@ public async Task GetAll_ProjectAllowedEnvironmentTypesList() [Ignore("Only validating compilation of examples")] public async Task Exists_ProjectAllowedEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectAllowedEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_ProjectAllowedEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "Contoso"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -119,7 +119,7 @@ public async Task Exists_ProjectAllowedEnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProjectAllowedEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectAllowedEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_ProjectAllowedEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "Contoso"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeResource.cs index e6326c54bd94..263bc52b28b9 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AllowedEnvironmentTypeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AllowedEnvironmentTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_ProjectAllowedEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectAllowedEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_ProjectAllowedEnvironmentTypesGet() // this example assumes you already have this AllowedEnvironmentTypeResource created on azure // for more information of creating AllowedEnvironmentTypeResource, please refer to the document of AllowedEnvironmentTypeResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "Contoso"; string environmentTypeName = "DevTest"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionCollection.cs index 45be226839c5..ac5a44b57fef 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_AttachedNetworkConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AttachedNetworksCreate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_Create.json // this example is just showing the usage of "AttachedNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_AttachedNetworksCreate() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_AttachedNetworksCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AttachedNetworksGetByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByDevCenter.json // this example is just showing the usage of "AttachedNetworks_GetByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task Get_AttachedNetworksGetByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -92,7 +92,7 @@ public async Task Get_AttachedNetworksGetByDevCenter() [Ignore("Only validating compilation of examples")] public async Task GetAll_AttachedNetworksListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_ListByDevCenter.json // this example is just showing the usage of "AttachedNetworks_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task GetAll_AttachedNetworksListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -128,7 +128,7 @@ public async Task GetAll_AttachedNetworksListByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Exists_AttachedNetworksGetByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByDevCenter.json // this example is just showing the usage of "AttachedNetworks_GetByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Exists_AttachedNetworksGetByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -158,7 +158,7 @@ public async Task Exists_AttachedNetworksGetByDevCenter() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AttachedNetworksGetByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByDevCenter.json // this example is just showing the usage of "AttachedNetworks_GetByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task GetIfExists_AttachedNetworksGetByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionResource.cs index 50be60c9e6f9..a47bc684b14c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_AttachedNetworkConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AttachedNetworkConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_AttachedNetworksGetByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByDevCenter.json // this example is just showing the usage of "AttachedNetworks_GetByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_AttachedNetworksGetByDevCenter() // this example assumes you already have this AttachedNetworkConnectionResource created on azure // for more information of creating AttachedNetworkConnectionResource, please refer to the document of AttachedNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string attachedNetworkConnectionName = "network-uswest3"; @@ -50,7 +50,7 @@ public async Task Get_AttachedNetworksGetByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Delete_AttachedNetworksDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_Delete.json // this example is just showing the usage of "AttachedNetworks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_AttachedNetworksDelete() // this example assumes you already have this AttachedNetworkConnectionResource created on azure // for more information of creating AttachedNetworkConnectionResource, please refer to the document of AttachedNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string attachedNetworkConnectionName = "network-uswest3"; @@ -77,7 +77,7 @@ public async Task Delete_AttachedNetworksDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AttachedNetworksCreate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_Create.json // this example is just showing the usage of "AttachedNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_AttachedNetworksCreate() // this example assumes you already have this AttachedNetworkConnectionResource created on azure // for more information of creating AttachedNetworkConnectionResource, please refer to the document of AttachedNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string attachedNetworkConnectionName = "network-uswest3"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskCollection.cs new file mode 100644 index 000000000000..7758f11e9d93 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_CustomizationTaskCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CustomizationTasksGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_Get.json + // this example is just showing the usage of "CustomizationTasks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this CustomizationTaskResource + CustomizationTaskCollection collection = devCenterCatalog.GetCustomizationTasks(); + + // invoke the operation + string taskName = "SampleTask"; + CustomizationTaskResource result = await collection.GetAsync(taskName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomizationTaskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_CustomizationTasksListByCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_ListByCatalog.json + // this example is just showing the usage of "CustomizationTasks_ListByCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this CustomizationTaskResource + CustomizationTaskCollection collection = devCenterCatalog.GetCustomizationTasks(); + + // invoke the operation and iterate over the result + await foreach (CustomizationTaskResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomizationTaskData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_CustomizationTasksGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_Get.json + // this example is just showing the usage of "CustomizationTasks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this CustomizationTaskResource + CustomizationTaskCollection collection = devCenterCatalog.GetCustomizationTasks(); + + // invoke the operation + string taskName = "SampleTask"; + bool result = await collection.ExistsAsync(taskName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_CustomizationTasksGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_Get.json + // this example is just showing the usage of "CustomizationTasks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this CustomizationTaskResource + CustomizationTaskCollection collection = devCenterCatalog.GetCustomizationTasks(); + + // invoke the operation + string taskName = "SampleTask"; + NullableResponse response = await collection.GetIfExistsAsync(taskName); + CustomizationTaskResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomizationTaskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskResource.cs new file mode 100644 index 000000000000..8d4e0017dc7a --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_CustomizationTaskResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_CustomizationTaskResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CustomizationTasksGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_Get.json + // this example is just showing the usage of "CustomizationTasks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomizationTaskResource created on azure + // for more information of creating CustomizationTaskResource, please refer to the document of CustomizationTaskResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + string taskName = "SampleTask"; + ResourceIdentifier customizationTaskResourceId = CustomizationTaskResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + CustomizationTaskResource customizationTask = client.GetCustomizationTaskResource(customizationTaskResourceId); + + // invoke the operation + CustomizationTaskResource result = await customizationTask.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomizationTaskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetErrorDetails_CustomizationTasksGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CustomizationTasks_GetErrorDetails.json + // this example is just showing the usage of "CustomizationTasks_GetErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomizationTaskResource created on azure + // for more information of creating CustomizationTaskResource, please refer to the document of CustomizationTaskResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + string taskName = "SampleTask"; + ResourceIdentifier customizationTaskResourceId = CustomizationTaskResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, taskName); + CustomizationTaskResource customizationTask = client.GetCustomizationTaskResource(customizationTaskResourceId); + + // invoke the operation + CatalogResourceValidationErrorDetails result = await customizationTask.GetErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionCollection.cs index 75df8e2b12bb..bda623d211fb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevBoxDefinitionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DevBoxDefinitionsCreate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Create.json // this example is just showing the usage of "DevBoxDefinitions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_DevBoxDefinitionsCreate() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -45,7 +45,7 @@ public async Task CreateOrUpdate_DevBoxDefinitionsCreate() { ImageReference = new DevCenterImageReference { - Id = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"), + Id = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/versions/1.0.0"), }, Sku = new DevCenterSku("Preview"), HibernateSupport = DevCenterHibernateSupport.IsEnabled, @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_DevBoxDefinitionsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_DevBoxDefinitionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Get.json // this example is just showing the usage of "DevBoxDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_DevBoxDefinitionsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -98,7 +98,7 @@ public async Task Get_DevBoxDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DevBoxDefinitionsListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json // this example is just showing the usage of "DevBoxDefinitions_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task GetAll_DevBoxDefinitionsListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -134,7 +134,7 @@ public async Task GetAll_DevBoxDefinitionsListByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Exists_DevBoxDefinitionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Get.json // this example is just showing the usage of "DevBoxDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Exists_DevBoxDefinitionsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -164,7 +164,7 @@ public async Task Exists_DevBoxDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DevBoxDefinitionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Get.json // this example is just showing the usage of "DevBoxDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_DevBoxDefinitionsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionResource.cs index ebddfdc34569..0def3faa6a88 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevBoxDefinitionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevBoxDefinitionResource [Ignore("Only validating compilation of examples")] public async Task Get_DevBoxDefinitionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Get.json // this example is just showing the usage of "DevBoxDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_DevBoxDefinitionsGet() // this example assumes you already have this DevBoxDefinitionResource created on azure // for more information of creating DevBoxDefinitionResource, please refer to the document of DevBoxDefinitionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string devBoxDefinitionName = "WebDevBox"; @@ -51,7 +51,7 @@ public async Task Get_DevBoxDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DevBoxDefinitionsDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Delete.json // this example is just showing the usage of "DevBoxDefinitions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_DevBoxDefinitionsDelete() // this example assumes you already have this DevBoxDefinitionResource created on azure // for more information of creating DevBoxDefinitionResource, please refer to the document of DevBoxDefinitionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string devBoxDefinitionName = "WebDevBox"; @@ -78,7 +78,7 @@ public async Task Delete_DevBoxDefinitionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DevBoxDefinitionsPatch() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_Patch.json // this example is just showing the usage of "DevBoxDefinitions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_DevBoxDefinitionsPatch() // this example assumes you already have this DevBoxDefinitionResource created on azure // for more information of creating DevBoxDefinitionResource, please refer to the document of DevBoxDefinitionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string devBoxDefinitionName = "WebDevBox"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogCollection.cs index c69ac39b2a7a..3780018a044b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterCatalogCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CatalogsCreateOrUpdateAdo() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateAdo.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_CreateAdo.json // this example is just showing the usage of "Catalogs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateAdo() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -50,6 +50,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateAdo() SecretIdentifier = "https://contosokv.vault.azure.net/secrets/CentralRepoPat", Path = "/templates", }, + SyncType = CatalogSyncType.Scheduled, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); DevCenterCatalogResource result = lro.Value; @@ -65,7 +66,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateAdo() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CatalogsCreateOrUpdateGitHub() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateGitHub.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_CreateGitHub.json // this example is just showing the usage of "Catalogs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +76,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateGitHub() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -95,6 +96,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateGitHub() SecretIdentifier = "https://contosokv.vault.azure.net/secrets/CentralRepoPat", Path = "/templates", }, + SyncType = CatalogSyncType.Manual, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); DevCenterCatalogResource result = lro.Value; @@ -110,7 +112,7 @@ public async Task CreateOrUpdate_CatalogsCreateOrUpdateGitHub() [Ignore("Only validating compilation of examples")] public async Task Get_CatalogsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Get.json // this example is just showing the usage of "Catalogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +122,7 @@ public async Task Get_CatalogsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -144,7 +146,7 @@ public async Task Get_CatalogsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CatalogsListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_List.json // this example is just showing the usage of "Catalogs_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +156,7 @@ public async Task GetAll_CatalogsListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -180,7 +182,7 @@ public async Task GetAll_CatalogsListByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Exists_CatalogsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Get.json // this example is just showing the usage of "Catalogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +192,7 @@ public async Task Exists_CatalogsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -210,7 +212,7 @@ public async Task Exists_CatalogsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CatalogsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Get.json // this example is just showing the usage of "Catalogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -220,7 +222,7 @@ public async Task GetIfExists_CatalogsGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionCollection.cs new file mode 100644 index 000000000000..3410fd42e679 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogEnvironmentDefinitionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EnvironmentDefinitionsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_Get.json + // this example is just showing the usage of "EnvironmentDefinitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogEnvironmentDefinitionResource + DevCenterCatalogEnvironmentDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + DevCenterCatalogEnvironmentDefinitionResource result = await collection.GetAsync(environmentDefinitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EnvironmentDefinitionsListByCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_ListByCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_ListByCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogEnvironmentDefinitionResource + DevCenterCatalogEnvironmentDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogEnvironmentDefinitions(); + + // invoke the operation and iterate over the result + await foreach (DevCenterCatalogEnvironmentDefinitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EnvironmentDefinitionsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_Get.json + // this example is just showing the usage of "EnvironmentDefinitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogEnvironmentDefinitionResource + DevCenterCatalogEnvironmentDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + bool result = await collection.ExistsAsync(environmentDefinitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EnvironmentDefinitionsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_Get.json + // this example is just showing the usage of "EnvironmentDefinitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogEnvironmentDefinitionResource + DevCenterCatalogEnvironmentDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + NullableResponse response = await collection.GetIfExistsAsync(environmentDefinitionName); + DevCenterCatalogEnvironmentDefinitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionResource.cs new file mode 100644 index 000000000000..3ac131c2d585 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogEnvironmentDefinitionResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogEnvironmentDefinitionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EnvironmentDefinitionsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_Get.json + // this example is just showing the usage of "EnvironmentDefinitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogEnvironmentDefinitionResource created on azure + // for more information of creating DevCenterCatalogEnvironmentDefinitionResource, please refer to the document of DevCenterCatalogEnvironmentDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + string environmentDefinitionName = "myEnvironmentDefinition"; + ResourceIdentifier devCenterCatalogEnvironmentDefinitionResourceId = DevCenterCatalogEnvironmentDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + DevCenterCatalogEnvironmentDefinitionResource devCenterCatalogEnvironmentDefinition = client.GetDevCenterCatalogEnvironmentDefinitionResource(devCenterCatalogEnvironmentDefinitionResourceId); + + // invoke the operation + DevCenterCatalogEnvironmentDefinitionResource result = await devCenterCatalogEnvironmentDefinition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetErrorDetails_EnvironmentDefinitionsGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_GetErrorDetails.json + // this example is just showing the usage of "EnvironmentDefinitions_GetErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogEnvironmentDefinitionResource created on azure + // for more information of creating DevCenterCatalogEnvironmentDefinitionResource, please refer to the document of DevCenterCatalogEnvironmentDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "myCatalog"; + string environmentDefinitionName = "myEnvironmentDefinition"; + ResourceIdentifier devCenterCatalogEnvironmentDefinitionResourceId = DevCenterCatalogEnvironmentDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + DevCenterCatalogEnvironmentDefinitionResource devCenterCatalogEnvironmentDefinition = client.GetDevCenterCatalogEnvironmentDefinitionResource(devCenterCatalogEnvironmentDefinitionResourceId); + + // invoke the operation + CatalogResourceValidationErrorDetails result = await devCenterCatalogEnvironmentDefinition.GetErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildCollection.cs new file mode 100644 index 000000000000..857bd8415de7 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogImageDefinitionBuildCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DevCenterImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionBuildResource + DevCenterCatalogImageDefinitionBuildCollection collection = devCenterCatalogImageDefinition.GetDevCenterCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + DevCenterCatalogImageDefinitionBuildResource result = await collection.GetAsync(buildName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_DevCenterImageDefinitionBuildsListByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_ListImageBuildsByImageDefinition.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_ListByImageDefinition" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionBuildResource + DevCenterCatalogImageDefinitionBuildCollection collection = devCenterCatalogImageDefinition.GetDevCenterCatalogImageDefinitionBuilds(); + + // invoke the operation and iterate over the result + await foreach (DevCenterCatalogImageDefinitionBuildResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_DevCenterImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionBuildResource + DevCenterCatalogImageDefinitionBuildCollection collection = devCenterCatalogImageDefinition.GetDevCenterCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + bool result = await collection.ExistsAsync(buildName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DevCenterImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionBuildResource + DevCenterCatalogImageDefinitionBuildCollection collection = devCenterCatalogImageDefinition.GetDevCenterCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + NullableResponse response = await collection.GetIfExistsAsync(buildName); + DevCenterCatalogImageDefinitionBuildResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildResource.cs new file mode 100644 index 000000000000..37f04b8de87c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionBuildResource.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogImageDefinitionBuildResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DevCenterImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionBuildResource, please refer to the document of DevCenterCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterCatalogImageDefinitionBuildResourceId = DevCenterCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + DevCenterCatalogImageDefinitionBuildResource devCenterCatalogImageDefinitionBuild = client.GetDevCenterCatalogImageDefinitionBuildResource(devCenterCatalogImageDefinitionBuildResourceId); + + // invoke the operation + DevCenterCatalogImageDefinitionBuildResource result = await devCenterCatalogImageDefinitionBuild.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Cancel_DevCenterImageDefinitionBuildsCancelByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_CancelImageBuild.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_Cancel" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionBuildResource, please refer to the document of DevCenterCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterCatalogImageDefinitionBuildResourceId = DevCenterCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + DevCenterCatalogImageDefinitionBuildResource devCenterCatalogImageDefinitionBuild = client.GetDevCenterCatalogImageDefinitionBuildResource(devCenterCatalogImageDefinitionBuildResourceId); + + // invoke the operation + await devCenterCatalogImageDefinitionBuild.CancelAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBuildDetails_DevCenterCatalogImageDefinitionBuildGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetImageBuildDetails.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitionBuild_GetBuildDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionBuildResource, please refer to the document of DevCenterCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterCatalogImageDefinitionBuildResourceId = DevCenterCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName, buildName); + DevCenterCatalogImageDefinitionBuildResource devCenterCatalogImageDefinitionBuild = client.GetDevCenterCatalogImageDefinitionBuildResource(devCenterCatalogImageDefinitionBuildResourceId); + + // invoke the operation + ImageDefinitionBuildDetails result = await devCenterCatalogImageDefinitionBuild.GetBuildDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionCollection.cs new file mode 100644 index 000000000000..015fab3b35db --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogImageDefinitionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionsGetByDevCenterCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByDevCenterCatalog.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_GetByDevCenterCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "ContosoDevCenter"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionResource + DevCenterCatalogImageDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + DevCenterCatalogImageDefinitionResource result = await collection.GetAsync(imageDefinitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImageDefinitionsListByDevCenterCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_ListByDevCenterCatalog.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_ListByDevCenterCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "ContosoDevCenter"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionResource + DevCenterCatalogImageDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogImageDefinitions(); + + // invoke the operation and iterate over the result + await foreach (DevCenterCatalogImageDefinitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImageDefinitionsGetByDevCenterCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByDevCenterCatalog.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_GetByDevCenterCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "ContosoDevCenter"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionResource + DevCenterCatalogImageDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + bool result = await collection.ExistsAsync(imageDefinitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImageDefinitionsGetByDevCenterCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByDevCenterCatalog.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_GetByDevCenterCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "ContosoDevCenter"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // get the collection of this DevCenterCatalogImageDefinitionResource + DevCenterCatalogImageDefinitionCollection collection = devCenterCatalog.GetDevCenterCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + NullableResponse response = await collection.GetIfExistsAsync(imageDefinitionName); + DevCenterCatalogImageDefinitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionResource.cs new file mode 100644 index 000000000000..303f2d1a94f9 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogImageDefinitionResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterCatalogImageDefinitionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionsGetByDevCenterCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByDevCenterCatalog.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_GetByDevCenterCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "ContosoDevCenter"; + string catalogName = "TeamCatalog"; + string imageDefinitionName = "WebDevBox"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // invoke the operation + DevCenterCatalogImageDefinitionResource result = await devCenterCatalogImageDefinition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task BuildImage_DevCenterCatalogImageDefinitionsBuildImage() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_BuildImage.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_BuildImage" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // invoke the operation + await devCenterCatalogImageDefinition.BuildImageAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetErrorDetails_DevCenterImageDefinitionsGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterImageDefinitions_GetErrorDetails.json + // this example is just showing the usage of "DevCenterCatalogImageDefinitions_GetErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterCatalogImageDefinitionResource, please refer to the document of DevCenterCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "DevDevCenter"; + string catalogName = "TeamCatalog"; + string imageDefinitionName = "WebDevBox"; + ResourceIdentifier devCenterCatalogImageDefinitionResourceId = DevCenterCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName, imageDefinitionName); + DevCenterCatalogImageDefinitionResource devCenterCatalogImageDefinition = client.GetDevCenterCatalogImageDefinitionResource(devCenterCatalogImageDefinitionResourceId); + + // invoke the operation + CatalogResourceValidationErrorDetails result = await devCenterCatalogImageDefinition.GetErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogResource.cs index 0909d24d98ae..1738bbf4ca45 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCatalogResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterCatalogResource [Ignore("Only validating compilation of examples")] public async Task Get_CatalogsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Get.json // this example is just showing the usage of "Catalogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_CatalogsGet() // this example assumes you already have this DevCenterCatalogResource created on azure // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string catalogName = "CentralCatalog"; @@ -51,7 +51,7 @@ public async Task Get_CatalogsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CatalogsDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Delete.json // this example is just showing the usage of "Catalogs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_CatalogsDelete() // this example assumes you already have this DevCenterCatalogResource created on azure // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string catalogName = "CentralCatalog"; @@ -78,7 +78,7 @@ public async Task Delete_CatalogsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CatalogsUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Patch.json // this example is just showing the usage of "Catalogs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_CatalogsUpdate() // this example assumes you already have this DevCenterCatalogResource created on azure // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string catalogName = "CentralCatalog"; @@ -102,6 +102,7 @@ public async Task Update_CatalogsUpdate() { Path = "/environments", }, + SyncType = CatalogSyncType.Scheduled, }; ArmOperation lro = await devCenterCatalog.UpdateAsync(WaitUntil.Completed, patch); DevCenterCatalogResource result = lro.Value; @@ -113,11 +114,65 @@ public async Task Update_CatalogsUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Connect_CatalogsConnect() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Connect.json + // this example is just showing the usage of "Catalogs_Connect" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // invoke the operation + await devCenterCatalog.ConnectAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSyncErrorDetails_CatalogsGetSyncErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_GetSyncErrorDetails.json + // this example is just showing the usage of "Catalogs_GetSyncErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterCatalogResource created on azure + // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterCatalogResourceId = DevCenterCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, catalogName); + DevCenterCatalogResource devCenterCatalog = client.GetDevCenterCatalogResource(devCenterCatalogResourceId); + + // invoke the operation + CatalogSyncErrorDetails result = await devCenterCatalog.GetSyncErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Sync_CatalogsSync() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Sync.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Catalogs_Sync.json // this example is just showing the usage of "Catalogs_Sync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +182,7 @@ public async Task Sync_CatalogsSync() // this example assumes you already have this DevCenterCatalogResource created on azure // for more information of creating DevCenterCatalogResource, please refer to the document of DevCenterCatalogResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string catalogName = "CentralCatalog"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCollection.cs index 274007760291..7f1d1f348e58 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -21,7 +22,7 @@ public partial class Sample_DevCenterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DevCentersCreate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Create.json // this example is just showing the usage of "DevCenters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +32,7 @@ public async Task CreateOrUpdate_DevCentersCreate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -43,6 +44,117 @@ public async Task CreateOrUpdate_DevCentersCreate() string devCenterName = "Contoso"; DevCenterData data = new DevCenterData(new AzureLocation("centralus")) { + DisplayName = "ContosoDevCenter", + CatalogItemSyncEnableStatus = CatalogItemSyncEnableStatus.Enabled, + DevBoxProvisioningInstallAzureMonitorAgentEnableStatus = InstallAzureMonitorAgentEnableStatus.Enabled, + Tags = +{ +["CostCode"] = "12345" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, devCenterName, data); + DevCenterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DevCentersCreateWithDisabledManagedNetworks() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_CreateWithDisabledManagedNetworks.json + // this example is just showing the usage of "DevCenters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DevCenterResource + DevCenterCollection collection = resourceGroupResource.GetDevCenters(); + + // invoke the operation + string devCenterName = "Contoso"; + DevCenterData data = new DevCenterData(new AzureLocation("centralus")) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")] = new UserAssignedIdentity() +}, + }, + DisplayName = "ContosoDevCenter", + MicrosoftHostedNetworkEnableStatus = MicrosoftHostedNetworkEnableStatus.Disabled, + Tags = +{ +["CostCode"] = "12345" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, devCenterName, data); + DevCenterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DevCentersCreateWithEncryption() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_CreateWithEncryption.json + // this example is just showing the usage of "DevCenters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DevCenterResource + DevCenterCollection collection = resourceGroupResource.GetDevCenters(); + + // invoke the operation + string devCenterName = "Contoso"; + DevCenterData data = new DevCenterData(new AzureLocation("centralus")) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")] = new UserAssignedIdentity() +}, + }, + CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption + { + KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity + { + IdentityType = IdentityType.UserAssignedIdentity, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1"), + }, + KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"), + }, + DisplayName = "ContosoDevCenter", Tags = { ["CostCode"] = "12345" @@ -62,7 +174,7 @@ public async Task CreateOrUpdate_DevCentersCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DevCentersCreateWithUserIdentity() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_CreateWithUserIdentity.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_CreateWithUserIdentity.json // this example is just showing the usage of "DevCenters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +184,7 @@ public async Task CreateOrUpdate_DevCentersCreateWithUserIdentity() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -91,6 +203,7 @@ public async Task CreateOrUpdate_DevCentersCreateWithUserIdentity() [new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")] = new UserAssignedIdentity() }, }, + DisplayName = "ContosoDevCenter", Tags = { ["CostCode"] = "12345" @@ -110,7 +223,7 @@ public async Task CreateOrUpdate_DevCentersCreateWithUserIdentity() [Ignore("Only validating compilation of examples")] public async Task Get_DevCentersGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Get.json // this example is just showing the usage of "DevCenters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +233,7 @@ public async Task Get_DevCentersGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -143,7 +256,7 @@ public async Task Get_DevCentersGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DevCentersListByResourceGroup() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListByResourceGroup.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_ListByResourceGroup.json // this example is just showing the usage of "DevCenters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +266,7 @@ public async Task GetAll_DevCentersListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -178,7 +291,7 @@ public async Task GetAll_DevCentersListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_DevCentersGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Get.json // this example is just showing the usage of "DevCenters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +301,7 @@ public async Task Exists_DevCentersGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -207,7 +320,7 @@ public async Task Exists_DevCentersGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DevCentersGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Get.json // this example is just showing the usage of "DevCenters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +330,7 @@ public async Task GetIfExists_DevCentersGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetCollection.cs new file mode 100644 index 000000000000..21bd48ba9f48 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetCollection.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterEncryptionSetCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EncryptionSetsCreate() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Create.json + // this example is just showing the usage of "EncryptionSets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterEncryptionSetResource + DevCenterEncryptionSetCollection collection = devCenter.GetDevCenterEncryptionSets(); + + // invoke the operation + string encryptionSetName = "EncryptionWestUs"; + DevCenterEncryptionSetData data = new DevCenterEncryptionSetData(new AzureLocation("westus")) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")] = new UserAssignedIdentity() +}, + }, + DevboxDisksEncryptionEnableStatus = DevboxDisksEncryptionEnableStatus.Enabled, + KeyEncryptionKeyUri = new Uri("https://contosovaultwestus.vault.azure.net/keys/contosokek"), + KeyEncryptionKeyIdentity = new KeyEncryptionKeyIdentity + { + CmkIdentityType = CmkIdentityType.UserAssigned, + UserAssignedIdentityResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, encryptionSetName, data); + DevCenterEncryptionSetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EncryptionSetsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Get.json + // this example is just showing the usage of "EncryptionSets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterEncryptionSetResource + DevCenterEncryptionSetCollection collection = devCenter.GetDevCenterEncryptionSets(); + + // invoke the operation + string encryptionSetName = "EncryptionWestUs"; + DevCenterEncryptionSetResource result = await collection.GetAsync(encryptionSetName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EncryptionSetsList() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_List.json + // this example is just showing the usage of "EncryptionSets_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterEncryptionSetResource + DevCenterEncryptionSetCollection collection = devCenter.GetDevCenterEncryptionSets(); + + // invoke the operation and iterate over the result + await foreach (DevCenterEncryptionSetResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EncryptionSetsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Get.json + // this example is just showing the usage of "EncryptionSets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterEncryptionSetResource + DevCenterEncryptionSetCollection collection = devCenter.GetDevCenterEncryptionSets(); + + // invoke the operation + string encryptionSetName = "EncryptionWestUs"; + bool result = await collection.ExistsAsync(encryptionSetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EncryptionSetsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Get.json + // this example is just showing the usage of "EncryptionSets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterEncryptionSetResource + DevCenterEncryptionSetCollection collection = devCenter.GetDevCenterEncryptionSets(); + + // invoke the operation + string encryptionSetName = "EncryptionWestUs"; + NullableResponse response = await collection.GetIfExistsAsync(encryptionSetName); + DevCenterEncryptionSetResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetResource.cs new file mode 100644 index 000000000000..af3ea996774f --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEncryptionSetResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterEncryptionSetResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EncryptionSetsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Get.json + // this example is just showing the usage of "EncryptionSets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterEncryptionSetResource created on azure + // for more information of creating DevCenterEncryptionSetResource, please refer to the document of DevCenterEncryptionSetResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string encryptionSetName = "EncryptionWestUs"; + ResourceIdentifier devCenterEncryptionSetResourceId = DevCenterEncryptionSetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + DevCenterEncryptionSetResource devCenterEncryptionSet = client.GetDevCenterEncryptionSetResource(devCenterEncryptionSetResourceId); + + // invoke the operation + DevCenterEncryptionSetResource result = await devCenterEncryptionSet.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_EncryptionSetsDelete() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Delete.json + // this example is just showing the usage of "EncryptionSets_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterEncryptionSetResource created on azure + // for more information of creating DevCenterEncryptionSetResource, please refer to the document of DevCenterEncryptionSetResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string encryptionSetName = "EncryptionWestUs"; + ResourceIdentifier devCenterEncryptionSetResourceId = DevCenterEncryptionSetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + DevCenterEncryptionSetResource devCenterEncryptionSet = client.GetDevCenterEncryptionSetResource(devCenterEncryptionSetResourceId); + + // invoke the operation + await devCenterEncryptionSet.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EncryptionSetsUpdate() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenterEncryptionSets_Patch.json + // this example is just showing the usage of "EncryptionSets_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterEncryptionSetResource created on azure + // for more information of creating DevCenterEncryptionSetResource, please refer to the document of DevCenterEncryptionSetResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string encryptionSetName = "EncryptionWestUs"; + ResourceIdentifier devCenterEncryptionSetResourceId = DevCenterEncryptionSetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, encryptionSetName); + DevCenterEncryptionSetResource devCenterEncryptionSet = client.GetDevCenterEncryptionSetResource(devCenterEncryptionSetResourceId); + + // invoke the operation + DevCenterEncryptionSetPatch patch = new DevCenterEncryptionSetPatch + { + DevboxDisksEncryptionEnableStatus = DevboxDisksEncryptionEnableStatus.Enabled, + }; + ArmOperation lro = await devCenterEncryptionSet.UpdateAsync(WaitUntil.Completed, patch); + DevCenterEncryptionSetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEncryptionSetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeCollection.cs index be71e39061ed..3eaf382b4d9b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DevCenterEnvironmentTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnvironmentTypesCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Put.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Put.json // this example is just showing the usage of "EnvironmentTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_EnvironmentTypesCreateOrUpdate() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -46,6 +46,7 @@ public async Task CreateOrUpdate_EnvironmentTypesCreateOrUpdate() { ["Owner"] = "superuser" }, + DisplayName = "Dev", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentTypeName, data); DevCenterEnvironmentTypeResource result = lro.Value; @@ -61,7 +62,7 @@ public async Task CreateOrUpdate_EnvironmentTypesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_EnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Get.json // this example is just showing the usage of "EnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +72,7 @@ public async Task Get_EnvironmentTypesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -95,7 +96,7 @@ public async Task Get_EnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_EnvironmentTypesListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_List.json // this example is just showing the usage of "EnvironmentTypes_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +106,7 @@ public async Task GetAll_EnvironmentTypesListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -131,7 +132,7 @@ public async Task GetAll_EnvironmentTypesListByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Exists_EnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Get.json // this example is just showing the usage of "EnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +142,7 @@ public async Task Exists_EnvironmentTypesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -161,7 +162,7 @@ public async Task Exists_EnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Get.json // this example is just showing the usage of "EnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +172,7 @@ public async Task GetIfExists_EnvironmentTypesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeResource.cs index e185fe892288..55610726887b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterEnvironmentTypeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterEnvironmentTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_EnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Get.json // this example is just showing the usage of "EnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_EnvironmentTypesGet() // this example assumes you already have this DevCenterEnvironmentTypeResource created on azure // for more information of creating DevCenterEnvironmentTypeResource, please refer to the document of DevCenterEnvironmentTypeResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string environmentTypeName = "DevTest"; @@ -51,7 +51,7 @@ public async Task Get_EnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_EnvironmentTypesDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Delete.json // this example is just showing the usage of "EnvironmentTypes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_EnvironmentTypesDelete() // this example assumes you already have this DevCenterEnvironmentTypeResource created on azure // for more information of creating DevCenterEnvironmentTypeResource, please refer to the document of DevCenterEnvironmentTypeResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string environmentTypeName = "DevTest"; @@ -78,7 +78,7 @@ public async Task Delete_EnvironmentTypesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_EnvironmentTypesUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentTypes_Patch.json // this example is just showing the usage of "EnvironmentTypes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_EnvironmentTypesUpdate() // this example assumes you already have this DevCenterEnvironmentTypeResource created on azure // for more information of creating DevCenterEnvironmentTypeResource, please refer to the document of DevCenterEnvironmentTypeResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string environmentTypeName = "DevTest"; @@ -102,6 +102,7 @@ public async Task Update_EnvironmentTypesUpdate() { ["Owner"] = "superuser" }, + DisplayName = "Dev", }; DevCenterEnvironmentTypeResource result = await devCenterEnvironmentType.UpdateAsync(patch); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryCollection.cs index 3185177ea480..94d28d3a7a3a 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DevCenterGalleryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_GalleriesCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Create.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task CreateOrUpdate_GalleriesCreateOrUpdate() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_GalleriesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_GalleriesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task Get_GalleriesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -92,7 +92,7 @@ public async Task Get_GalleriesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_GalleriesListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_List.json // this example is just showing the usage of "Galleries_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task GetAll_GalleriesListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -128,7 +128,7 @@ public async Task GetAll_GalleriesListByDevCenter() [Ignore("Only validating compilation of examples")] public async Task Exists_GalleriesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Exists_GalleriesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -158,7 +158,7 @@ public async Task Exists_GalleriesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GalleriesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task GetIfExists_GalleriesGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryResource.cs index 8d9a1b2a2ccf..fe5e8a2476a5 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterGalleryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DevCenterGalleryResource [Ignore("Only validating compilation of examples")] public async Task Get_GalleriesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GalleriesGet() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "StandardGallery"; @@ -50,7 +50,7 @@ public async Task Get_GalleriesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_GalleriesDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Delete.json // this example is just showing the usage of "Galleries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_GalleriesDelete() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "StandardGallery"; @@ -77,7 +77,7 @@ public async Task Delete_GalleriesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_GalleriesCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Create.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Galleries_Create.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_GalleriesCreateOrUpdate() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "StandardGallery"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageCollection.cs index 6043b45bf913..feca6f5c0401 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DevCenterImageCollection [Ignore("Only validating compilation of examples")] public async Task Get_ImagesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_Get.json // this example is just showing the usage of "Images_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_ImagesGet() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; @@ -54,7 +54,7 @@ public async Task Get_ImagesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ImagesListByGallery() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByGallery.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_ListByGallery.json // this example is just showing the usage of "Images_ListByGallery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task GetAll_ImagesListByGallery() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DevGallery"; @@ -91,7 +91,7 @@ public async Task GetAll_ImagesListByGallery() [Ignore("Only validating compilation of examples")] public async Task Exists_ImagesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_Get.json // this example is just showing the usage of "Images_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Exists_ImagesGet() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; @@ -122,7 +122,7 @@ public async Task Exists_ImagesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ImagesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_Get.json // this example is just showing the usage of "Images_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_ImagesGet() // this example assumes you already have this DevCenterGalleryResource created on azure // for more information of creating DevCenterGalleryResource, please refer to the document of DevCenterGalleryResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageResource.cs index 392ec490026e..c9dfed097896 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterImageResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DevCenterImageResource [Ignore("Only validating compilation of examples")] public async Task Get_ImagesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_Get.json // this example is just showing the usage of "Images_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_ImagesGet() // this example assumes you already have this DevCenterImageResource created on azure // for more information of creating DevCenterImageResource, please refer to the document of DevCenterImageResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionCollection.cs index fd477c08294a..8a4ff1755271 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DevCenterNetworkConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NetworkConnectionsCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Put.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Put.json // this example is just showing the usage of "NetworkConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task CreateOrUpdate_NetworkConnectionsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_NetworkConnectionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_NetworkConnectionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Get.json // this example is just showing the usage of "NetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_NetworkConnectionsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -97,7 +97,7 @@ public async Task Get_NetworkConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NetworkConnectionsListByResourceGroup() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListByResourceGroup.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_ListByResourceGroup.json // this example is just showing the usage of "NetworkConnections_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task GetAll_NetworkConnectionsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -132,7 +132,7 @@ public async Task GetAll_NetworkConnectionsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkConnectionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Get.json // this example is just showing the usage of "NetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Exists_NetworkConnectionsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -161,7 +161,7 @@ public async Task Exists_NetworkConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkConnectionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Get.json // this example is just showing the usage of "NetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetIfExists_NetworkConnectionsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionResource.cs index 93465510f04b..64b3fe1f1f7a 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterNetworkConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterNetworkConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkConnectionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Get.json // this example is just showing the usage of "NetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_NetworkConnectionsGet() // this example assumes you already have this DevCenterNetworkConnectionResource created on azure // for more information of creating DevCenterNetworkConnectionResource, please refer to the document of DevCenterNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "uswest3network"; ResourceIdentifier devCenterNetworkConnectionResourceId = DevCenterNetworkConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); @@ -50,7 +50,7 @@ public async Task Get_NetworkConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NetworkConnectionsDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Delete.json // this example is just showing the usage of "NetworkConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_NetworkConnectionsDelete() // this example assumes you already have this DevCenterNetworkConnectionResource created on azure // for more information of creating DevCenterNetworkConnectionResource, please refer to the document of DevCenterNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "eastusnetwork"; ResourceIdentifier devCenterNetworkConnectionResourceId = DevCenterNetworkConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); @@ -76,7 +76,7 @@ public async Task Delete_NetworkConnectionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NetworkConnectionsUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_Patch.json // this example is just showing the usage of "NetworkConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_NetworkConnectionsUpdate() // this example assumes you already have this DevCenterNetworkConnectionResource created on azure // for more information of creating DevCenterNetworkConnectionResource, please refer to the document of DevCenterNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "uswest3network"; ResourceIdentifier devCenterNetworkConnectionResourceId = DevCenterNetworkConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); @@ -109,10 +109,10 @@ public async Task Update_NetworkConnectionsUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task RunHealthChecks_NetworkConnectionsRunHealthChecks() + public async Task GetOutboundEnvironmentEndpoints_ListOutboundNetworkDependencies() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_RunHealthChecks.json - // this example is just showing the usage of "NetworkConnections_RunHealthChecks" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json + // this example is just showing the usage of "NetworkConnections_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -121,24 +121,27 @@ public async Task RunHealthChecks_NetworkConnectionsRunHealthChecks() // this example assumes you already have this DevCenterNetworkConnectionResource created on azure // for more information of creating DevCenterNetworkConnectionResource, please refer to the document of DevCenterNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "uswest3network"; ResourceIdentifier devCenterNetworkConnectionResourceId = DevCenterNetworkConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); DevCenterNetworkConnectionResource devCenterNetworkConnection = client.GetDevCenterNetworkConnectionResource(devCenterNetworkConnectionResourceId); - // invoke the operation - await devCenterNetworkConnection.RunHealthChecksAsync(WaitUntil.Completed); + // invoke the operation and iterate over the result + await foreach (OutboundEnvironmentEndpoint item in devCenterNetworkConnection.GetOutboundEnvironmentEndpointsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetOutboundEnvironmentEndpoints_ListOutboundNetworkDependencies() + public async Task RunHealthChecks_NetworkConnectionsRunHealthChecks() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json - // this example is just showing the usage of "NetworkConnections_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_RunHealthChecks.json + // this example is just showing the usage of "NetworkConnections_RunHealthChecks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -147,17 +150,14 @@ public async Task GetOutboundEnvironmentEndpoints_ListOutboundNetworkDependencie // this example assumes you already have this DevCenterNetworkConnectionResource created on azure // for more information of creating DevCenterNetworkConnectionResource, please refer to the document of DevCenterNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "uswest3network"; ResourceIdentifier devCenterNetworkConnectionResourceId = DevCenterNetworkConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); DevCenterNetworkConnectionResource devCenterNetworkConnection = client.GetDevCenterNetworkConnectionResource(devCenterNetworkConnectionResourceId); - // invoke the operation and iterate over the result - await foreach (OutboundEnvironmentEndpoint item in devCenterNetworkConnection.GetOutboundEnvironmentEndpointsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await devCenterNetworkConnection.RunHealthChecksAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolCollection.cs index 1e55312bad32..860f1fa73ce2 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Put.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Put.json // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -52,6 +52,144 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() Status = StopOnDisconnectEnableStatus.IsEnabled, GracePeriodMinutes = 60, }, + StopOnNoConnect = new StopOnNoConnectConfiguration + { + Status = StopOnNoConnectEnableStatus.Enabled, + GracePeriodMinutes = 120, + }, + SingleSignOnStatus = PoolUpdateSingleSignOnStatus.Disabled, + DisplayName = "Developer Pool", + VirtualNetworkType = VirtualNetworkType.Unmanaged, + ActiveHoursConfiguration = new ActiveHoursConfiguration + { + KeepAwakeEnableStatus = KeepAwakeEnableStatus.Enabled, + AutoStartEnableStatus = AutoStartEnableStatus.Enabled, + DefaultTimeZone = "America/Los_Angeles", + DefaultStartTimeHour = 9, + DefaultEndTimeHour = 17, + DefaultDaysOfWeek = { Models.DayOfWeek.Monday, Models.DayOfWeek.Tuesday, Models.DayOfWeek.Wednesday, Models.DayOfWeek.Thursday, Models.DayOfWeek.Friday }, + DaysOfWeekLimit = 5, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); + DevCenterPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PoolsCreateOrUpdateWithManagedNetwork() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_PutWithManagedNetwork.json + // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterPoolResource + DevCenterPoolCollection collection = devCenterProject.GetDevCenterPools(); + + // invoke the operation + string poolName = "DevPool"; + DevCenterPoolData data = new DevCenterPoolData(new AzureLocation("centralus")) + { + DevBoxDefinitionName = "WebDevBox", + NetworkConnectionName = "managedNetwork", + LicenseType = DevCenterLicenseType.WindowsClient, + LocalAdministrator = LocalAdminStatus.IsEnabled, + StopOnDisconnect = new StopOnDisconnectConfiguration + { + Status = StopOnDisconnectEnableStatus.IsEnabled, + GracePeriodMinutes = 60, + }, + StopOnNoConnect = new StopOnNoConnectConfiguration + { + Status = StopOnNoConnectEnableStatus.Enabled, + GracePeriodMinutes = 120, + }, + SingleSignOnStatus = PoolUpdateSingleSignOnStatus.Disabled, + DisplayName = "Developer Pool", + VirtualNetworkType = VirtualNetworkType.Managed, + ManagedVirtualNetworkRegions = { "centralus" }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); + DevCenterPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PoolsCreateOrUpdateWithValueDevBoxDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_PutWithValueDevBoxDefinition.json + // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterPoolResource + DevCenterPoolCollection collection = devCenterProject.GetDevCenterPools(); + + // invoke the operation + string poolName = "DevPool"; + DevCenterPoolData data = new DevCenterPoolData(new AzureLocation("centralus")) + { + DevBoxDefinitionType = PoolDevBoxDefinitionType.Value, + DevBoxDefinitionName = "", + DevBoxDefinition = new PoolDevBox + { + ImageReference = new DevCenterImageReference + { + Id = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/projects/DevProject/images/exampleImage/version/1.0.0"), + }, + Sku = new DevCenterSku("Preview"), + }, + NetworkConnectionName = "Network1-westus2", + LicenseType = DevCenterLicenseType.WindowsClient, + LocalAdministrator = LocalAdminStatus.IsEnabled, + StopOnDisconnect = new StopOnDisconnectConfiguration + { + Status = StopOnDisconnectEnableStatus.IsEnabled, + GracePeriodMinutes = 60, + }, + StopOnNoConnect = new StopOnNoConnectConfiguration + { + Status = StopOnNoConnectEnableStatus.Enabled, + GracePeriodMinutes = 120, + }, + SingleSignOnStatus = PoolUpdateSingleSignOnStatus.Disabled, + DisplayName = "Developer Pool", + VirtualNetworkType = VirtualNetworkType.Unmanaged, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); DevCenterPoolResource result = lro.Value; @@ -67,7 +205,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +215,7 @@ public async Task Get_PoolsGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -101,7 +239,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGetUnhealthyStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_GetUnhealthyStatus.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +249,7 @@ public async Task Get_PoolsGetUnhealthyStatus() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -135,7 +273,7 @@ public async Task Get_PoolsGetUnhealthyStatus() [Ignore("Only validating compilation of examples")] public async Task GetAll_PoolsListByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_List.json // this example is just showing the usage of "Pools_ListByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +283,7 @@ public async Task GetAll_PoolsListByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -171,7 +309,7 @@ public async Task GetAll_PoolsListByProject() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +319,7 @@ public async Task Exists_PoolsGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -201,7 +339,7 @@ public async Task Exists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGetUnhealthyStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_GetUnhealthyStatus.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +349,7 @@ public async Task Exists_PoolsGetUnhealthyStatus() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -231,7 +369,7 @@ public async Task Exists_PoolsGetUnhealthyStatus() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,7 +379,7 @@ public async Task GetIfExists_PoolsGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -273,7 +411,7 @@ public async Task GetIfExists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGetUnhealthyStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_GetUnhealthyStatus.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -283,7 +421,7 @@ public async Task GetIfExists_PoolsGetUnhealthyStatus() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolResource.cs index c2484c1b3603..ee2ab817ea98 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_PoolsGet() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "DevPool"; @@ -51,7 +51,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGetUnhealthyStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_GetUnhealthyStatus.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Get_PoolsGetUnhealthyStatus() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "DevPool"; @@ -82,7 +82,7 @@ public async Task Get_PoolsGetUnhealthyStatus() [Ignore("Only validating compilation of examples")] public async Task Delete_PoolsDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Delete.json // this example is just showing the usage of "Pools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Delete_PoolsDelete() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "poolName"; @@ -109,7 +109,7 @@ public async Task Delete_PoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PoolsUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_Patch.json // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Update_PoolsUpdate() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "DevPool"; @@ -145,7 +145,7 @@ public async Task Update_PoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task RunHealthChecks_PoolsRefreshStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_RunHealthChecks.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Pools_RunHealthChecks.json // this example is just showing the usage of "Pools_RunHealthChecks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task RunHealthChecks_PoolsRefreshStatus() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "DevPool"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogCollection.cs new file mode 100644 index 000000000000..13c07f579eef --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogCollection.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProjectCatalogsCreateOrUpdateAdo() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_CreateAdo.json + // this example is just showing the usage of "ProjectCatalogs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation + string catalogName = "CentralCatalog"; + DevCenterCatalogData data = new DevCenterCatalogData + { + AdoGit = new DevCenterGitCatalog + { + Uri = new Uri("https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"), + Branch = "main", + SecretIdentifier = "https://contosokv.vault.azure.net/secrets/CentralRepoPat", + Path = "/templates", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + DevCenterProjectCatalogResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProjectCatalogsCreateOrUpdateGitHub() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_CreateGitHub.json + // this example is just showing the usage of "ProjectCatalogs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation + string catalogName = "CentralCatalog"; + DevCenterCatalogData data = new DevCenterCatalogData + { + GitHub = new DevCenterGitCatalog + { + Uri = new Uri("https://github.com/Contoso/centralrepo-fake.git"), + Branch = "main", + SecretIdentifier = "https://contosokv.vault.azure.net/secrets/CentralRepoPat", + Path = "/templates", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + DevCenterProjectCatalogResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProjectCatalogsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Get.json + // this example is just showing the usage of "ProjectCatalogs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation + string catalogName = "CentralCatalog"; + DevCenterProjectCatalogResource result = await collection.GetAsync(catalogName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ProjectCatalogsList() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_List.json + // this example is just showing the usage of "ProjectCatalogs_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectCatalogResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ProjectCatalogsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Get.json + // this example is just showing the usage of "ProjectCatalogs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation + string catalogName = "CentralCatalog"; + bool result = await collection.ExistsAsync(catalogName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ProjectCatalogsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Get.json + // this example is just showing the usage of "ProjectCatalogs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectCatalogResource + DevCenterProjectCatalogCollection collection = devCenterProject.GetDevCenterProjectCatalogs(); + + // invoke the operation + string catalogName = "CentralCatalog"; + NullableResponse response = await collection.GetIfExistsAsync(catalogName); + DevCenterProjectCatalogResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionCollection.cs new file mode 100644 index 000000000000..8029321c6483 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogEnvironmentDefinitionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EnvironmentDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogEnvironmentDefinitionResource + DevCenterProjectCatalogEnvironmentDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + DevCenterProjectCatalogEnvironmentDefinitionResource result = await collection.GetAsync(environmentDefinitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EnvironmentDefinitionsListByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_ListByProjectCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_ListByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogEnvironmentDefinitionResource + DevCenterProjectCatalogEnvironmentDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogEnvironmentDefinitions(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectCatalogEnvironmentDefinitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EnvironmentDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogEnvironmentDefinitionResource + DevCenterProjectCatalogEnvironmentDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + bool result = await collection.ExistsAsync(environmentDefinitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EnvironmentDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogEnvironmentDefinitionResource + DevCenterProjectCatalogEnvironmentDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogEnvironmentDefinitions(); + + // invoke the operation + string environmentDefinitionName = "myEnvironmentDefinition"; + NullableResponse response = await collection.GetIfExistsAsync(environmentDefinitionName); + DevCenterProjectCatalogEnvironmentDefinitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionResource.cs new file mode 100644 index 000000000000..b49a1b69b68c --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogEnvironmentDefinitionResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogEnvironmentDefinitionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EnvironmentDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/EnvironmentDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "EnvironmentDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogEnvironmentDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogEnvironmentDefinitionResource, please refer to the document of DevCenterProjectCatalogEnvironmentDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + string environmentDefinitionName = "myEnvironmentDefinition"; + ResourceIdentifier devCenterProjectCatalogEnvironmentDefinitionResourceId = DevCenterProjectCatalogEnvironmentDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + DevCenterProjectCatalogEnvironmentDefinitionResource devCenterProjectCatalogEnvironmentDefinition = client.GetDevCenterProjectCatalogEnvironmentDefinitionResource(devCenterProjectCatalogEnvironmentDefinitionResourceId); + + // invoke the operation + DevCenterProjectCatalogEnvironmentDefinitionResource result = await devCenterProjectCatalogEnvironmentDefinition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterEnvironmentDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetErrorDetailsProjectCatalogEnvironmentDefinition_ProjectCatalogEnvironmentDefinitionsGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogEnvironmentDefinitions_GetErrorDetails.json + // this example is just showing the usage of "ProjectCatalogEnvironmentDefinitions_GetErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogEnvironmentDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogEnvironmentDefinitionResource, please refer to the document of DevCenterProjectCatalogEnvironmentDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "myCatalog"; + string environmentDefinitionName = "myEnvironmentDefinition"; + ResourceIdentifier devCenterProjectCatalogEnvironmentDefinitionResourceId = DevCenterProjectCatalogEnvironmentDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, environmentDefinitionName); + DevCenterProjectCatalogEnvironmentDefinitionResource devCenterProjectCatalogEnvironmentDefinition = client.GetDevCenterProjectCatalogEnvironmentDefinitionResource(devCenterProjectCatalogEnvironmentDefinitionResourceId); + + // invoke the operation + CatalogResourceValidationErrorDetails result = await devCenterProjectCatalogEnvironmentDefinition.GetErrorDetailsProjectCatalogEnvironmentDefinitionAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildCollection.cs new file mode 100644 index 000000000000..326da5c2ec25 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogImageDefinitionBuildCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionBuildResource + DevCenterProjectCatalogImageDefinitionBuildCollection collection = devCenterProjectCatalogImageDefinition.GetDevCenterProjectCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + DevCenterProjectCatalogImageDefinitionBuildResource result = await collection.GetAsync(buildName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImageDefinitionBuildsListByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_ListImageBuildsByImageDefinition.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_ListByImageDefinition" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionBuildResource + DevCenterProjectCatalogImageDefinitionBuildCollection collection = devCenterProjectCatalogImageDefinition.GetDevCenterProjectCatalogImageDefinitionBuilds(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectCatalogImageDefinitionBuildResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionBuildResource + DevCenterProjectCatalogImageDefinitionBuildCollection collection = devCenterProjectCatalogImageDefinition.GetDevCenterProjectCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + bool result = await collection.ExistsAsync(buildName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionBuildResource + DevCenterProjectCatalogImageDefinitionBuildCollection collection = devCenterProjectCatalogImageDefinition.GetDevCenterProjectCatalogImageDefinitionBuilds(); + + // invoke the operation + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + NullableResponse response = await collection.GetIfExistsAsync(buildName); + DevCenterProjectCatalogImageDefinitionBuildResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildResource.cs new file mode 100644 index 000000000000..a9b24a01eb06 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionBuildResource.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogImageDefinitionBuildResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionBuildsGetByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetImageBuild.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionBuildResource, please refer to the document of DevCenterProjectCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionBuildResourceId = DevCenterProjectCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + DevCenterProjectCatalogImageDefinitionBuildResource devCenterProjectCatalogImageDefinitionBuild = client.GetDevCenterProjectCatalogImageDefinitionBuildResource(devCenterProjectCatalogImageDefinitionBuildResourceId); + + // invoke the operation + DevCenterProjectCatalogImageDefinitionBuildResource result = await devCenterProjectCatalogImageDefinitionBuild.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionBuildData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Cancel_ImageDefinitionBuildsCancelByImageDefinition() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_CancelImageBuild.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_Cancel" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionBuildResource, please refer to the document of DevCenterProjectCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionBuildResourceId = DevCenterProjectCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + DevCenterProjectCatalogImageDefinitionBuildResource devCenterProjectCatalogImageDefinitionBuild = client.GetDevCenterProjectCatalogImageDefinitionBuildResource(devCenterProjectCatalogImageDefinitionBuildResourceId); + + // invoke the operation + await devCenterProjectCatalogImageDefinitionBuild.CancelAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBuildDetails_ProjectCatalogImageDefinitionBuildGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetImageBuildDetails.json + // this example is just showing the usage of "ProjectCatalogImageDefinitionBuild_GetBuildDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionBuildResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionBuildResource, please refer to the document of DevCenterProjectCatalogImageDefinitionBuildResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + string buildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionBuildResourceId = DevCenterProjectCatalogImageDefinitionBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName, buildName); + DevCenterProjectCatalogImageDefinitionBuildResource devCenterProjectCatalogImageDefinitionBuild = client.GetDevCenterProjectCatalogImageDefinitionBuildResource(devCenterProjectCatalogImageDefinitionBuildResourceId); + + // invoke the operation + ImageDefinitionBuildDetails result = await devCenterProjectCatalogImageDefinitionBuild.GetBuildDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionCollection.cs new file mode 100644 index 000000000000..fc62a39bf045 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogImageDefinitionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "ContosoProject"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionResource + DevCenterProjectCatalogImageDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + DevCenterProjectCatalogImageDefinitionResource result = await collection.GetAsync(imageDefinitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImageDefinitionsListByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_ListByProjectCatalog.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_ListByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "ContosoProject"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionResource + DevCenterProjectCatalogImageDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogImageDefinitions(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectCatalogImageDefinitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImageDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "ContosoProject"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionResource + DevCenterProjectCatalogImageDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + bool result = await collection.ExistsAsync(imageDefinitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImageDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "ContosoProject"; + string catalogName = "TeamCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // get the collection of this DevCenterProjectCatalogImageDefinitionResource + DevCenterProjectCatalogImageDefinitionCollection collection = devCenterProjectCatalog.GetDevCenterProjectCatalogImageDefinitions(); + + // invoke the operation + string imageDefinitionName = "WebDevBox"; + NullableResponse response = await collection.GetIfExistsAsync(imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionResource.cs new file mode 100644 index 000000000000..3c34424ab406 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogImageDefinitionResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogImageDefinitionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageDefinitionsGetByProjectCatalog() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_GetByProjectCatalog.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_GetByProjectCatalog" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "ContosoProject"; + string catalogName = "TeamCatalog"; + string imageDefinitionName = "WebDevBox"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // invoke the operation + DevCenterProjectCatalogImageDefinitionResource result = await devCenterProjectCatalogImageDefinition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task BuildImage_ProjectCatalogImageDefinitionsBuildImage() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageDefinitions_BuildImage.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_BuildImage" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + string imageDefinitionName = "DefaultDevImage"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // invoke the operation + await devCenterProjectCatalogImageDefinition.BuildImageAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetErrorDetails_ProjectCatalogImageDefinitionsGetErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogImageDefinitions_GetErrorDetails.json + // this example is just showing the usage of "ProjectCatalogImageDefinitions_GetErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogImageDefinitionResource created on azure + // for more information of creating DevCenterProjectCatalogImageDefinitionResource, please refer to the document of DevCenterProjectCatalogImageDefinitionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "TeamCatalog"; + string imageDefinitionName = "WebDevBox"; + ResourceIdentifier devCenterProjectCatalogImageDefinitionResourceId = DevCenterProjectCatalogImageDefinitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName, imageDefinitionName); + DevCenterProjectCatalogImageDefinitionResource devCenterProjectCatalogImageDefinition = client.GetDevCenterProjectCatalogImageDefinitionResource(devCenterProjectCatalogImageDefinitionResourceId); + + // invoke the operation + CatalogResourceValidationErrorDetails result = await devCenterProjectCatalogImageDefinition.GetErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogResource.cs new file mode 100644 index 000000000000..a02f65cc1711 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCatalogResource.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectCatalogResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProjectCatalogsGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Get.json + // this example is just showing the usage of "ProjectCatalogs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + DevCenterProjectCatalogResource result = await devCenterProjectCatalog.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ProjectCatalogsDelete() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Delete.json + // this example is just showing the usage of "ProjectCatalogs_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + await devCenterProjectCatalog.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ProjectCatalogsPatch() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Patch.json + // this example is just showing the usage of "ProjectCatalogs_Patch" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + DevCenterCatalogPatch patch = new DevCenterCatalogPatch + { + GitHub = new DevCenterGitCatalog + { + Path = "/environments", + }, + }; + ArmOperation lro = await devCenterProjectCatalog.UpdateAsync(WaitUntil.Completed, patch); + DevCenterProjectCatalogResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Connect_ProjectCatalogsConnect() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Connect.json + // this example is just showing the usage of "ProjectCatalogs_Connect" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + await devCenterProjectCatalog.ConnectAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSyncErrorDetails_ProjectCatalogsGetSyncErrorDetails() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_GetSyncErrorDetails.json + // this example is just showing the usage of "ProjectCatalogs_GetSyncErrorDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + CatalogSyncErrorDetails result = await devCenterProjectCatalog.GetSyncErrorDetailsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Sync_ProjectCatalogsSync() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectCatalogs_Sync.json + // this example is just showing the usage of "ProjectCatalogs_Sync" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectCatalogResource created on azure + // for more information of creating DevCenterProjectCatalogResource, please refer to the document of DevCenterProjectCatalogResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "DevProject"; + string catalogName = "CentralCatalog"; + ResourceIdentifier devCenterProjectCatalogResourceId = DevCenterProjectCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, catalogName); + DevCenterProjectCatalogResource devCenterProjectCatalog = client.GetDevCenterProjectCatalogResource(devCenterProjectCatalogResourceId); + + // invoke the operation + await devCenterProjectCatalog.SyncAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCollection.cs index 3d1c3b1702b7..ac5c857f0d49 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectCollection.cs @@ -9,6 +9,8 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -20,7 +22,7 @@ public partial class Sample_DevCenterProjectCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProjectsCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Put.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Put.json // this example is just showing the usage of "Projects_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +32,7 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdate() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -44,6 +46,116 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdate() { DevCenterId = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"), Description = "This is my first project.", + DisplayName = "Dev", + Tags = +{ +["CostCenter"] = "R&D" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectName, data); + DevCenterProjectResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProjectsCreateOrUpdateWithCustomizationSettings() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_PutWithCustomizationSettings.json + // this example is just showing the usage of "Projects_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DevCenterProjectResource + DevCenterProjectCollection collection = resourceGroupResource.GetDevCenterProjects(); + + // invoke the operation + string projectName = "DevProject"; + DevCenterProjectData data = new DevCenterProjectData(new AzureLocation("centralus")) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")] = new UserAssignedIdentity() +}, + }, + DevCenterId = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"), + Description = "This is my first project.", + CustomizationSettings = new ProjectCustomizationSettings + { + Identities = {new ProjectCustomizationManagedIdentity +{ +IdentityType = ProjectCustomizationIdentityType.UserAssignedIdentity, +IdentityResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1"), +}}, + }, + Tags = +{ +["CostCenter"] = "R&D" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectName, data); + DevCenterProjectResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterProjectData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProjectsCreateOrUpdateWithCustomizationSettingsSystemIdentity() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_PutWithCustomizationSettings_SystemIdentity.json + // this example is just showing the usage of "Projects_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DevCenterProjectResource + DevCenterProjectCollection collection = resourceGroupResource.GetDevCenterProjects(); + + // invoke the operation + string projectName = "DevProject"; + DevCenterProjectData data = new DevCenterProjectData(new AzureLocation("centralus")) + { + Identity = new ManagedServiceIdentity("SystemAssigned"), + DevCenterId = new ResourceIdentifier("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"), + Description = "This is my first project.", + CustomizationSettings = new ProjectCustomizationSettings + { + Identities = {new ProjectCustomizationManagedIdentity +{ +IdentityType = ProjectCustomizationIdentityType.SystemAssignedIdentity, +}}, + }, Tags = { ["CostCenter"] = "R&D" @@ -63,7 +175,7 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProjectsCreateOrUpdateWithLimitsPerDev() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_PutWithMaxDevBoxPerUser.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json // this example is just showing the usage of "Projects_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +185,7 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdateWithLimitsPerDev() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -107,7 +219,7 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdateWithLimitsPerDev() [Ignore("Only validating compilation of examples")] public async Task Get_ProjectsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Get.json // this example is just showing the usage of "Projects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +229,7 @@ public async Task Get_ProjectsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -140,7 +252,7 @@ public async Task Get_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProjectsListByResourceGroup() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByResourceGroup.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_ListByResourceGroup.json // this example is just showing the usage of "Projects_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +262,7 @@ public async Task GetAll_ProjectsListByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -175,7 +287,7 @@ public async Task GetAll_ProjectsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_ProjectsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Get.json // this example is just showing the usage of "Projects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +297,7 @@ public async Task Exists_ProjectsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -204,7 +316,7 @@ public async Task Exists_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProjectsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Get.json // this example is just showing the usage of "Projects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +326,7 @@ public async Task GetIfExists_ProjectsGet() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentCollection.cs index 53fdb78804c4..cd1f7eace927 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DevCenterProjectEnvironmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProjectEnvironmentTypesCreateOrUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Put.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Put.json // this example is just showing the usage of "ProjectEnvironmentTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task CreateOrUpdate_ProjectEnvironmentTypesCreateOrUpdate() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_ProjectEnvironmentTypesCreateOrUpdate() // invoke the operation string environmentTypeName = "DevTest"; - DevCenterProjectEnvironmentData data = new DevCenterProjectEnvironmentData(default) + DevCenterProjectEnvironmentData data = new DevCenterProjectEnvironmentData(new AzureLocation("centralus")) { Identity = new ManagedServiceIdentity("UserAssigned") { @@ -86,7 +86,7 @@ public async Task CreateOrUpdate_ProjectEnvironmentTypesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ProjectEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_ProjectEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -120,7 +120,7 @@ public async Task Get_ProjectEnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProjectEnvironmentTypesList() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_List.json // this example is just showing the usage of "ProjectEnvironmentTypes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetAll_ProjectEnvironmentTypesList() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -156,7 +156,7 @@ public async Task GetAll_ProjectEnvironmentTypesList() [Ignore("Only validating compilation of examples")] public async Task Exists_ProjectEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task Exists_ProjectEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -186,7 +186,7 @@ public async Task Exists_ProjectEnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProjectEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -196,7 +196,7 @@ public async Task GetIfExists_ProjectEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentResource.cs index da883549b182..1a2a6eb50c30 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectEnvironmentResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DevCenterProjectEnvironmentResource [Ignore("Only validating compilation of examples")] public async Task Get_ProjectEnvironmentTypesGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Get.json // this example is just showing the usage of "ProjectEnvironmentTypes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_ProjectEnvironmentTypesGet() // this example assumes you already have this DevCenterProjectEnvironmentResource created on azure // for more information of creating DevCenterProjectEnvironmentResource, please refer to the document of DevCenterProjectEnvironmentResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; string environmentTypeName = "DevTest"; @@ -52,7 +52,7 @@ public async Task Get_ProjectEnvironmentTypesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProjectEnvironmentTypesDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Delete.json // this example is just showing the usage of "ProjectEnvironmentTypes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Delete_ProjectEnvironmentTypesDelete() // this example assumes you already have this DevCenterProjectEnvironmentResource created on azure // for more information of creating DevCenterProjectEnvironmentResource, please refer to the document of DevCenterProjectEnvironmentResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; string environmentTypeName = "DevTest"; @@ -79,7 +79,7 @@ public async Task Delete_ProjectEnvironmentTypesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ProjectEnvironmentTypesUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectEnvironmentTypes_Patch.json // this example is just showing the usage of "ProjectEnvironmentTypes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Update_ProjectEnvironmentTypesUpdate() // this example assumes you already have this DevCenterProjectEnvironmentResource created on azure // for more information of creating DevCenterProjectEnvironmentResource, please refer to the document of DevCenterProjectEnvironmentResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProj"; string environmentTypeName = "DevTest"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageCollection.cs new file mode 100644 index 000000000000..a85fc3a1394b --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectImageCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImagesGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_GetByProject.json + // this example is just showing the usage of "Images_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectImageResource + DevCenterProjectImageCollection collection = devCenterProject.GetDevCenterProjectImages(); + + // invoke the operation + string imageName = "~gallery~DefaultDevGallery~ContosoBaseImage"; + DevCenterProjectImageResource result = await collection.GetAsync(imageName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImagesListByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_ListByProject.json + // this example is just showing the usage of "Images_ListByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectImageResource + DevCenterProjectImageCollection collection = devCenterProject.GetDevCenterProjectImages(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectImageResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImagesGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_GetByProject.json + // this example is just showing the usage of "Images_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectImageResource + DevCenterProjectImageCollection collection = devCenterProject.GetDevCenterProjectImages(); + + // invoke the operation + string imageName = "~gallery~DefaultDevGallery~ContosoBaseImage"; + bool result = await collection.ExistsAsync(imageName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImagesGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_GetByProject.json + // this example is just showing the usage of "Images_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // get the collection of this DevCenterProjectImageResource + DevCenterProjectImageCollection collection = devCenterProject.GetDevCenterProjectImages(); + + // invoke the operation + string imageName = "~gallery~DefaultDevGallery~ContosoBaseImage"; + NullableResponse response = await collection.GetIfExistsAsync(imageName); + DevCenterProjectImageResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageResource.cs new file mode 100644 index 000000000000..63e0f1b5aa61 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectImageResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImagesGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_GetByProject.json + // this example is just showing the usage of "Images_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageResource created on azure + // for more information of creating DevCenterProjectImageResource, please refer to the document of DevCenterProjectImageResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoBaseImage"; + ResourceIdentifier devCenterProjectImageResourceId = DevCenterProjectImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName); + DevCenterProjectImageResource devCenterProjectImage = client.GetDevCenterProjectImageResource(devCenterProjectImageResourceId); + + // invoke the operation + DevCenterProjectImageResource result = await devCenterProjectImage.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterImageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionCollection.cs new file mode 100644 index 000000000000..69bbc02ca0de --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectImageVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageVersionsGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_GetByProject.json + // this example is just showing the usage of "ImageVersions_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageResource created on azure + // for more information of creating DevCenterProjectImageResource, please refer to the document of DevCenterProjectImageResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoImageDefinition"; + ResourceIdentifier devCenterProjectImageResourceId = DevCenterProjectImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName); + DevCenterProjectImageResource devCenterProjectImage = client.GetDevCenterProjectImageResource(devCenterProjectImageResourceId); + + // get the collection of this DevCenterProjectImageVersionResource + DevCenterProjectImageVersionCollection collection = devCenterProjectImage.GetDevCenterProjectImageVersions(); + + // invoke the operation + string versionName = "1.0.0"; + DevCenterProjectImageVersionResource result = await collection.GetAsync(versionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImageVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ImageVersionsListByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_ListByProject.json + // this example is just showing the usage of "ImageVersions_ListByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageResource created on azure + // for more information of creating DevCenterProjectImageResource, please refer to the document of DevCenterProjectImageResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoImageDefinition"; + ResourceIdentifier devCenterProjectImageResourceId = DevCenterProjectImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName); + DevCenterProjectImageResource devCenterProjectImage = client.GetDevCenterProjectImageResource(devCenterProjectImageResourceId); + + // get the collection of this DevCenterProjectImageVersionResource + DevCenterProjectImageVersionCollection collection = devCenterProjectImage.GetDevCenterProjectImageVersions(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectImageVersionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImageVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ImageVersionsGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_GetByProject.json + // this example is just showing the usage of "ImageVersions_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageResource created on azure + // for more information of creating DevCenterProjectImageResource, please refer to the document of DevCenterProjectImageResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoImageDefinition"; + ResourceIdentifier devCenterProjectImageResourceId = DevCenterProjectImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName); + DevCenterProjectImageResource devCenterProjectImage = client.GetDevCenterProjectImageResource(devCenterProjectImageResourceId); + + // get the collection of this DevCenterProjectImageVersionResource + DevCenterProjectImageVersionCollection collection = devCenterProjectImage.GetDevCenterProjectImageVersions(); + + // invoke the operation + string versionName = "1.0.0"; + bool result = await collection.ExistsAsync(versionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImageVersionsGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_GetByProject.json + // this example is just showing the usage of "ImageVersions_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageResource created on azure + // for more information of creating DevCenterProjectImageResource, please refer to the document of DevCenterProjectImageResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoImageDefinition"; + ResourceIdentifier devCenterProjectImageResourceId = DevCenterProjectImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName); + DevCenterProjectImageResource devCenterProjectImage = client.GetDevCenterProjectImageResource(devCenterProjectImageResourceId); + + // get the collection of this DevCenterProjectImageVersionResource + DevCenterProjectImageVersionCollection collection = devCenterProjectImage.GetDevCenterProjectImageVersions(); + + // invoke the operation + string versionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(versionName); + DevCenterProjectImageVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImageVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionResource.cs new file mode 100644 index 000000000000..404c43451fc5 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectImageVersionResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectImageVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImageVersionsGetByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_GetByProject.json + // this example is just showing the usage of "ImageVersions_GetByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectImageVersionResource created on azure + // for more information of creating DevCenterProjectImageVersionResource, please refer to the document of DevCenterProjectImageVersionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + string imageName = "~gallery~DefaultDevGallery~ContosoImageDefinition"; + string versionName = "1.0.0"; + ResourceIdentifier devCenterProjectImageVersionResourceId = DevCenterProjectImageVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName, imageName, versionName); + DevCenterProjectImageVersionResource devCenterProjectImageVersion = client.GetDevCenterProjectImageVersionResource(devCenterProjectImageVersionResourceId); + + // invoke the operation + DevCenterProjectImageVersionResource result = await devCenterProjectImageVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImageVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyCollection.cs new file mode 100644 index 000000000000..d466256b38b1 --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProjectPoliciesCreateOrUpdate() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Put.json + // this example is just showing the usage of "ProjectPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterProjectPolicyResource + DevCenterProjectPolicyCollection collection = devCenter.GetDevCenterProjectPolicies(); + + // invoke the operation + string projectPolicyName = "DevOnlyResources"; + ProjectPolicyData data = new ProjectPolicyData + { + ResourcePolicies = {new ProjectPolicyUpdateResourcePolicy +{ +Resources = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3", +}}, + Scopes = { "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject" }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectPolicyName, data); + DevCenterProjectPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProjectPoliciesGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Get.json + // this example is just showing the usage of "ProjectPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterProjectPolicyResource + DevCenterProjectPolicyCollection collection = devCenter.GetDevCenterProjectPolicies(); + + // invoke the operation + string projectPolicyName = "DevOnlyResources"; + DevCenterProjectPolicyResource result = await collection.GetAsync(projectPolicyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ProjectPoliciesListByDevCenter() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_ListByDevCenter.json + // this example is just showing the usage of "ProjectPolicies_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterProjectPolicyResource + DevCenterProjectPolicyCollection collection = devCenter.GetDevCenterProjectPolicies(); + + // invoke the operation and iterate over the result + await foreach (DevCenterProjectPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ProjectPoliciesGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Get.json + // this example is just showing the usage of "ProjectPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterProjectPolicyResource + DevCenterProjectPolicyCollection collection = devCenter.GetDevCenterProjectPolicies(); + + // invoke the operation + string projectPolicyName = "DevOnlyResources"; + bool result = await collection.ExistsAsync(projectPolicyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ProjectPoliciesGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Get.json + // this example is just showing the usage of "ProjectPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterResource created on azure + // for more information of creating DevCenterResource, please refer to the document of DevCenterResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); + DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); + + // get the collection of this DevCenterProjectPolicyResource + DevCenterProjectPolicyCollection collection = devCenter.GetDevCenterProjectPolicies(); + + // invoke the operation + string projectPolicyName = "DevOnlyResources"; + NullableResponse response = await collection.GetIfExistsAsync(projectPolicyName); + DevCenterProjectPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyResource.cs new file mode 100644 index 000000000000..2b35ddc6b1bc --- /dev/null +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectPolicyResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DevCenter.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DevCenter.Samples +{ + public partial class Sample_DevCenterProjectPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProjectPoliciesGet() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Get.json + // this example is just showing the usage of "ProjectPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectPolicyResource created on azure + // for more information of creating DevCenterProjectPolicyResource, please refer to the document of DevCenterProjectPolicyResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string projectPolicyName = "DevOnlyResources"; + ResourceIdentifier devCenterProjectPolicyResourceId = DevCenterProjectPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + DevCenterProjectPolicyResource devCenterProjectPolicy = client.GetDevCenterProjectPolicyResource(devCenterProjectPolicyResourceId); + + // invoke the operation + DevCenterProjectPolicyResource result = await devCenterProjectPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ProjectPoliciesDelete() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Delete.json + // this example is just showing the usage of "ProjectPolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectPolicyResource created on azure + // for more information of creating DevCenterProjectPolicyResource, please refer to the document of DevCenterProjectPolicyResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string projectPolicyName = "DevOnlyResources"; + ResourceIdentifier devCenterProjectPolicyResourceId = DevCenterProjectPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + DevCenterProjectPolicyResource devCenterProjectPolicy = client.GetDevCenterProjectPolicyResource(devCenterProjectPolicyResourceId); + + // invoke the operation + await devCenterProjectPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ProjectPoliciesUpdate() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ProjectPolicies_Patch.json + // this example is just showing the usage of "ProjectPolicies_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectPolicyResource created on azure + // for more information of creating DevCenterProjectPolicyResource, please refer to the document of DevCenterProjectPolicyResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff1"; + string resourceGroupName = "rg1"; + string devCenterName = "Contoso"; + string projectPolicyName = "DevOnlyResources"; + ResourceIdentifier devCenterProjectPolicyResourceId = DevCenterProjectPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName, projectPolicyName); + DevCenterProjectPolicyResource devCenterProjectPolicy = client.GetDevCenterProjectPolicyResource(devCenterProjectPolicyResourceId); + + // invoke the operation + DevCenterProjectPolicyPatch patch = new DevCenterProjectPolicyPatch + { + ResourcePolicies = {new ProjectPolicyUpdateResourcePolicy +{ +Resources = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3", +}}, + }; + ArmOperation lro = await devCenterProjectPolicy.UpdateAsync(WaitUntil.Completed, patch); + DevCenterProjectPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProjectPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectResource.cs index 9964aa3894fc..c14a686025b0 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterProjectResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterProjectResource [Ignore("Only validating compilation of examples")] public async Task Get_ProjectsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Get.json // this example is just showing the usage of "Projects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_ProjectsGet() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -50,7 +50,7 @@ public async Task Get_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProjectsDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Delete.json // this example is just showing the usage of "Projects_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_ProjectsDelete() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -76,7 +76,7 @@ public async Task Delete_ProjectsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ProjectsUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_Patch.json // this example is just showing the usage of "Projects_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_ProjectsUpdate() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -96,6 +96,8 @@ public async Task Update_ProjectsUpdate() DevCenterProjectPatch patch = new DevCenterProjectPatch { Description = "This is my first project.", + DisplayName = "Dev", + CatalogItemSyncTypes = { CatalogItemType.EnvironmentDefinition }, Tags = { ["CostCenter"] = "R&D" @@ -110,5 +112,60 @@ public async Task Update_ProjectsUpdate() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetInheritedSettings_ProjectsGetInheritedSettings() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_GetInheritedSettings.json + // this example is just showing the usage of "Projects_GetInheritedSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "Contoso"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // invoke the operation + InheritedSettingsForProject result = await devCenterProject.GetInheritedSettingsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSkus_SkusListByProject() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Skus_ListByProject.json + // this example is just showing the usage of "Skus_ListByProject" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevCenterProjectResource created on azure + // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + string resourceGroupName = "rg1"; + string projectName = "myProject"; + ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); + DevCenterProjectResource devCenterProject = client.GetDevCenterProjectResource(devCenterProjectResourceId); + + // invoke the operation and iterate over the result + await foreach (DevCenterSkuDetails item in devCenterProject.GetSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterResource.cs index 649b4aabd323..0a758b0b89e5 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterResource [Ignore("Only validating compilation of examples")] public async Task Get_DevCentersGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Get.json // this example is just showing the usage of "DevCenters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_DevCentersGet() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -50,7 +50,7 @@ public async Task Get_DevCentersGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DevCentersDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Delete.json // this example is just showing the usage of "DevCenters_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Delete_DevCentersDelete() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -76,7 +76,7 @@ public async Task Delete_DevCentersDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DevCentersUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_Patch.json // this example is just showing the usage of "DevCenters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_DevCentersUpdate() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); @@ -112,9 +112,9 @@ public async Task Update_DevCentersUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetImages_ImagesListByDevCenter() + public async Task GetImagesByDevCenter_ImagesListByDevCenter() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByDevCenter.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Images_ListByDevCenter.json // this example is just showing the usage of "Images_ListByDevCenter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,20 +124,17 @@ public async Task GetImages_ImagesListByDevCenter() // this example assumes you already have this DevCenterResource created on azure // for more information of creating DevCenterResource, please refer to the document of DevCenterResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; ResourceIdentifier devCenterResourceId = DevCenterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, devCenterName); DevCenterResource devCenter = client.GetDevCenterResource(devCenterResourceId); // invoke the operation and iterate over the result - await foreach (DevCenterImageResource item in devCenter.GetImagesAsync()) + await foreach (DevCenterImageData item in devCenter.GetImagesByDevCenterAsync()) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DevCenterImageData resourceData = item.Data; // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded on id: {item.Id}"); } Console.WriteLine("Succeeded"); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleCollection.cs index 75b8419143f8..46ab2c460afe 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterScheduleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SchedulesCreateDailyShutdownPoolSchedule() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json // this example is just showing the usage of "Schedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task CreateOrUpdate_SchedulesCreateDailyShutdownPoolSchedule() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string poolName = "DevPool"; @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_SchedulesCreateDailyShutdownPoolSchedule() [Ignore("Only validating compilation of examples")] public async Task Get_SchedulesGetByPool() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Get_SchedulesGetByPool() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; @@ -99,7 +99,7 @@ public async Task Get_SchedulesGetByPool() [Ignore("Only validating compilation of examples")] public async Task GetAll_SchedulesListByPool() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_ListByPool.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_ListByPool.json // this example is just showing the usage of "Schedules_ListByPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task GetAll_SchedulesListByPool() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; @@ -136,7 +136,7 @@ public async Task GetAll_SchedulesListByPool() [Ignore("Only validating compilation of examples")] public async Task Exists_SchedulesGetByPool() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Exists_SchedulesGetByPool() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; @@ -167,7 +167,7 @@ public async Task Exists_SchedulesGetByPool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SchedulesGetByPool() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task GetIfExists_SchedulesGetByPool() // this example assumes you already have this DevCenterPoolResource created on azure // for more information of creating DevCenterPoolResource, please refer to the document of DevCenterPoolResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleResource.cs index 0510893acc3e..6a5adb86e884 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_DevCenterScheduleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevCenterScheduleResource [Ignore("Only validating compilation of examples")] public async Task Get_SchedulesGetByPool() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_SchedulesGetByPool() // this example assumes you already have this DevCenterScheduleResource created on azure // for more information of creating DevCenterScheduleResource, please refer to the document of DevCenterScheduleResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; @@ -52,7 +52,7 @@ public async Task Get_SchedulesGetByPool() [Ignore("Only validating compilation of examples")] public async Task Delete_SchedulesDelete() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Delete.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Delete.json // this example is just showing the usage of "Schedules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Delete_SchedulesDelete() // this example assumes you already have this DevCenterScheduleResource created on azure // for more information of creating DevCenterScheduleResource, please refer to the document of DevCenterScheduleResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; @@ -80,7 +80,7 @@ public async Task Delete_SchedulesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SchedulesUpdate() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Patch.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Schedules_Patch.json // this example is just showing the usage of "Schedules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_SchedulesUpdate() // this example assumes you already have this DevCenterScheduleResource created on azure // for more information of creating DevCenterScheduleResource, please refer to the document of DevCenterScheduleResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "TestProject"; string poolName = "DevPool"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_HealthCheckStatusDetailResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_HealthCheckStatusDetailResource.cs index 685a872c6e47..c9060d5bb4eb 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_HealthCheckStatusDetailResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_HealthCheckStatusDetailResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HealthCheckStatusDetailResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkConnectionsGetHealthDetails() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_GetHealthDetails.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_GetHealthDetails.json // this example is just showing the usage of "NetworkConnections_GetHealthDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_NetworkConnectionsGetHealthDetails() // this example assumes you already have this HealthCheckStatusDetailResource created on azure // for more information of creating HealthCheckStatusDetailResource, please refer to the document of HealthCheckStatusDetailResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string networkConnectionName = "eastusnetwork"; ResourceIdentifier healthCheckStatusDetailResourceId = HealthCheckStatusDetailResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkConnectionName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionCollection.cs index 337544e40f62..38bfa5beb7b4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ImageVersionCollection [Ignore("Only validating compilation of examples")] public async Task Get_VersionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_Get.json // this example is just showing the usage of "ImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_VersionsGet() // this example assumes you already have this DevCenterImageResource created on azure // for more information of creating DevCenterImageResource, please refer to the document of DevCenterImageResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; @@ -55,7 +55,7 @@ public async Task Get_VersionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ImageVersionsListByImage() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_List.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_List.json // this example is just showing the usage of "ImageVersions_ListByImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task GetAll_ImageVersionsListByImage() // this example assumes you already have this DevCenterImageResource created on azure // for more information of creating DevCenterImageResource, please refer to the document of DevCenterImageResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; @@ -93,7 +93,7 @@ public async Task GetAll_ImageVersionsListByImage() [Ignore("Only validating compilation of examples")] public async Task Exists_VersionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_Get.json // this example is just showing the usage of "ImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +103,7 @@ public async Task Exists_VersionsGet() // this example assumes you already have this DevCenterImageResource created on azure // for more information of creating DevCenterImageResource, please refer to the document of DevCenterImageResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; @@ -125,7 +125,7 @@ public async Task Exists_VersionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VersionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_Get.json // this example is just showing the usage of "ImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task GetIfExists_VersionsGet() // this example assumes you already have this DevCenterImageResource created on azure // for more information of creating DevCenterImageResource, please refer to the document of DevCenterImageResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionResource.cs index bb8cc43abc9b..257607fcccf4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ImageVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ImageVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_VersionsGet() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/ImageVersions_Get.json // this example is just showing the usage of "ImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_VersionsGet() // this example assumes you already have this ImageVersionResource created on azure // for more information of creating ImageVersionResource, please refer to the document of ImageVersionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string devCenterName = "Contoso"; string galleryName = "DefaultDevGallery"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionCollection.cs index bba619146666..b0231598a99c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProjectAttachedNetworkConnectionCollection [Ignore("Only validating compilation of examples")] public async Task Get_AttachedNetworksGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByProject.json // this example is just showing the usage of "AttachedNetworks_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_AttachedNetworksGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -53,7 +53,7 @@ public async Task Get_AttachedNetworksGetByProject() [Ignore("Only validating compilation of examples")] public async Task GetAll_AttachedNetworksListByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_ListByProject.json // this example is just showing the usage of "AttachedNetworks_ListByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_AttachedNetworksListByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -89,7 +89,7 @@ public async Task GetAll_AttachedNetworksListByProject() [Ignore("Only validating compilation of examples")] public async Task Exists_AttachedNetworksGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByProject.json // this example is just showing the usage of "AttachedNetworks_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_AttachedNetworksGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -119,7 +119,7 @@ public async Task Exists_AttachedNetworksGetByProject() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AttachedNetworksGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByProject.json // this example is just showing the usage of "AttachedNetworks_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_AttachedNetworksGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionResource.cs index 3ffbe5108170..e9397000026d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectAttachedNetworkConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ProjectAttachedNetworkConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_AttachedNetworksGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/AttachedNetworks_GetByProject.json // this example is just showing the usage of "AttachedNetworks_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_AttachedNetworksGetByProject() // this example assumes you already have this ProjectAttachedNetworkConnectionResource created on azure // for more information of creating ProjectAttachedNetworkConnectionResource, please refer to the document of ProjectAttachedNetworkConnectionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "DevProject"; string attachedNetworkConnectionName = "network-uswest3"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionCollection.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionCollection.cs index 0a49611c5f08..5ea8a5d6777d 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionCollection.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProjectDevBoxDefinitionCollection [Ignore("Only validating compilation of examples")] public async Task Get_DevBoxDefinitionsGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_GetByProject.json // this example is just showing the usage of "DevBoxDefinitions_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_DevBoxDefinitionsGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -53,7 +53,7 @@ public async Task Get_DevBoxDefinitionsGetByProject() [Ignore("Only validating compilation of examples")] public async Task GetAll_DevBoxDefinitionsListByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_ListByProject.json // this example is just showing the usage of "DevBoxDefinitions_ListByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_DevBoxDefinitionsListByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -89,7 +89,7 @@ public async Task GetAll_DevBoxDefinitionsListByProject() [Ignore("Only validating compilation of examples")] public async Task Exists_DevBoxDefinitionsGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_GetByProject.json // this example is just showing the usage of "DevBoxDefinitions_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_DevBoxDefinitionsGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); @@ -119,7 +119,7 @@ public async Task Exists_DevBoxDefinitionsGetByProject() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DevBoxDefinitionsGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_GetByProject.json // this example is just showing the usage of "DevBoxDefinitions_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_DevBoxDefinitionsGetByProject() // this example assumes you already have this DevCenterProjectResource created on azure // for more information of creating DevCenterProjectResource, please refer to the document of DevCenterProjectResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProject"; ResourceIdentifier devCenterProjectResourceId = DevCenterProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, projectName); diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionResource.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionResource.cs index 9bd42ed20fd2..a3f1b0e7f5e3 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionResource.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_ProjectDevBoxDefinitionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ProjectDevBoxDefinitionResource [Ignore("Only validating compilation of examples")] public async Task Get_DevBoxDefinitionsGetByProject() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevBoxDefinitions_GetByProject.json // this example is just showing the usage of "DevBoxDefinitions_GetByProject" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_DevBoxDefinitionsGetByProject() // this example assumes you already have this ProjectDevBoxDefinitionResource created on azure // for more information of creating ProjectDevBoxDefinitionResource, please refer to the document of ProjectDevBoxDefinitionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; string resourceGroupName = "rg1"; string projectName = "ContosoProject"; string devBoxDefinitionName = "WebDevBox"; diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index c076eb3d0f90..6f07ef3e82dc 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDevCenters_DevCentersListBySubscription() + public async Task CheckDevCenterNameAvailability_NameAvailability() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListBySubscription.json - // this example is just showing the usage of "DevCenters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CheckNameAvailability.json + // this example is just showing the usage of "CheckNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -31,29 +31,87 @@ public async Task GetDevCenters_DevCentersListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (DevCenterResource item in subscriptionResource.GetDevCentersAsync()) + // invoke the operation + DevCenterNameAvailabilityContent content = new DevCenterNameAvailabilityContent { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DevCenterData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + Name = "name1", + ResourceType = new ResourceType("Microsoft.DevCenter/devcenters"), + }; + DevCenterNameAvailabilityResult result = await subscriptionResource.CheckDevCenterNameAvailabilityAsync(content); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDevCenterProjects_ProjectsListBySubscription() + public async Task ExecuteCheckScopedNameAvailability_DevcenterCatalogNameAvailability() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListBySubscription.json - // this example is just showing the usage of "Projects_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CheckScopedNameAvailability_DevCenterCatalog.json + // this example is just showing the usage of "CheckScopedNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + CheckScopedNameAvailabilityContent content = new CheckScopedNameAvailabilityContent + { + Name = "name1", + ResourceType = new ResourceType("Microsoft.DevCenter/devcenters/catalogs"), + Scope = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso", + }; + DevCenterNameAvailabilityResult result = await subscriptionResource.ExecuteCheckScopedNameAvailabilityAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteCheckScopedNameAvailability_ProjectCatalogNameAvailability() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/CheckScopedNameAvailability_ProjectCatalog.json + // this example is just showing the usage of "CheckScopedNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + CheckScopedNameAvailabilityContent content = new CheckScopedNameAvailabilityContent + { + Name = "name1", + ResourceType = new ResourceType("Microsoft.DevCenter/projects/catalogs"), + Scope = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject", + }; + DevCenterNameAvailabilityResult result = await subscriptionResource.ExecuteCheckScopedNameAvailabilityAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDevCenters_DevCentersListBySubscription() + { + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/DevCenters_ListBySubscription.json + // this example is just showing the usage of "DevCenters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -62,16 +120,16 @@ public async Task GetDevCenterProjects_ProjectsListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DevCenterProjectResource item in subscriptionResource.GetDevCenterProjectsAsync()) + await foreach (DevCenterResource item in subscriptionResource.GetDevCentersAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DevCenterProjectData resourceData = item.Data; + DevCenterData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -83,7 +141,7 @@ public async Task GetDevCenterProjects_ProjectsListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetDevCenterOperationStatus_GetOperationStatus() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/OperationStatus_Get.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/OperationStatus_Get.json // this example is just showing the usage of "OperationStatuses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +151,7 @@ public async Task GetDevCenterOperationStatus_GetOperationStatus() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -109,7 +167,7 @@ public async Task GetDevCenterOperationStatus_GetOperationStatus() [Ignore("Only validating compilation of examples")] public async Task GetDevCenterUsagesByLocation_ListUsages() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Usages_ListByLocation.json + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Usages_ListByLocation.json // this example is just showing the usage of "Usages_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +177,7 @@ public async Task GetDevCenterUsagesByLocation_ListUsages() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -135,10 +193,10 @@ public async Task GetDevCenterUsagesByLocation_ListUsages() [Test] [Ignore("Only validating compilation of examples")] - public async Task CheckDevCenterNameAvailability_NameAvailability() + public async Task GetDevCenterNetworkConnections_NetworkConnectionsListBySubscription() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/CheckNameAvailability.json - // this example is just showing the usage of "CheckNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/NetworkConnections_ListBySubscription.json + // this example is just showing the usage of "NetworkConnections_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -147,27 +205,29 @@ public async Task CheckDevCenterNameAvailability_NameAvailability() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation - DevCenterNameAvailabilityContent content = new DevCenterNameAvailabilityContent + // invoke the operation and iterate over the result + await foreach (DevCenterNetworkConnectionResource item in subscriptionResource.GetDevCenterNetworkConnectionsAsync()) { - Name = "name1", - ResourceType = new ResourceType("Microsoft.DevCenter/devcenters"), - }; - DevCenterNameAvailabilityResult result = await subscriptionResource.CheckDevCenterNameAvailabilityAsync(content); + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterNetworkConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDevCenterSkusBySubscription_SkusListBySubscription() + public async Task GetDevCenterProjects_ProjectsListBySubscription() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Skus_ListBySubscription.json - // this example is just showing the usage of "Skus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Projects_ListBySubscription.json + // this example is just showing the usage of "Projects_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -176,14 +236,18 @@ public async Task GetDevCenterSkusBySubscription_SkusListBySubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DevCenterSkuDetails item in subscriptionResource.GetDevCenterSkusBySubscriptionAsync()) + await foreach (DevCenterProjectResource item in subscriptionResource.GetDevCenterProjectsAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevCenterProjectData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -191,10 +255,10 @@ public async Task GetDevCenterSkusBySubscription_SkusListBySubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDevCenterNetworkConnections_NetworkConnectionsListBySubscription() + public async Task GetDevCenterSkusBySubscription_SkusListBySubscription() { - // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListBySubscription.json - // this example is just showing the usage of "NetworkConnections_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/examples/Skus_ListBySubscription.json + // this example is just showing the usage of "Skus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -203,18 +267,14 @@ public async Task GetDevCenterNetworkConnections_NetworkConnectionsListBySubscri // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; + string subscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58fffff"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DevCenterNetworkConnectionResource item in subscriptionResource.GetDevCenterNetworkConnectionsAsync()) + await foreach (DevCenterSkuDetails item in subscriptionResource.GetDevCenterSkusBySubscriptionAsync()) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DevCenterNetworkConnectionData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {item}"); } Console.WriteLine("Succeeded");