From 1e2e1be087c69fa66c18017124b24d4a38ede3f5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 16 Mar 2023 02:00:38 +0000 Subject: [PATCH] CodeGen from PR 23123 in Azure/azure-rest-api-specs Merge 01651f6e2ce1895677404544ccabef689aecc5e6 into ee157d6bbf6e4c4fdc8a47b380e00ddd56a0e852 --- ...ager.OperationalInsights.netstandard2.0.cs | 41 ++------------- ...rationalInsightsTableData.Serialization.cs | 8 +-- ...erationalInsightsTableProvisioningState.cs | 3 ++ .../Models/RetentionInDaysAsDefaultState.cs | 51 ------------------- .../TotalRetentionInDaysAsDefaultState.cs | 51 ------------------- .../Generated/OperationalInsightsTableData.cs | 6 +-- .../src/autorest.md | 2 +- 7 files changed, 14 insertions(+), 148 deletions(-) delete mode 100644 sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/RetentionInDaysAsDefaultState.cs delete mode 100644 sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TotalRetentionInDaysAsDefaultState.cs diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs index 8ed49b169e62..e37a23daecab 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs @@ -402,11 +402,11 @@ public OperationalInsightsTableData() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableRestoredLogs RestoredLogs { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableResultStatistics ResultStatistics { get { throw null; } } public int? RetentionInDays { get { throw null; } set { } } - public Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState? RetentionInDaysAsDefault { get { throw null; } } + public bool? RetentionInDaysAsDefault { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSchema Schema { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSearchResults SearchResults { get { throw null; } set { } } public int? TotalRetentionInDays { get { throw null; } set { } } - public Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState? TotalRetentionInDaysAsDefault { get { throw null; } } + public bool? TotalRetentionInDaysAsDefault { get { throw null; } } } public partial class OperationalInsightsTableResource : Azure.ResourceManager.ArmResource { @@ -1029,6 +1029,7 @@ public OperationalInsightsStorageAccount(Azure.Core.ResourceIdentifier id, strin private readonly object _dummy; private readonly int _dummyPrimitive; public OperationalInsightsTableProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState InProgress { get { throw null; } } public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState Succeeded { get { throw null; } } public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState Updating { get { throw null; } } @@ -1274,24 +1275,6 @@ public OperationalInsightsWorkspaceSku(Azure.ResourceManager.OperationalInsights public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RetentionInDaysAsDefaultState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RetentionInDaysAsDefaultState(string value) { throw null; } - public static Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState False { get { throw null; } } - public static Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState True { get { throw null; } } - public bool Equals(Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState 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.OperationalInsights.Models.RetentionInDaysAsDefaultState left, Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState right) { throw null; } - public static implicit operator Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState left, Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct StorageInsightState : System.IEquatable { private readonly object _dummy; @@ -1315,22 +1298,4 @@ internal StorageInsightStatus() { } public string Description { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.StorageInsightState State { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TotalRetentionInDaysAsDefaultState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TotalRetentionInDaysAsDefaultState(string value) { throw null; } - public static Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState False { get { throw null; } } - public static Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState True { get { throw null; } } - public bool Equals(Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState 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.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState left, Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState right) { throw null; } - public static implicit operator Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState left, Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState right) { throw null; } - public override string ToString() { throw null; } - } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableData.Serialization.cs index 41e4e84dee96..04013e3d6bcf 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableData.Serialization.cs @@ -73,8 +73,8 @@ internal static OperationalInsightsTableData DeserializeOperationalInsightsTable Optional lastPlanModifiedDate = default; Optional schema = default; Optional provisioningState = default; - Optional retentionInDaysAsDefault = default; - Optional totalRetentionInDaysAsDefault = default; + Optional retentionInDaysAsDefault = default; + Optional totalRetentionInDaysAsDefault = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -213,7 +213,7 @@ internal static OperationalInsightsTableData DeserializeOperationalInsightsTable property0.ThrowNonNullablePropertyIsNull(); continue; } - retentionInDaysAsDefault = new RetentionInDaysAsDefaultState(property0.Value.GetString()); + retentionInDaysAsDefault = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("totalRetentionInDaysAsDefault"u8)) @@ -223,7 +223,7 @@ internal static OperationalInsightsTableData DeserializeOperationalInsightsTable property0.ThrowNonNullablePropertyIsNull(); continue; } - totalRetentionInDaysAsDefault = new TotalRetentionInDaysAsDefaultState(property0.Value.GetString()); + totalRetentionInDaysAsDefault = property0.Value.GetBoolean(); continue; } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableProvisioningState.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableProvisioningState.cs index dc2853284f16..2dc4b1057baf 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableProvisioningState.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableProvisioningState.cs @@ -25,6 +25,7 @@ public OperationalInsightsTableProvisioningState(string value) private const string UpdatingValue = "Updating"; private const string InProgressValue = "InProgress"; private const string SucceededValue = "Succeeded"; + private const string DeletingValue = "Deleting"; /// Table schema is still being built and updated, table is currently locked for any changes till the procedure is done. public static OperationalInsightsTableProvisioningState Updating { get; } = new OperationalInsightsTableProvisioningState(UpdatingValue); @@ -32,6 +33,8 @@ public OperationalInsightsTableProvisioningState(string value) public static OperationalInsightsTableProvisioningState InProgress { get; } = new OperationalInsightsTableProvisioningState(InProgressValue); /// Table state is stable and without changes, table is unlocked and open for new updates. public static OperationalInsightsTableProvisioningState Succeeded { get; } = new OperationalInsightsTableProvisioningState(SucceededValue); + /// Table state is deleting. + public static OperationalInsightsTableProvisioningState Deleting { get; } = new OperationalInsightsTableProvisioningState(DeletingValue); /// Determines if two values are the same. public static bool operator ==(OperationalInsightsTableProvisioningState left, OperationalInsightsTableProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/RetentionInDaysAsDefaultState.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/RetentionInDaysAsDefaultState.cs deleted file mode 100644 index 9232896216de..000000000000 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/RetentionInDaysAsDefaultState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.OperationalInsights.Models -{ - /// True - Value originates from workspace retention in days, False - Customer specific. - public readonly partial struct RetentionInDaysAsDefaultState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RetentionInDaysAsDefaultState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TrueValue = "True"; - private const string FalseValue = "False"; - - /// Value originates from workspace retention in days. - public static RetentionInDaysAsDefaultState True { get; } = new RetentionInDaysAsDefaultState(TrueValue); - /// Value is customer specific. - public static RetentionInDaysAsDefaultState False { get; } = new RetentionInDaysAsDefaultState(FalseValue); - /// Determines if two values are the same. - public static bool operator ==(RetentionInDaysAsDefaultState left, RetentionInDaysAsDefaultState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RetentionInDaysAsDefaultState left, RetentionInDaysAsDefaultState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RetentionInDaysAsDefaultState(string value) => new RetentionInDaysAsDefaultState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RetentionInDaysAsDefaultState other && Equals(other); - /// - public bool Equals(RetentionInDaysAsDefaultState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TotalRetentionInDaysAsDefaultState.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TotalRetentionInDaysAsDefaultState.cs deleted file mode 100644 index 29eb965e081f..000000000000 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TotalRetentionInDaysAsDefaultState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.OperationalInsights.Models -{ - /// True - Value originates from retention in days, False - Customer specific. - public readonly partial struct TotalRetentionInDaysAsDefaultState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TotalRetentionInDaysAsDefaultState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TrueValue = "True"; - private const string FalseValue = "False"; - - /// Value originates from retention in days. - public static TotalRetentionInDaysAsDefaultState True { get; } = new TotalRetentionInDaysAsDefaultState(TrueValue); - /// Value is customer specific. - public static TotalRetentionInDaysAsDefaultState False { get; } = new TotalRetentionInDaysAsDefaultState(FalseValue); - /// Determines if two values are the same. - public static bool operator ==(TotalRetentionInDaysAsDefaultState left, TotalRetentionInDaysAsDefaultState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TotalRetentionInDaysAsDefaultState left, TotalRetentionInDaysAsDefaultState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TotalRetentionInDaysAsDefaultState(string value) => new TotalRetentionInDaysAsDefaultState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TotalRetentionInDaysAsDefaultState other && Equals(other); - /// - public bool Equals(TotalRetentionInDaysAsDefaultState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs index 825e43fa2465..2dfd1df4c3fe 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs @@ -39,7 +39,7 @@ public OperationalInsightsTableData() /// Table's current provisioning state. If set to 'updating', indicates a resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is concluded. /// True - Value originates from workspace retention in days, False - Customer specific. /// True - Value originates from retention in days, False - Customer specific. - internal OperationalInsightsTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? retentionInDays, int? totalRetentionInDays, int? archiveRetentionInDays, OperationalInsightsTableSearchResults searchResults, OperationalInsightsTableRestoredLogs restoredLogs, OperationalInsightsTableResultStatistics resultStatistics, OperationalInsightsTablePlan? plan, string lastPlanModifiedDate, OperationalInsightsSchema schema, OperationalInsightsTableProvisioningState? provisioningState, RetentionInDaysAsDefaultState? retentionInDaysAsDefault, TotalRetentionInDaysAsDefaultState? totalRetentionInDaysAsDefault) : base(id, name, resourceType, systemData) + internal OperationalInsightsTableData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? retentionInDays, int? totalRetentionInDays, int? archiveRetentionInDays, OperationalInsightsTableSearchResults searchResults, OperationalInsightsTableRestoredLogs restoredLogs, OperationalInsightsTableResultStatistics resultStatistics, OperationalInsightsTablePlan? plan, string lastPlanModifiedDate, OperationalInsightsSchema schema, OperationalInsightsTableProvisioningState? provisioningState, bool? retentionInDaysAsDefault, bool? totalRetentionInDaysAsDefault) : base(id, name, resourceType, systemData) { RetentionInDays = retentionInDays; TotalRetentionInDays = totalRetentionInDays; @@ -76,8 +76,8 @@ internal OperationalInsightsTableData(ResourceIdentifier id, string name, Resour /// Table's current provisioning state. If set to 'updating', indicates a resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is concluded. public OperationalInsightsTableProvisioningState? ProvisioningState { get; } /// True - Value originates from workspace retention in days, False - Customer specific. - public RetentionInDaysAsDefaultState? RetentionInDaysAsDefault { get; } + public bool? RetentionInDaysAsDefault { get; } /// True - Value originates from retention in days, False - Customer specific. - public TotalRetentionInDaysAsDefaultState? TotalRetentionInDaysAsDefault { get; } + public bool? TotalRetentionInDaysAsDefault { get; } } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md index 762ae32f501c..ff84185bc539 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md @@ -8,7 +8,7 @@ generate-model-factory: false csharp: true library-name: OperationalInsights namespace: Azure.ResourceManager.OperationalInsights -require: https://github.com/Azure/azure-rest-api-specs/blob/7d5d1db0c45d6fe0934c97b6a6f9bb34112d42d1/specification/operationalinsights/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/operationalinsights/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true