Class RouteProperties


  • public final class RouteProperties
    extends Object
    The properties of a routing rule that your IoT hub uses to route messages to endpoints.
    • Constructor Detail

      • RouteProperties

        public RouteProperties()
    • Method Detail

      • name

        public String name()
        Get the name property: The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
        Returns:
        the name value.
      • withName

        public RouteProperties withName​(String name)
        Set the name property: The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
        Parameters:
        name - the name value to set.
        Returns:
        the RouteProperties object itself.
      • source

        public RoutingSource source()
        Get the source property: The source that the routing rule is to be applied to, such as DeviceMessages.
        Returns:
        the source value.
      • withSource

        public RouteProperties withSource​(RoutingSource source)
        Set the source property: The source that the routing rule is to be applied to, such as DeviceMessages.
        Parameters:
        source - the source value to set.
        Returns:
        the RouteProperties object itself.
      • condition

        public String condition()
        Get the condition property: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
        Returns:
        the condition value.
      • withCondition

        public RouteProperties withCondition​(String condition)
        Set the condition property: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
        Parameters:
        condition - the condition value to set.
        Returns:
        the RouteProperties object itself.
      • endpointNames

        public List<String> endpointNames()
        Get the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
        Returns:
        the endpointNames value.
      • withEndpointNames

        public RouteProperties withEndpointNames​(List<String> endpointNames)
        Set the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
        Parameters:
        endpointNames - the endpointNames value to set.
        Returns:
        the RouteProperties object itself.
      • isEnabled

        public boolean isEnabled()
        Get the isEnabled property: Used to specify whether a route is enabled.
        Returns:
        the isEnabled value.
      • withIsEnabled

        public RouteProperties withIsEnabled​(boolean isEnabled)
        Set the isEnabled property: Used to specify whether a route is enabled.
        Parameters:
        isEnabled - the isEnabled value to set.
        Returns:
        the RouteProperties object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.