Class RouteProperties
- java.lang.Object
-
- com.azure.resourcemanager.iothub.models.RouteProperties
-
public final class RouteProperties extends Object
The properties of a routing rule that your IoT hub uses to route messages to endpoints.
-
-
Constructor Summary
Constructors Constructor Description RouteProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
condition()
Get the condition property: The condition that is evaluated to apply the routing rule.List<String>
endpointNames()
Get the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed.boolean
isEnabled()
Get the isEnabled property: Used to specify whether a route is enabled.String
name()
Get the name property: The name of the route.RoutingSource
source()
Get the source property: The source that the routing rule is to be applied to, such as DeviceMessages.void
validate()
Validates the instance.RouteProperties
withCondition(String condition)
Set the condition property: The condition that is evaluated to apply the routing rule.RouteProperties
withEndpointNames(List<String> endpointNames)
Set the endpointNames property: The list of endpoints to which messages that satisfy the condition are routed.RouteProperties
withIsEnabled(boolean isEnabled)
Set the isEnabled property: Used to specify whether a route is enabled.RouteProperties
withName(String name)
Set the name property: The name of the route.RouteProperties
withSource(RoutingSource source)
Set the source property: The source that the routing rule is to be applied to, such as DeviceMessages.
-
-
-
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.
-
-