From 730b202eb01c409e439781124a3ea21ea39d01a7 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Fri, 25 Oct 2024 07:53:51 +0800 Subject: [PATCH] Enable-WriteCore-for-Azure.Developer.DevCenter (#46779) --- .../Azure.Developer.DevCenter/CHANGELOG.md | 2 + ...zure.Developer.DevCenter.netstandard2.0.cs | 18 +++++ .../Generated/DeploymentEnvironmentsClient.cs | 16 ++--- .../src/Generated/DevBoxesClient.cs | 72 +++++++++---------- .../src/Generated/DevCenterModelFactory.cs | 10 +-- .../Generated/Models/DevBox.Serialization.cs | 11 ++- .../src/Generated/Models/DevBox.cs | 4 +- .../Models/DevBoxAction.Serialization.cs | 11 ++- .../src/Generated/Models/DevBoxAction.cs | 4 +- .../DevBoxActionDelayResult.Serialization.cs | 11 ++- .../DevBoxHardwareProfile.Serialization.cs | 11 ++- .../DevBoxImageReference.Serialization.cs | 11 ++- .../Generated/Models/DevBoxImageReference.cs | 4 +- .../Models/DevBoxNextAction.Serialization.cs | 11 ++- .../src/Generated/Models/DevBoxNextAction.cs | 6 +- .../Models/DevBoxPool.Serialization.cs | 11 ++- .../Models/DevBoxSchedule.Serialization.cs | 11 ++- .../DevBoxStorageProfile.Serialization.cs | 11 ++- .../Models/DevCenterCatalog.Serialization.cs | 11 ++- .../DevCenterEnvironment.Serialization.cs | 11 ++- .../DevCenterEnvironmentType.Serialization.cs | 18 +++-- .../Models/DevCenterEnvironmentType.cs | 7 +- .../Models/DevCenterProject.Serialization.cs | 11 ++- .../EnvironmentDefinition.Serialization.cs | 11 ++- ...onmentDefinitionParameter.Serialization.cs | 11 ++- .../Models/EnvironmentDefinitionParameter.cs | 6 +- .../Generated/Models/OSDisk.Serialization.cs | 11 ++- .../Models/RemoteConnection.Serialization.cs | 11 ++- ...OnDisconnectConfiguration.Serialization.cs | 11 ++- .../Samples_DeploymentEnvironmentsClient.cs | 8 +-- .../Samples/Samples_DevBoxesClient.cs | 8 +-- .../tsp-location.yaml | 2 +- 32 files changed, 259 insertions(+), 113 deletions(-) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md b/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md index 4fbccbd001d53..2c505ef54b6ce 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md +++ b/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs index 8eb054972a638..95e5f86363f71 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs @@ -170,6 +170,7 @@ public DevBox(string name, string poolName) { } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } public System.Guid? UserId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBox 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.Developer.DevCenter.Models.DevBox System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -184,6 +185,7 @@ internal DevBoxAction() { } public Azure.Developer.DevCenter.Models.DevBoxNextAction NextAction { get { throw null; } } public string SourceId { get { throw null; } } public System.DateTimeOffset? SuspendedUntil { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxAction 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.Developer.DevCenter.Models.DevBoxAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -197,6 +199,7 @@ internal DevBoxActionDelayResult() { } public string ActionName { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxActionDelayStatus DelayStatus { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxActionDelayResult 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.Developer.DevCenter.Models.DevBoxActionDelayResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -244,6 +247,7 @@ public DevBoxHardwareProfile() { } public int? MemoryGB { get { throw null; } } public Azure.Developer.DevCenter.Models.SkuName? SkuName { get { throw null; } } public int? VCPUs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxHardwareProfile 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.Developer.DevCenter.Models.DevBoxHardwareProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -258,6 +262,7 @@ public DevBoxImageReference() { } public string OSBuildNumber { get { throw null; } } public System.DateTimeOffset? PublishedDate { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxImageReference 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.Developer.DevCenter.Models.DevBoxImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -268,6 +273,7 @@ public partial class DevBoxNextAction : System.ClientModel.Primitives.IJsonModel { internal DevBoxNextAction() { } public System.DateTimeOffset ScheduledTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxNextAction 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.Developer.DevCenter.Models.DevBoxNextAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -304,6 +310,7 @@ internal DevBoxPool() { } public Azure.Developer.DevCenter.Models.DevBoxOSType? OSType { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxPool 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.Developer.DevCenter.Models.DevBoxPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -346,6 +353,7 @@ internal DevBoxSchedule() { } public Azure.Developer.DevCenter.Models.ScheduleType ScheduleType { get { throw null; } } public string Time { get { throw null; } } public string TimeZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxSchedule 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.Developer.DevCenter.Models.DevBoxSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -356,6 +364,7 @@ public partial class DevBoxStorageProfile : System.ClientModel.Primitives.IJsonM { public DevBoxStorageProfile() { } public Azure.Developer.DevCenter.Models.OSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxStorageProfile 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.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +375,7 @@ public partial class DevCenterCatalog : System.ClientModel.Primitives.IJsonModel { internal DevCenterCatalog() { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterCatalog 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.Developer.DevCenter.Models.DevCenterCatalog System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -384,6 +394,7 @@ public DevCenterEnvironment(string environmentName, string environmentTypeName, public Azure.Developer.DevCenter.Models.EnvironmentProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGroupId { get { throw null; } } public System.Guid? UserId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironment 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.Developer.DevCenter.Models.DevCenterEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -396,6 +407,7 @@ internal DevCenterEnvironmentType() { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } } public string Name { get { throw null; } } public Azure.Developer.DevCenter.Models.EnvironmentTypeStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironmentType 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.Developer.DevCenter.Models.DevCenterEnvironmentType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -429,6 +441,7 @@ internal DevCenterProject() { } public string Description { get { throw null; } } public int? MaxDevBoxesPerUser { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterProject 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.Developer.DevCenter.Models.DevCenterProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -445,6 +458,7 @@ internal EnvironmentDefinition() { } public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } public string ParametersSchema { get { throw null; } } public string TemplatePath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinition 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.Developer.DevCenter.Models.EnvironmentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -462,6 +476,7 @@ internal EnvironmentDefinitionParameter() { } public Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameterType ParameterType { get { throw null; } } public bool? ReadOnly { get { throw null; } } public bool Required { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameter 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.Developer.DevCenter.Models.EnvironmentDefinitionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -578,6 +593,7 @@ public partial class OSDisk : 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.Developer.DevCenter.Models.OSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +647,7 @@ public partial class RemoteConnection : System.ClientModel.Primitives.IJsonModel internal RemoteConnection() { } public System.Uri RdpConnectionUri { get { throw null; } } public System.Uri WebUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.RemoteConnection 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.Developer.DevCenter.Models.RemoteConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -714,6 +731,7 @@ public partial class StopOnDisconnectConfiguration : System.ClientModel.Primitiv internal StopOnDisconnectConfiguration() { } public int? GracePeriodMinutes { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration 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.Developer.DevCenter.Models.StopOnDisconnectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs index cc35748b809f8..c22ac63469a0d 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs @@ -101,7 +101,7 @@ public virtual Response GetEnvironment(string projectName, } /// - /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -145,7 +145,7 @@ public virtual async Task GetEnvironmentAsync(string projectName, stri } /// - /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -223,7 +223,7 @@ public virtual Response GetCatalog(string projectName, string } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -265,7 +265,7 @@ public virtual async Task GetCatalogAsync(string projectName, string c } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -919,7 +919,7 @@ public virtual Pageable GetEnvironmentDefinitionsByCatalog(string pr } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -935,7 +935,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync( } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -965,7 +965,7 @@ public virtual Pageable GetEnvironmentTypes(string pro /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. @@ -996,7 +996,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync(string project /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs index e657c7524da0d..2293aca62b786 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs @@ -97,7 +97,7 @@ public virtual Response GetPool(string projectName, string poolName, } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -139,7 +139,7 @@ public virtual async Task GetPoolAsync(string projectName, string pool } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -345,7 +345,7 @@ public virtual Response GetDevBox(string projectName, string userId, str } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -389,7 +389,7 @@ public virtual async Task GetDevBoxAsync(string projectName, string us } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -471,7 +471,7 @@ public virtual Response GetRemoteConnection(string projectName } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -515,7 +515,7 @@ public virtual async Task GetRemoteConnectionAsync(string projectName, } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -781,7 +781,7 @@ public virtual Response SkipAction(string projectName, string userId, string dev /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -803,7 +803,7 @@ public virtual async Task> DelayActionAsync(string projec /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -839,7 +839,7 @@ public virtual Response DelayAction(string projectName, string use /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -886,7 +886,7 @@ public virtual async Task DelayActionAsync(string projectName, string /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -947,7 +947,7 @@ public virtual Pageable GetPools(string projectName, CancellationTok } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -978,7 +978,7 @@ public virtual AsyncPageable GetPoolsAsync(string projectName, Reque } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -1008,9 +1008,9 @@ public virtual Pageable GetPools(string projectName, RequestContext return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DevBoxesClient.GetPools", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1026,9 +1026,9 @@ public virtual AsyncPageable GetSchedulesAsync(string projectNam return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevBoxSchedule.DeserializeDevBoxSchedule(e), ClientDiagnostics, _pipeline, "DevBoxesClient.GetSchedules", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1045,7 +1045,7 @@ public virtual Pageable GetSchedules(string projectName, string } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1059,8 +1059,8 @@ public virtual Pageable GetSchedules(string projectName, string /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1078,7 +1078,7 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1092,8 +1092,8 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1494,7 +1494,7 @@ public virtual Pageable GetDevBoxActions(string projectName, string /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1515,7 +1515,7 @@ public virtual AsyncPageable DelayAllActionsAsync(strin /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1550,7 +1550,7 @@ public virtual Pageable DelayAllActions(string projectN /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1586,7 +1586,7 @@ public virtual AsyncPageable DelayAllActionsAsync(string projectName /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1615,7 +1615,7 @@ public virtual Pageable DelayAllActions(string projectName, string u /// /// /// 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 DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1657,7 +1657,7 @@ public virtual async Task> CreateDevBoxAsync(WaitUntil wai /// /// /// 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 DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1772,7 +1772,7 @@ public virtual Operation DeleteDevBox(WaitUntil waitUntil, string projectName, s // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1813,7 +1813,7 @@ public virtual async Task StartDevBoxAsync(WaitUntil waitUntil, strin // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1854,7 +1854,7 @@ public virtual Operation StartDevBox(WaitUntil waitUntil, string projectName, st // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1896,7 +1896,7 @@ public virtual async Task StopDevBoxAsync(WaitUntil waitUntil, string // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1938,7 +1938,7 @@ public virtual Operation StopDevBox(WaitUntil waitUntil, string projectName, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// @@ -1979,7 +1979,7 @@ public virtual async Task RestartDevBoxAsync(WaitUntil waitUntil, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs index ea10b8dc12514..31af969b8fd01 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs @@ -85,7 +85,7 @@ public static OSDisk OSDisk(int? diskSizeGB = null) /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// A new instance for mocking. public static DevBoxImageReference DevBoxImageReference(string name = null, string version = null, string operatingSystem = null, string osBuildNumber = null, DateTimeOffset? publishedDate = null) { @@ -156,7 +156,7 @@ public static DevBoxSchedule DevBoxSchedule(string name = null, ScheduleType sch /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// A new instance for mocking. public static DevBox DevBox(string name = null, string projectName = null, string poolName = null, HibernateSupport? hibernateSupport = null, DevBoxProvisioningState? provisioningState = null, string actionState = null, PowerState? powerState = null, Guid? uniqueId = null, ResponseError error = null, AzureLocation? location = null, DevBoxOSType? osType = null, Guid? userId = null, DevBoxHardwareProfile hardwareProfile = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, DateTimeOffset? createdTime = null, LocalAdministratorStatus? localAdministratorStatus = null) @@ -195,7 +195,7 @@ public static RemoteConnection RemoteConnection(Uri webUri = null, Uri rdpConnec /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// A new instance for mocking. public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType actionType = default, string sourceId = null, DateTimeOffset? suspendedUntil = null, DevBoxNextAction nextAction = null) @@ -210,7 +210,7 @@ public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType act } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// A new instance for mocking. public static DevBoxNextAction DevBoxNextAction(DateTimeOffset scheduledTime = default) { @@ -295,7 +295,7 @@ public static EnvironmentDefinition EnvironmentDefinition(string id = null, stri /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs index 066bf0bf65dde..bb4754e3bb6b6 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBox : 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op throw new FormatException($"The model {nameof(DevBox)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -123,7 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op #endif } } - writer.WriteEndObject(); } DevBox IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs index 57e8e92069bbe..06201ba6539ce 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs @@ -71,7 +71,7 @@ public partial class DevBox /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// Keeps track of any properties unknown to the library. internal DevBox(string name, string projectName, string poolName, HibernateSupport? hibernateSupport, DevBoxProvisioningState? provisioningState, string actionState, PowerState? powerState, Guid? uniqueId, ResponseError error, AzureLocation? location, DevBoxOSType? osType, Guid? userId, DevBoxHardwareProfile hardwareProfile, DevBoxStorageProfile storageProfile, DevBoxImageReference imageReference, DateTimeOffset? createdTime, LocalAdministratorStatus? localAdministratorStatus, IDictionary serializedAdditionalRawData) @@ -140,7 +140,7 @@ internal DevBox() public DevBoxStorageProfile StorageProfile { get; } /// Information about the image used for this Dev Box. public DevBoxImageReference ImageReference { get; } - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. public DateTimeOffset? CreatedTime { get; } /// Indicates whether the owner of the Dev Box is a local administrator. public LocalAdministratorStatus? LocalAdministratorStatus { get; set; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs index 4c5195decf762..06721a9074910 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxAction : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DevBoxAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DevBoxAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs index c204cd48b2287..c5f0e218e8029 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs @@ -61,7 +61,7 @@ internal DevBoxAction(DevBoxActionType actionType, string sourceId) /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// Keeps track of any properties unknown to the library. internal DevBoxAction(string name, DevBoxActionType actionType, string sourceId, DateTimeOffset? suspendedUntil, DevBoxNextAction nextAction, IDictionary serializedAdditionalRawData) @@ -85,7 +85,7 @@ internal DevBoxAction() public DevBoxActionType ActionType { get; } /// The id of the resource which triggered this action. public string SourceId { get; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. public DateTimeOffset? SuspendedUntil { get; } /// Details about the next run of this action. public DevBoxNextAction NextAction { get; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs index 90b8cc68585b7..ad8681e695995 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxActionDelayResult : 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevBoxActionDelayResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(ActionName); writer.WritePropertyName("result"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevBoxActionDelayResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs index cc9f1469f91be..2144cf2034ec1 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxHardwareProfile : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevBoxHardwareProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SkuName)) { writer.WritePropertyName("skuName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevBoxHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs index 98271755058f0..e3480721bd9c7 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxImageReference : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevBoxImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevBoxImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs index f007cf2014947..1d98878c22cc7 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs @@ -55,7 +55,7 @@ public DevBoxImageReference() /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxImageReference(string name, string version, string operatingSystem, string osBuildNumber, DateTimeOffset? publishedDate, IDictionary serializedAdditionalRawData) { @@ -75,7 +75,7 @@ internal DevBoxImageReference(string name, string version, string operatingSyste public string OperatingSystem { get; } /// The operating system build number of the image. public string OSBuildNumber { get; } - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. public DateTimeOffset? PublishedDate { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs index 76036d73ca704..da7d2142f43ab 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxNextAction : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevBoxNextAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("scheduledTime"u8); writer.WriteStringValue(ScheduledTime, "O"); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevBoxNextAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs index 7abeb1fff11c3..3e6d5cad2f7e6 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs @@ -46,14 +46,14 @@ public partial class DevBoxNextAction private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. internal DevBoxNextAction(DateTimeOffset scheduledTime) { ScheduledTime = scheduledTime; } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxNextAction(DateTimeOffset scheduledTime, IDictionary serializedAdditionalRawData) { @@ -66,7 +66,7 @@ internal DevBoxNextAction() { } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. public DateTimeOffset ScheduledTime { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs index 38fadfba7edc3..8433022992027 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxPool : 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(DevBoxPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } DevBoxPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs index f3d3d9ed7875e..d088062482629 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxSchedule : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevBoxSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevBoxSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs index 12ec22c9ee7cb..bbd578008a53a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxStorageProfile : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevBoxStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDisk)) { writer.WritePropertyName("osDisk"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevBoxStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs index 2e84ca0135d84..7e3254851bbd4 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterCatalog : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevCenterCatalog)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevCenterCatalog IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs index 6e10bfb230946..31d7cb8cb7221 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterEnvironment : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevCenterEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevCenterEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs index f17dca7b2f2c0..3e473e3fe6e31 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterEnvironmentType : IUtf8JsonSerializable, IJsonMode 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") @@ -25,9 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevCenterEnvironmentType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } writer.WritePropertyName("deploymentTargetId"u8); writer.WriteStringValue(DeploymentTargetId); writer.WritePropertyName("status"u8); @@ -47,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevCenterEnvironmentType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs index a9d9a7bb8d38a..7ab4e428ebf55 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs @@ -47,20 +47,17 @@ public partial class DevCenterEnvironmentType private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the environment type. /// /// Id of a subscription or management group that the environment type will be /// mapped to. The environment's resources will be deployed into this subscription /// or management group. /// /// Indicates whether this environment type is enabled for use in this project. - /// or is null. - internal DevCenterEnvironmentType(string name, ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) + /// is null. + internal DevCenterEnvironmentType(ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) { - Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(deploymentTargetId, nameof(deploymentTargetId)); - Name = name; DeploymentTargetId = deploymentTargetId; Status = status; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs index 720b17604b198..831844edf586c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterProject : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevCenterProject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevCenterProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs index 982c1964c9ba2..b5748cef58239 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnvironmentDefinition : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EnvironmentDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (options.Format != "W") @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EnvironmentDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs index 3c060ecc42e6c..61fc9370a3034 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnvironmentDefinitionParameter : IUtf8JsonSerializable, IJs 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EnvironmentDefinitionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Name)) @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EnvironmentDefinitionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs index c67ea98e4a769..22fe93a82fe5c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs @@ -49,7 +49,7 @@ public partial class EnvironmentDefinitionParameter /// Unique ID of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// Whether or not this parameter is required. /// is null. @@ -70,7 +70,7 @@ internal EnvironmentDefinitionParameter(string id, EnvironmentDefinitionParamete /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a @@ -107,7 +107,7 @@ internal EnvironmentDefinitionParameter() public string DefaultValue { get; } /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// public EnvironmentDefinitionParameterType ParameterType { get; } /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs index 5aba522369ea1..9935abde0f1b6 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSDisk : 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op throw new FormatException($"The model {nameof(OSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) { writer.WritePropertyName("diskSizeGB"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op #endif } } - writer.WriteEndObject(); } OSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs index 4ea169aaa1fee..c5cc10ee6e3a9 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class RemoteConnection : IUtf8JsonSerializable, IJsonModel ((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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RemoteConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WebUri)) { writer.WritePropertyName("webUrl"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RemoteConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs index ccac05e31e34f..95fe6183f2794 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class StopOnDisconnectConfiguration : IUtf8JsonSerializable, IJso 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(StopOnDisconnectConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(GracePeriodMinutes)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } StopOnDisconnectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs index 3bac6833b92dd..fc4ba880bfc1d 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs @@ -479,7 +479,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsB [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -496,7 +496,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -513,7 +513,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsA [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -526,7 +526,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs index 227fde00f7058..35a98bd001e3b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs @@ -427,7 +427,7 @@ public async Task Example_Pool_GetPools_ListsAvailablePools_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -446,7 +446,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -465,7 +465,7 @@ public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -478,7 +478,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Conven [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml index c744b507b9249..8ea42aae47b34 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml +++ b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/devcenter/DevCenter -commit: 63dc797c014849ef0c5da7eb91197975efb6a474 +commit: 7b35ea773c62c90b8f77d563cd315fec658ca287 repo: Azure/azure-rest-api-specs cleanup: false