| | 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 System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// A network security group rule to apply to an inbound endpoint. |
| | 20 | | /// </summary> |
| | 21 | | public partial class NetworkSecurityGroupRule |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the NetworkSecurityGroupRule class. |
| | 25 | | /// </summary> |
| 6320 | 26 | | public NetworkSecurityGroupRule() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 6320 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the NetworkSecurityGroupRule class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="priority">The priority for this rule.</param> |
| | 35 | | /// <param name="access">The action that should be taken for a |
| | 36 | | /// specified IP address, subnet range or tag.</param> |
| | 37 | | /// <param name="sourceAddressPrefix">The source address prefix or tag |
| | 38 | | /// to match for the rule.</param> |
| | 39 | | /// <param name="sourcePortRanges">The source port ranges to match for |
| | 40 | | /// the rule.</param> |
| 0 | 41 | | public NetworkSecurityGroupRule(int priority, NetworkSecurityGroupRuleAccess access, string sourceAddressPrefix, |
| | 42 | | { |
| 0 | 43 | | Priority = priority; |
| 0 | 44 | | Access = access; |
| 0 | 45 | | SourceAddressPrefix = sourceAddressPrefix; |
| 0 | 46 | | SourcePortRanges = sourcePortRanges; |
| | 47 | | CustomInit(); |
| 0 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// An initialization method that performs custom operations like setting defaults |
| | 52 | | /// </summary> |
| | 53 | | partial void CustomInit(); |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// Gets or sets the priority for this rule. |
| | 57 | | /// </summary> |
| | 58 | | /// <remarks> |
| | 59 | | /// Priorities within a Pool must be unique and are evaluated in order |
| | 60 | | /// of priority. The lower the number the higher the priority. For |
| | 61 | | /// example, rules could be specified with order numbers of 150, 250, |
| | 62 | | /// and 350. The rule with the order number of 150 takes precedence |
| | 63 | | /// over the rule that has an order of 250. Allowed priorities are 150 |
| | 64 | | /// to 4096. If any reserved or duplicate values are provided the |
| | 65 | | /// request fails with HTTP status code 400. |
| | 66 | | /// </remarks> |
| | 67 | | [JsonProperty(PropertyName = "priority")] |
| 13327 | 68 | | public int Priority { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets the action that should be taken for a specified IP |
| | 72 | | /// address, subnet range or tag. |
| | 73 | | /// </summary> |
| | 74 | | /// <remarks> |
| | 75 | | /// Possible values include: 'allow', 'deny' |
| | 76 | | /// </remarks> |
| | 77 | | [JsonProperty(PropertyName = "access")] |
| 13301 | 78 | | public NetworkSecurityGroupRuleAccess Access { get; set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets or sets the source address prefix or tag to match for the |
| | 82 | | /// rule. |
| | 83 | | /// </summary> |
| | 84 | | /// <remarks> |
| | 85 | | /// Valid values are a single IP address (i.e. 10.10.10.10), IP subnet |
| | 86 | | /// (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If |
| | 87 | | /// any other values are provided the request fails with HTTP status |
| | 88 | | /// code 400. |
| | 89 | | /// </remarks> |
| | 90 | | [JsonProperty(PropertyName = "sourceAddressPrefix")] |
| 13296 | 91 | | public string SourceAddressPrefix { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets the source port ranges to match for the rule. |
| | 95 | | /// </summary> |
| | 96 | | /// <remarks> |
| | 97 | | /// Valid values are '*' (for all ports 0 - 65535), a specific port |
| | 98 | | /// (i.e. 22), or a port range (i.e. 100-200). The ports must be in the |
| | 99 | | /// range of 0 to 65535. Each entry in this collection must not overlap |
| | 100 | | /// any other entry (either a range or an individual port). If any |
| | 101 | | /// other values are provided the request fails with HTTP status code |
| | 102 | | /// 400. The default value is '*'. |
| | 103 | | /// </remarks> |
| | 104 | | [JsonProperty(PropertyName = "sourcePortRanges")] |
| 13322 | 105 | | public IList<string> SourcePortRanges { get; set; } |
| | 106 | |
|
| | 107 | | } |
| | 108 | | } |