| | 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.CognitiveServices.Vision.Face.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 FaceAttributeType. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum FaceAttributeType |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "age")] |
| | 25 | | Age, |
| | 26 | | [EnumMember(Value = "gender")] |
| | 27 | | Gender, |
| | 28 | | [EnumMember(Value = "headPose")] |
| | 29 | | HeadPose, |
| | 30 | | [EnumMember(Value = "smile")] |
| | 31 | | Smile, |
| | 32 | | [EnumMember(Value = "facialHair")] |
| | 33 | | FacialHair, |
| | 34 | | [EnumMember(Value = "glasses")] |
| | 35 | | Glasses, |
| | 36 | | [EnumMember(Value = "emotion")] |
| | 37 | | Emotion, |
| | 38 | | [EnumMember(Value = "hair")] |
| | 39 | | Hair, |
| | 40 | | [EnumMember(Value = "makeup")] |
| | 41 | | Makeup, |
| | 42 | | [EnumMember(Value = "occlusion")] |
| | 43 | | Occlusion, |
| | 44 | | [EnumMember(Value = "accessories")] |
| | 45 | | Accessories, |
| | 46 | | [EnumMember(Value = "blur")] |
| | 47 | | Blur, |
| | 48 | | [EnumMember(Value = "exposure")] |
| | 49 | | Exposure, |
| | 50 | | [EnumMember(Value = "noise")] |
| | 51 | | Noise |
| | 52 | | } |
| | 53 | | internal static class FaceAttributeTypeEnumExtension |
| | 54 | | { |
| | 55 | | internal static string ToSerializedValue(this FaceAttributeType? value) |
| | 56 | | { |
| 0 | 57 | | return value == null ? null : ((FaceAttributeType)value).ToSerializedValue(); |
| | 58 | | } |
| | 59 | |
|
| | 60 | | internal static string ToSerializedValue(this FaceAttributeType value) |
| | 61 | | { |
| | 62 | | switch( value ) |
| | 63 | | { |
| | 64 | | case FaceAttributeType.Age: |
| 0 | 65 | | return "age"; |
| | 66 | | case FaceAttributeType.Gender: |
| 0 | 67 | | return "gender"; |
| | 68 | | case FaceAttributeType.HeadPose: |
| 0 | 69 | | return "headPose"; |
| | 70 | | case FaceAttributeType.Smile: |
| 0 | 71 | | return "smile"; |
| | 72 | | case FaceAttributeType.FacialHair: |
| 0 | 73 | | return "facialHair"; |
| | 74 | | case FaceAttributeType.Glasses: |
| 0 | 75 | | return "glasses"; |
| | 76 | | case FaceAttributeType.Emotion: |
| 0 | 77 | | return "emotion"; |
| | 78 | | case FaceAttributeType.Hair: |
| 0 | 79 | | return "hair"; |
| | 80 | | case FaceAttributeType.Makeup: |
| 0 | 81 | | return "makeup"; |
| | 82 | | case FaceAttributeType.Occlusion: |
| 0 | 83 | | return "occlusion"; |
| | 84 | | case FaceAttributeType.Accessories: |
| 0 | 85 | | return "accessories"; |
| | 86 | | case FaceAttributeType.Blur: |
| 0 | 87 | | return "blur"; |
| | 88 | | case FaceAttributeType.Exposure: |
| 0 | 89 | | return "exposure"; |
| | 90 | | case FaceAttributeType.Noise: |
| 0 | 91 | | return "noise"; |
| | 92 | | } |
| 0 | 93 | | return null; |
| | 94 | | } |
| | 95 | |
|
| | 96 | | internal static FaceAttributeType? ParseFaceAttributeType(this string value) |
| | 97 | | { |
| | 98 | | switch( value ) |
| | 99 | | { |
| | 100 | | case "age": |
| 0 | 101 | | return FaceAttributeType.Age; |
| | 102 | | case "gender": |
| 0 | 103 | | return FaceAttributeType.Gender; |
| | 104 | | case "headPose": |
| 0 | 105 | | return FaceAttributeType.HeadPose; |
| | 106 | | case "smile": |
| 0 | 107 | | return FaceAttributeType.Smile; |
| | 108 | | case "facialHair": |
| 0 | 109 | | return FaceAttributeType.FacialHair; |
| | 110 | | case "glasses": |
| 0 | 111 | | return FaceAttributeType.Glasses; |
| | 112 | | case "emotion": |
| 0 | 113 | | return FaceAttributeType.Emotion; |
| | 114 | | case "hair": |
| 0 | 115 | | return FaceAttributeType.Hair; |
| | 116 | | case "makeup": |
| 0 | 117 | | return FaceAttributeType.Makeup; |
| | 118 | | case "occlusion": |
| 0 | 119 | | return FaceAttributeType.Occlusion; |
| | 120 | | case "accessories": |
| 0 | 121 | | return FaceAttributeType.Accessories; |
| | 122 | | case "blur": |
| 0 | 123 | | return FaceAttributeType.Blur; |
| | 124 | | case "exposure": |
| 0 | 125 | | return FaceAttributeType.Exposure; |
| | 126 | | case "noise": |
| 0 | 127 | | return FaceAttributeType.Noise; |
| | 128 | | } |
| 0 | 129 | | return null; |
| | 130 | | } |
| | 131 | | } |
| | 132 | | } |