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 8ed49b169e626..8ab26aca76100 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 { @@ -1274,24 +1274,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 +1297,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 631eb29bb0ae6..980b078f9d357 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 @@ -69,8 +69,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")) @@ -209,7 +209,7 @@ internal static OperationalInsightsTableData DeserializeOperationalInsightsTable property0.ThrowNonNullablePropertyIsNull(); continue; } - retentionInDaysAsDefault = new RetentionInDaysAsDefaultState(property0.Value.GetString()); + retentionInDaysAsDefault = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("totalRetentionInDaysAsDefault")) @@ -219,7 +219,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/RetentionInDaysAsDefaultState.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/RetentionInDaysAsDefaultState.cs deleted file mode 100644 index 9232896216dec..0000000000000 --- 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 29eb965e081f1..0000000000000 --- 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 e9f40df0821d7..5ca1e524c4a1f 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.cs @@ -36,7 +36,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; @@ -73,8 +73,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 b2e79acfd6594..22f566ee7a7ee 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true 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: https://github.com/Azure/azure-rest-api-specs/blob/a649865f9b9943d400db80dc3020ba7d037e95ed/specification/operationalinsights/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true