This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
NetworkSecurityGroupRule.java
107 lines (95 loc) · 4.35 KB
/
NetworkSecurityGroupRule.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.batch.protocol.models;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* A network security group rule to apply to an inbound endpoint.
*/
public class NetworkSecurityGroupRule {
/**
* The priority for this rule.
* Priorities within a pool must be unique and are evaluated in order of
* priority. The lower the number the higher the priority. For example,
* rules could be specified with order numbers of 150, 250, and 350. The
* rule with the order number of 150 takes precedence over the rule that
* has an order of 250. Allowed priorities are 150 to 3500. If any reserved
* or duplicate values are provided the request fails with HTTP status code
* 400.
*/
@JsonProperty(value = "priority", required = true)
private int priority;
/**
* The action that should be taken for a specified IP address, subnet range
* or tag.
* Possible values include: 'allow', 'deny'.
*/
@JsonProperty(value = "access", required = true)
private NetworkSecurityGroupRuleAccess access;
/**
* The source address prefix or tag to match for the rule.
* Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e.
* 192.168.1.0/24), default tag, or * (for all addresses). If any other
* values are provided the request fails with HTTP status code 400.
*/
@JsonProperty(value = "sourceAddressPrefix", required = true)
private String sourceAddressPrefix;
/**
* Get priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
*
* @return the priority value
*/
public int priority() {
return this.priority;
}
/**
* Set priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
*
* @param priority the priority value to set
* @return the NetworkSecurityGroupRule object itself.
*/
public NetworkSecurityGroupRule withPriority(int priority) {
this.priority = priority;
return this;
}
/**
* Get possible values include: 'allow', 'deny'.
*
* @return the access value
*/
public NetworkSecurityGroupRuleAccess access() {
return this.access;
}
/**
* Set possible values include: 'allow', 'deny'.
*
* @param access the access value to set
* @return the NetworkSecurityGroupRule object itself.
*/
public NetworkSecurityGroupRule withAccess(NetworkSecurityGroupRuleAccess access) {
this.access = access;
return this;
}
/**
* Get valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.
*
* @return the sourceAddressPrefix value
*/
public String sourceAddressPrefix() {
return this.sourceAddressPrefix;
}
/**
* Set valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.
*
* @param sourceAddressPrefix the sourceAddressPrefix value to set
* @return the NetworkSecurityGroupRule object itself.
*/
public NetworkSecurityGroupRule withSourceAddressPrefix(String sourceAddressPrefix) {
this.sourceAddressPrefix = sourceAddressPrefix;
return this;
}
}