Class 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.”
    • Constructor Detail

      • WindowsFirewallRule

        protected WindowsFirewallRule()
    • Method Detail

      • odataTypeName

        public String odataTypeName()
        Specified by:
        odataTypeName in interface com.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 of this with just the action field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.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 of action field (as defined in service metadata)
        Returns:
        immutable copy of this with just the action field changed
      • getDescription

        public Optional<String> getDescription()
        “The description of the rule.”
        Returns:
        property description
      • withDescription

        public WindowsFirewallRule withDescription​(String description)
        Returns an immutable copy of this with just the description field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “The description of the rule.”

        Parameters:
        description - new value of description field (as defined in service metadata)
        Returns:
        immutable copy of this with just the description field 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 of this with just the displayName field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of displayName field (as defined in service metadata)
        Returns:
        immutable copy of this with just the displayName field 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 of this with just the edgeTraversal field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of edgeTraversal field (as defined in service metadata)
        Returns:
        immutable copy of this with just the edgeTraversal field 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 of this with just the filePath field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.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 of filePath field (as defined in service metadata)
        Returns:
        immutable copy of this with just the filePath field changed
      • withInterfaceTypes

        public WindowsFirewallRule withInterfaceTypes​(WindowsFirewallRuleInterfaceTypes interfaceTypes)
        Returns an immutable copy of this with just the interfaceTypes field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of interfaceTypes field (as defined in service metadata)
        Returns:
        immutable copy of this with just the interfaceTypes field 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:&lt;ul&gt;&lt;li&gt;"*" indicates any local address. If present, this must be the only token included.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        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:&lt;ul&gt;&lt;li&gt;"*" indicates any local address. If present, this must be the only token included.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        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 of this with just the localUserAuthorizations field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.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 of localUserAuthorizations field (as defined in service metadata)
        Returns:
        immutable copy of this with just the localUserAuthorizations field 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 of this with just the packageFamilyName field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of packageFamilyName field (as defined in service metadata)
        Returns:
        immutable copy of this with just the packageFamilyName field changed
      • withProfileTypes

        public WindowsFirewallRule withProfileTypes​(WindowsFirewallRuleNetworkProfileTypes profileTypes)
        Returns an immutable copy of this with just the profileTypes field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of profileTypes field (as defined in service metadata)
        Returns:
        immutable copy of this with just the profileTypes field 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 of this with just the protocol field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.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 of protocol field (as defined in service metadata)
        Returns:
        immutable copy of this with just the protocol field 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:&lt;ul&gt;&lt;li&gt;"*" indicates any remote address. If present, this must be the only token included.&lt; /li&gt;&lt;li&gt;"Defaultgateway"&lt;/li&gt;&lt;li&gt;"DHCP"&lt;/li&gt;&lt;li&gt;"DNS"&lt;/li&gt;&lt;li&gt;"WINS"&lt;/li&gt;&lt;li&gt;" Intranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"RmtIntranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Internet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Ply2Renders" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;" LocalSubnet" indicates any local address on the local subnet.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        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:&lt;ul&gt;&lt;li&gt;"*" indicates any remote address. If present, this must be the only token included.&lt; /li&gt;&lt;li&gt;"Defaultgateway"&lt;/li&gt;&lt;li&gt;"DHCP"&lt;/li&gt;&lt;li&gt;"DNS"&lt;/li&gt;&lt;li&gt;"WINS"&lt;/li&gt;&lt;li&gt;" Intranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"RmtIntranet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Internet" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;"Ply2Renders" (supported on Windows versions 1809+)&lt;/li&gt;&lt;li&gt;" LocalSubnet" indicates any local address on the local subnet.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;A valid IPv6 address.&lt;/li&gt;&lt;li&gt;An IPv4 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;li&gt;An IPv6 address range in the format of "start address - end address" with no spaces included.&lt;/li&gt;&lt;/ul&gt;”
        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 of this with just the serviceName field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of serviceName field (as defined in service metadata)
        Returns:
        immutable copy of this with just the serviceName field changed
      • withTrafficDirection

        public WindowsFirewallRule withTrafficDirection​(WindowsFirewallRuleTrafficDirectionType trafficDirection)
        Returns an immutable copy of this with just the trafficDirection field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. 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 of trafficDirection field (as defined in service metadata)
        Returns:
        immutable copy of this with just the trafficDirection field changed
      • getUnmappedFields

        public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
        Specified by:
        getUnmappedFields in interface com.github.davidmoten.odata.client.ODataType
      • postInject

        public void postInject​(boolean addKeysToContextPath)
        Specified by:
        postInject in interface com.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