| | 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.Batch.Protocol.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 IPAddressProvisioningType. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum IPAddressProvisioningType |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// A public IP will be created and managed by Batch. There may be |
| | 26 | | /// multiple public IPs depending on the size of the Pool. |
| | 27 | | /// </summary> |
| | 28 | | [EnumMember(Value = "batchmanaged")] |
| | 29 | | BatchManaged, |
| | 30 | | /// <summary> |
| | 31 | | /// Public IPs are provided by the user and will be used to provision |
| | 32 | | /// the Compute Nodes. |
| | 33 | | /// </summary> |
| | 34 | | [EnumMember(Value = "usermanaged")] |
| | 35 | | UserManaged, |
| | 36 | | /// <summary> |
| | 37 | | /// No public IP Address will be created. |
| | 38 | | /// </summary> |
| | 39 | | [EnumMember(Value = "nopublicipaddresses")] |
| | 40 | | NoPublicIPAddresses |
| | 41 | | } |
| | 42 | | internal static class IPAddressProvisioningTypeEnumExtension |
| | 43 | | { |
| | 44 | | internal static string ToSerializedValue(this IPAddressProvisioningType? value) |
| | 45 | | { |
| 0 | 46 | | return value == null ? null : ((IPAddressProvisioningType)value).ToSerializedValue(); |
| | 47 | | } |
| | 48 | |
|
| | 49 | | internal static string ToSerializedValue(this IPAddressProvisioningType value) |
| | 50 | | { |
| | 51 | | switch( value ) |
| | 52 | | { |
| | 53 | | case IPAddressProvisioningType.BatchManaged: |
| 0 | 54 | | return "batchmanaged"; |
| | 55 | | case IPAddressProvisioningType.UserManaged: |
| 0 | 56 | | return "usermanaged"; |
| | 57 | | case IPAddressProvisioningType.NoPublicIPAddresses: |
| 0 | 58 | | return "nopublicipaddresses"; |
| | 59 | | } |
| 0 | 60 | | return null; |
| | 61 | | } |
| | 62 | |
|
| | 63 | | internal static IPAddressProvisioningType? ParseIPAddressProvisioningType(this string value) |
| | 64 | | { |
| | 65 | | switch( value ) |
| | 66 | | { |
| | 67 | | case "batchmanaged": |
| 0 | 68 | | return IPAddressProvisioningType.BatchManaged; |
| | 69 | | case "usermanaged": |
| 0 | 70 | | return IPAddressProvisioningType.UserManaged; |
| | 71 | | case "nopublicipaddresses": |
| 0 | 72 | | return IPAddressProvisioningType.NoPublicIPAddresses; |
| | 73 | | } |
| 0 | 74 | | return null; |
| | 75 | | } |
| | 76 | | } |
| | 77 | | } |