com.pulumi.azure.iot.outputs.IoTHubRoute Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.iot.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class IoTHubRoute {
/**
* @return The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>.
*
*/
private @Nullable String condition;
/**
* @return Used to specify whether a route is enabled.
*
*/
private Boolean enabled;
/**
* @return The list of endpoints to which messages that satisfy the condition are routed.
*
*/
private List endpointNames;
/**
* @return The name of the route.
*
*/
private String name;
/**
* @return The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`.
*
*/
private String source;
private IoTHubRoute() {}
/**
* @return The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>.
*
*/
public Optional condition() {
return Optional.ofNullable(this.condition);
}
/**
* @return Used to specify whether a route is enabled.
*
*/
public Boolean enabled() {
return this.enabled;
}
/**
* @return The list of endpoints to which messages that satisfy the condition are routed.
*
*/
public List endpointNames() {
return this.endpointNames;
}
/**
* @return The name of the route.
*
*/
public String name() {
return this.name;
}
/**
* @return The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`.
*
*/
public String source() {
return this.source;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(IoTHubRoute defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String condition;
private Boolean enabled;
private List endpointNames;
private String name;
private String source;
public Builder() {}
public Builder(IoTHubRoute defaults) {
Objects.requireNonNull(defaults);
this.condition = defaults.condition;
this.enabled = defaults.enabled;
this.endpointNames = defaults.endpointNames;
this.name = defaults.name;
this.source = defaults.source;
}
@CustomType.Setter
public Builder condition(@Nullable String condition) {
this.condition = condition;
return this;
}
@CustomType.Setter
public Builder enabled(Boolean enabled) {
if (enabled == null) {
throw new MissingRequiredPropertyException("IoTHubRoute", "enabled");
}
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder endpointNames(List endpointNames) {
if (endpointNames == null) {
throw new MissingRequiredPropertyException("IoTHubRoute", "endpointNames");
}
this.endpointNames = endpointNames;
return this;
}
public Builder endpointNames(String... endpointNames) {
return endpointNames(List.of(endpointNames));
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("IoTHubRoute", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder source(String source) {
if (source == null) {
throw new MissingRequiredPropertyException("IoTHubRoute", "source");
}
this.source = source;
return this;
}
public IoTHubRoute build() {
final var _resultValue = new IoTHubRoute();
_resultValue.condition = condition;
_resultValue.enabled = enabled;
_resultValue.endpointNames = endpointNames;
_resultValue.name = name;
_resultValue.source = source;
return _resultValue;
}
}
}