| | | 1 | | // <auto-generated> |
| | | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | | 4 | | // license information. |
| | | 5 | | // |
| | | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | | 8 | | // regenerated. |
| | | 9 | | // </auto-generated> |
| | | 10 | | |
| | | 11 | | namespace Microsoft.Azure.Management.Search.Models |
| | | 12 | | { |
| | | 13 | | using Newtonsoft.Json; |
| | | 14 | | using Newtonsoft.Json.Converters; |
| | | 15 | | using System.Runtime; |
| | | 16 | | using System.Runtime.Serialization; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Defines values for SearchServiceStatus. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum SearchServiceStatus |
| | | 23 | | { |
| | | 24 | | [EnumMember(Value = "running")] |
| | | 25 | | Running, |
| | | 26 | | [EnumMember(Value = "provisioning")] |
| | | 27 | | Provisioning, |
| | | 28 | | [EnumMember(Value = "deleting")] |
| | | 29 | | Deleting, |
| | | 30 | | [EnumMember(Value = "degraded")] |
| | | 31 | | Degraded, |
| | | 32 | | [EnumMember(Value = "disabled")] |
| | | 33 | | Disabled, |
| | | 34 | | [EnumMember(Value = "error")] |
| | | 35 | | Error |
| | | 36 | | } |
| | | 37 | | internal static class SearchServiceStatusEnumExtension |
| | | 38 | | { |
| | | 39 | | internal static string ToSerializedValue(this SearchServiceStatus? value) |
| | | 40 | | { |
| | 0 | 41 | | return value == null ? null : ((SearchServiceStatus)value).ToSerializedValue(); |
| | | 42 | | } |
| | | 43 | | |
| | | 44 | | internal static string ToSerializedValue(this SearchServiceStatus value) |
| | | 45 | | { |
| | | 46 | | switch( value ) |
| | | 47 | | { |
| | | 48 | | case SearchServiceStatus.Running: |
| | 0 | 49 | | return "running"; |
| | | 50 | | case SearchServiceStatus.Provisioning: |
| | 0 | 51 | | return "provisioning"; |
| | | 52 | | case SearchServiceStatus.Deleting: |
| | 0 | 53 | | return "deleting"; |
| | | 54 | | case SearchServiceStatus.Degraded: |
| | 0 | 55 | | return "degraded"; |
| | | 56 | | case SearchServiceStatus.Disabled: |
| | 0 | 57 | | return "disabled"; |
| | | 58 | | case SearchServiceStatus.Error: |
| | 0 | 59 | | return "error"; |
| | | 60 | | } |
| | 0 | 61 | | return null; |
| | | 62 | | } |
| | | 63 | | |
| | | 64 | | internal static SearchServiceStatus? ParseSearchServiceStatus(this string value) |
| | | 65 | | { |
| | | 66 | | switch( value ) |
| | | 67 | | { |
| | | 68 | | case "running": |
| | 0 | 69 | | return SearchServiceStatus.Running; |
| | | 70 | | case "provisioning": |
| | 0 | 71 | | return SearchServiceStatus.Provisioning; |
| | | 72 | | case "deleting": |
| | 0 | 73 | | return SearchServiceStatus.Deleting; |
| | | 74 | | case "degraded": |
| | 0 | 75 | | return SearchServiceStatus.Degraded; |
| | | 76 | | case "disabled": |
| | 0 | 77 | | return SearchServiceStatus.Disabled; |
| | | 78 | | case "error": |
| | 0 | 79 | | return SearchServiceStatus.Error; |
| | | 80 | | } |
| | 0 | 81 | | return null; |
| | | 82 | | } |
| | | 83 | | } |
| | | 84 | | } |