Class WindowsFirewallRule
- java.lang.Object
-
- odata.msgraph.client.beta.complex.WindowsFirewallRule
-
- All Implemented Interfaces:
com.github.davidmoten.odata.client.ODataType
public class WindowsFirewallRule extends Object implements com.github.davidmoten.odata.client.ODataType
“A rule controlling traffic through the Windows Firewall.”
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWindowsFirewallRule.Builder
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedWindowsFirewallRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WindowsFirewallRule.Builderbuilder()Returns a builder which is used to create a new instance of this class (given that this class is immutable).Optional<StateManagementSetting>getAction()“The action the rule enforces.Optional<String>getDescription()“The description of the rule.”Optional<String>getDisplayName()“The display name of the rule.Optional<StateManagementSetting>getEdgeTraversal()“Indicates whether edge traversal is enabled or disabled for this rule.Optional<String>getFilePath()“The full file path of an app that's affected by the firewall rule.”Optional<WindowsFirewallRuleInterfaceTypes>getInterfaceTypes()“The interface types of the rule.”com.github.davidmoten.odata.client.CollectionPage<String>getLocalAddressRanges()“List of local addresses covered by the rule.com.github.davidmoten.odata.client.CollectionPage<String>getLocalAddressRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)“List of local addresses covered by the rule.com.github.davidmoten.odata.client.CollectionPage<String>getLocalPortRanges()“List of local port ranges.com.github.davidmoten.odata.client.CollectionPage<String>getLocalPortRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)“List of local port ranges.Optional<String>getLocalUserAuthorizations()“Specifies the list of authorized local users for the app container.Optional<String>getPackageFamilyName()“The package family name of a Microsoft Store application that's affected by the firewall rule.”Optional<WindowsFirewallRuleNetworkProfileTypes>getProfileTypes()“Specifies the profiles to which the rule belongs.Optional<Integer>getProtocol()“0-255 number representing the IP protocol (TCP = 6, UDP = 17).com.github.davidmoten.odata.client.CollectionPage<String>getRemoteAddressRanges()“List of tokens specifying the remote addresses covered by the rule.com.github.davidmoten.odata.client.CollectionPage<String>getRemoteAddressRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)“List of tokens specifying the remote addresses covered by the rule.com.github.davidmoten.odata.client.CollectionPage<String>getRemotePortRanges()“List of remote port ranges.com.github.davidmoten.odata.client.CollectionPage<String>getRemotePortRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)“List of remote port ranges.Optional<String>getServiceName()“The name used in cases when a service, not an application, is sending or receiving traffic.”Optional<WindowsFirewallRuleTrafficDirectionType>getTrafficDirection()“The traffic direction that the rule is enabled for.com.github.davidmoten.odata.client.UnmappedFieldsgetUnmappedFields()StringodataTypeName()voidpostInject(boolean addKeysToContextPath)StringtoString()WindowsFirewallRulewithAction(StateManagementSetting action)Returns an immutable copy ofthiswith just theactionfield changed.WindowsFirewallRulewithDescription(String description)Returns an immutable copy ofthiswith just thedescriptionfield changed.WindowsFirewallRulewithDisplayName(String displayName)Returns an immutable copy ofthiswith just thedisplayNamefield changed.WindowsFirewallRulewithEdgeTraversal(StateManagementSetting edgeTraversal)Returns an immutable copy ofthiswith just theedgeTraversalfield changed.WindowsFirewallRulewithFilePath(String filePath)Returns an immutable copy ofthiswith just thefilePathfield changed.WindowsFirewallRulewithInterfaceTypes(WindowsFirewallRuleInterfaceTypes interfaceTypes)Returns an immutable copy ofthiswith just theinterfaceTypesfield changed.WindowsFirewallRulewithLocalUserAuthorizations(String localUserAuthorizations)Returns an immutable copy ofthiswith just thelocalUserAuthorizationsfield changed.WindowsFirewallRulewithPackageFamilyName(String packageFamilyName)Returns an immutable copy ofthiswith just thepackageFamilyNamefield changed.WindowsFirewallRulewithProfileTypes(WindowsFirewallRuleNetworkProfileTypes profileTypes)Returns an immutable copy ofthiswith just theprofileTypesfield changed.WindowsFirewallRulewithProtocol(Integer protocol)Returns an immutable copy ofthiswith just theprotocolfield changed.WindowsFirewallRulewithServiceName(String serviceName)Returns an immutable copy ofthiswith just theserviceNamefield changed.WindowsFirewallRulewithTrafficDirection(WindowsFirewallRuleTrafficDirectionType trafficDirection)Returns an immutable copy ofthiswith just thetrafficDirectionfield changed.WindowsFirewallRulewithUnmappedField(String name, String value)
-
-
-
Field Detail
-
contextPath
protected com.github.davidmoten.odata.client.ContextPath contextPath
-
unmappedFields
protected com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl unmappedFields
-
odataType
protected String odataType
-
action
protected StateManagementSetting action
-
description
protected String description
-
displayName
protected String displayName
-
edgeTraversal
protected StateManagementSetting edgeTraversal
-
filePath
protected String filePath
-
interfaceTypes
protected WindowsFirewallRuleInterfaceTypes interfaceTypes
-
localAddressRangesNextLink
protected String localAddressRangesNextLink
-
localPortRangesNextLink
protected String localPortRangesNextLink
-
localUserAuthorizations
protected String localUserAuthorizations
-
packageFamilyName
protected String packageFamilyName
-
profileTypes
protected WindowsFirewallRuleNetworkProfileTypes profileTypes
-
protocol
protected Integer protocol
-
remoteAddressRangesNextLink
protected String remoteAddressRangesNextLink
-
remotePortRangesNextLink
protected String remotePortRangesNextLink
-
serviceName
protected String serviceName
-
trafficDirection
protected WindowsFirewallRuleTrafficDirectionType trafficDirection
-
-
Method Detail
-
odataTypeName
public String odataTypeName()
- Specified by:
odataTypeNamein interfacecom.github.davidmoten.odata.client.ODataType
-
getAction
public Optional<StateManagementSetting> getAction()
“The action the rule enforces. If not specified, the default is Allowed.”- Returns:
- property action
-
withAction
public WindowsFirewallRule withAction(StateManagementSetting action)
Returns an immutable copy ofthiswith just theactionfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis.patch()is called (if available)on the returned object only the changed fields are submitted.“The action the rule enforces. If not specified, the default is Allowed.”
- Parameters:
action- new value ofactionfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theactionfield changed
-
getDescription
public Optional<String> getDescription()
“The description of the rule.”- Returns:
- property description
-
withDescription
public WindowsFirewallRule withDescription(String description)
Returns an immutable copy ofthiswith just thedescriptionfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The description of the rule.”
- Parameters:
description- new value ofdescriptionfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thedescriptionfield changed
-
getDisplayName
public Optional<String> getDisplayName()
“The display name of the rule. Does not need to be unique.”- Returns:
- property displayName
-
withDisplayName
public WindowsFirewallRule withDisplayName(String displayName)
Returns an immutable copy ofthiswith just thedisplayNamefield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The display name of the rule. Does not need to be unique.”
- Parameters:
displayName- new value ofdisplayNamefield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thedisplayNamefield changed
-
getEdgeTraversal
public Optional<StateManagementSetting> getEdgeTraversal()
“Indicates whether edge traversal is enabled or disabled for this rule. The EdgeTraversal setting indicates that specific inbound traffic is allowed to tunnel through NATs and other edge devices using the Teredo tunneling technology . In order for this setting to work correctly, the application or service with the inbound firewall rule needs to support IPv6. The primary application of this setting allows listeners on the host to be globally addressable through a Teredo IPv6 address. New rules have the EdgeTraversal property disabled by default.”- Returns:
- property edgeTraversal
-
withEdgeTraversal
public WindowsFirewallRule withEdgeTraversal(StateManagementSetting edgeTraversal)
Returns an immutable copy ofthiswith just theedgeTraversalfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“Indicates whether edge traversal is enabled or disabled for this rule. The EdgeTraversal setting indicates that specific inbound traffic is allowed to tunnel through NATs and other edge devices using the Teredo tunneling technology . In order for this setting to work correctly, the application or service with the inbound firewall rule needs to support IPv6. The primary application of this setting allows listeners on the host to be globally addressable through a Teredo IPv6 address. New rules have the EdgeTraversal property disabled by default.”
- Parameters:
edgeTraversal- new value ofedgeTraversalfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theedgeTraversalfield changed
-
getFilePath
public Optional<String> getFilePath()
“The full file path of an app that's affected by the firewall rule.”- Returns:
- property filePath
-
withFilePath
public WindowsFirewallRule withFilePath(String filePath)
Returns an immutable copy ofthiswith just thefilePathfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis.patch()is called (if available)on the returned object only the changed fields are submitted.“The full file path of an app that's affected by the firewall rule.”
- Parameters:
filePath- new value offilePathfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thefilePathfield changed
-
getInterfaceTypes
public Optional<WindowsFirewallRuleInterfaceTypes> getInterfaceTypes()
“The interface types of the rule.”- Returns:
- property interfaceTypes
-
withInterfaceTypes
public WindowsFirewallRule withInterfaceTypes(WindowsFirewallRuleInterfaceTypes interfaceTypes)
Returns an immutable copy ofthiswith just theinterfaceTypesfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The interface types of the rule.”
- Parameters:
interfaceTypes- new value ofinterfaceTypesfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theinterfaceTypesfield changed
-
getLocalAddressRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getLocalAddressRanges()
“List of local addresses covered by the rule. Default is any address. Valid tokens include:<ul><li>"*" indicates any local address. If present, this must be the only token included.</li><li>A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.</li><li>A valid IPv6 address.</li><li>An IPv4 address range in the format of "start address - end address" with no spaces included.</li><li>An IPv6 address range in the format of "start address - end address" with no spaces included.</li></ul>”- Returns:
- property localAddressRanges
-
getLocalAddressRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getLocalAddressRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)
“List of local addresses covered by the rule. Default is any address. Valid tokens include:<ul><li>"*" indicates any local address. If present, this must be the only token included.</li><li>A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.</li><li>A valid IPv6 address.</li><li>An IPv4 address range in the format of "start address - end address" with no spaces included.</li><li>An IPv6 address range in the format of "start address - end address" with no spaces included.</li></ul>”- Parameters:
options- specify connect and read timeouts- Returns:
- property localAddressRanges
-
getLocalPortRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getLocalPortRanges()
“List of local port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”- Returns:
- property localPortRanges
-
getLocalPortRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getLocalPortRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)
“List of local port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”- Parameters:
options- specify connect and read timeouts- Returns:
- property localPortRanges
-
getLocalUserAuthorizations
public Optional<String> getLocalUserAuthorizations()
“Specifies the list of authorized local users for the app container. This is a string in Security Descriptor Definition Language (SDDL) format.”- Returns:
- property localUserAuthorizations
-
withLocalUserAuthorizations
public WindowsFirewallRule withLocalUserAuthorizations(String localUserAuthorizations)
Returns an immutable copy ofthiswith just thelocalUserAuthorizationsfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis.patch()is called (if available)on the returned object only the changed fields are submitted.“Specifies the list of authorized local users for the app container. This is a string in Security Descriptor Definition Language (SDDL) format.”
- Parameters:
localUserAuthorizations- new value oflocalUserAuthorizationsfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thelocalUserAuthorizationsfield changed
-
getPackageFamilyName
public Optional<String> getPackageFamilyName()
“The package family name of a Microsoft Store application that's affected by the firewall rule.”- Returns:
- property packageFamilyName
-
withPackageFamilyName
public WindowsFirewallRule withPackageFamilyName(String packageFamilyName)
Returns an immutable copy ofthiswith just thepackageFamilyNamefield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The package family name of a Microsoft Store application that's affected by the firewall rule.”
- Parameters:
packageFamilyName- new value ofpackageFamilyNamefield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thepackageFamilyNamefield changed
-
getProfileTypes
public Optional<WindowsFirewallRuleNetworkProfileTypes> getProfileTypes()
“Specifies the profiles to which the rule belongs. If not specified, the default is All.”- Returns:
- property profileTypes
-
withProfileTypes
public WindowsFirewallRule withProfileTypes(WindowsFirewallRuleNetworkProfileTypes profileTypes)
Returns an immutable copy ofthiswith just theprofileTypesfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“Specifies the profiles to which the rule belongs. If not specified, the default is All.”
- Parameters:
profileTypes- new value ofprofileTypesfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theprofileTypesfield changed
-
getProtocol
public Optional<Integer> getProtocol()
“0-255 number representing the IP protocol (TCP = 6, UDP = 17). If not specified, the default is All. Valid values 0 to 255”- Returns:
- property protocol
-
withProtocol
public WindowsFirewallRule withProtocol(Integer protocol)
Returns an immutable copy ofthiswith just theprotocolfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis.patch()is called (if available)on the returned object only the changed fields are submitted.“0-255 number representing the IP protocol (TCP = 6, UDP = 17). If not specified, the default is All. Valid values 0 to 255”
- Parameters:
protocol- new value ofprotocolfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theprotocolfield changed
-
getRemoteAddressRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getRemoteAddressRanges()
“List of tokens specifying the remote addresses covered by the rule. Tokens are case insensitive. Default is any address. Valid tokens include:<ul><li>"*" indicates any remote address. If present, this must be the only token included.< /li><li>"Defaultgateway"</li><li>"DHCP"</li><li>"DNS"</li><li>"WINS"</li><li>" Intranet" (supported on Windows versions 1809+)</li><li>"RmtIntranet" (supported on Windows versions 1809+)</li><li>"Internet" (supported on Windows versions 1809+)</li><li>"Ply2Renders" (supported on Windows versions 1809+)</li><li>" LocalSubnet" indicates any local address on the local subnet.</li><li>A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.</li><li>A valid IPv6 address.</li><li>An IPv4 address range in the format of "start address - end address" with no spaces included.</li><li>An IPv6 address range in the format of "start address - end address" with no spaces included.</li></ul>”- Returns:
- property remoteAddressRanges
-
getRemoteAddressRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getRemoteAddressRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)
“List of tokens specifying the remote addresses covered by the rule. Tokens are case insensitive. Default is any address. Valid tokens include:<ul><li>"*" indicates any remote address. If present, this must be the only token included.< /li><li>"Defaultgateway"</li><li>"DHCP"</li><li>"DNS"</li><li>"WINS"</li><li>" Intranet" (supported on Windows versions 1809+)</li><li>"RmtIntranet" (supported on Windows versions 1809+)</li><li>"Internet" (supported on Windows versions 1809+)</li><li>"Ply2Renders" (supported on Windows versions 1809+)</li><li>" LocalSubnet" indicates any local address on the local subnet.</li><li>A subnet can be specified using either the subnet mask or network prefix notation. If neither a subnet mask nor a network prefix is specified, the subnet mask defaults to 255.255.255.255.</li><li>A valid IPv6 address.</li><li>An IPv4 address range in the format of "start address - end address" with no spaces included.</li><li>An IPv6 address range in the format of "start address - end address" with no spaces included.</li></ul>”- Parameters:
options- specify connect and read timeouts- Returns:
- property remoteAddressRanges
-
getRemotePortRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getRemotePortRanges()
“List of remote port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”- Returns:
- property remotePortRanges
-
getRemotePortRanges
public com.github.davidmoten.odata.client.CollectionPage<String> getRemotePortRanges(com.github.davidmoten.odata.client.HttpRequestOptions options)
“List of remote port ranges. For example, "100-120", "200", "300-320". If not specified, the default is All.”- Parameters:
options- specify connect and read timeouts- Returns:
- property remotePortRanges
-
getServiceName
public Optional<String> getServiceName()
“The name used in cases when a service, not an application, is sending or receiving traffic.”- Returns:
- property serviceName
-
withServiceName
public WindowsFirewallRule withServiceName(String serviceName)
Returns an immutable copy ofthiswith just theserviceNamefield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The name used in cases when a service, not an application, is sending or receiving traffic.”
- Parameters:
serviceName- new value ofserviceNamefield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theserviceNamefield changed
-
getTrafficDirection
public Optional<WindowsFirewallRuleTrafficDirectionType> getTrafficDirection()
“The traffic direction that the rule is enabled for. If not specified, the default is Out.”- Returns:
- property trafficDirection
-
withTrafficDirection
public WindowsFirewallRule withTrafficDirection(WindowsFirewallRuleTrafficDirectionType trafficDirection)
Returns an immutable copy ofthiswith just thetrafficDirectionfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“The traffic direction that the rule is enabled for. If not specified, the default is Out.”
- Parameters:
trafficDirection- new value oftrafficDirectionfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thetrafficDirectionfield changed
-
withUnmappedField
public WindowsFirewallRule withUnmappedField(String name, String value)
-
getUnmappedFields
public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
- Specified by:
getUnmappedFieldsin interfacecom.github.davidmoten.odata.client.ODataType
-
postInject
public void postInject(boolean addKeysToContextPath)
- Specified by:
postInjectin interfacecom.github.davidmoten.odata.client.ODataType
-
builder
public static WindowsFirewallRule.Builder builder()
Returns a builder which is used to create a new instance of this class (given that this class is immutable).- Returns:
- a new Builder for this class
-
-