| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | |
| | | 10 | | namespace Azure.ResourceManager.Resources.Models |
| | | 11 | | { |
| | | 12 | | internal static class WhatIfResultFormatExtensions |
| | | 13 | | { |
| | 72 | 14 | | public static string ToSerialString(this WhatIfResultFormat value) => value switch |
| | 72 | 15 | | { |
| | 120 | 16 | | WhatIfResultFormat.ResourceIdOnly => "ResourceIdOnly", |
| | 96 | 17 | | WhatIfResultFormat.FullResourcePayloads => "FullResourcePayloads", |
| | 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WhatIfResultFormat value.") |
| | 72 | 19 | | }; |
| | | 20 | | |
| | | 21 | | public static WhatIfResultFormat ToWhatIfResultFormat(this string value) |
| | | 22 | | { |
| | 0 | 23 | | if (string.Equals(value, "ResourceIdOnly", StringComparison.InvariantCultureIgnoreCase)) return WhatIfResult |
| | 0 | 24 | | if (string.Equals(value, "FullResourcePayloads", StringComparison.InvariantCultureIgnoreCase)) return WhatIf |
| | 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WhatIfResultFormat value."); |
| | | 26 | | } |
| | | 27 | | } |
| | | 28 | | } |