IoTHubStreamInputDataSource Class

public final class IoTHubStreamInputDataSource
extends StreamInputDataSource

Describes an IoT Hub input data source that contains stream data.

Constructor Summary

Constructor Description
IoTHubStreamInputDataSource()

Creates an instance of IoTHubStreamInputDataSource class.

Method Summary

Modifier and Type Method and Description
String consumerGroupName()

Get the consumerGroupName property: The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub.

String endpoint()

Get the endpoint property: The IoT Hub endpoint to connect to (ie.

static IoTHubStreamInputDataSource fromJson(JsonReader jsonReader)

Reads an instance of IoTHubStreamInputDataSource from the JsonReader.

String iotHubNamespace()

Get the iotHubNamespace property: The name or the URI of the IoT Hub.

String sharedAccessPolicyKey()

Get the sharedAccessPolicyKey property: The shared access policy key for the specified shared access policy.

String sharedAccessPolicyName()

Get the sharedAccessPolicyName property: The shared access policy name for the IoT Hub.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Indicates the type of input data source containing stream data.

void validate()

Validates the instance.

IoTHubStreamInputDataSource withConsumerGroupName(String consumerGroupName)

Set the consumerGroupName property: The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub.

IoTHubStreamInputDataSource withEndpoint(String endpoint)

Set the endpoint property: The IoT Hub endpoint to connect to (ie.

IoTHubStreamInputDataSource withIotHubNamespace(String iotHubNamespace)

Set the iotHubNamespace property: The name or the URI of the IoT Hub.

IoTHubStreamInputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey)

Set the sharedAccessPolicyKey property: The shared access policy key for the specified shared access policy.

IoTHubStreamInputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName)

Set the sharedAccessPolicyName property: The shared access policy name for the IoT Hub.

Methods inherited from StreamInputDataSource

Methods inherited from java.lang.Object

Constructor Details

IoTHubStreamInputDataSource

public IoTHubStreamInputDataSource()

Creates an instance of IoTHubStreamInputDataSource class.

Method Details

consumerGroupName

public String consumerGroupName()

Get the consumerGroupName property: The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub’s default consumer group.

Returns:

the consumerGroupName value.

endpoint

public String endpoint()

Get the endpoint property: The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).

Returns:

the endpoint value.

fromJson

public static IoTHubStreamInputDataSource fromJson(JsonReader jsonReader)

Reads an instance of IoTHubStreamInputDataSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IoTHubStreamInputDataSource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the IoTHubStreamInputDataSource.

iotHubNamespace

public String iotHubNamespace()

Get the iotHubNamespace property: The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.

Returns:

the iotHubNamespace value.

sharedAccessPolicyKey

public String sharedAccessPolicyKey()

Get the sharedAccessPolicyKey property: The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.

Returns:

the sharedAccessPolicyKey value.

sharedAccessPolicyName

public String sharedAccessPolicyName()

Get the sharedAccessPolicyName property: The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.

Returns:

the sharedAccessPolicyName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

IoTHubStreamInputDataSource.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

Overrides:

IoTHubStreamInputDataSource.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

IoTHubStreamInputDataSource.validate()

withConsumerGroupName

public IoTHubStreamInputDataSource withConsumerGroupName(String consumerGroupName)

Set the consumerGroupName property: The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub’s default consumer group.

Parameters:

consumerGroupName - the consumerGroupName value to set.

Returns:

the IoTHubStreamInputDataSource object itself.

withEndpoint

public IoTHubStreamInputDataSource withEndpoint(String endpoint)

Set the endpoint property: The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).

Parameters:

endpoint - the endpoint value to set.

Returns:

the IoTHubStreamInputDataSource object itself.

withIotHubNamespace

public IoTHubStreamInputDataSource withIotHubNamespace(String iotHubNamespace)

Set the iotHubNamespace property: The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.

Parameters:

iotHubNamespace - the iotHubNamespace value to set.

Returns:

the IoTHubStreamInputDataSource object itself.

withSharedAccessPolicyKey

public IoTHubStreamInputDataSource withSharedAccessPolicyKey(String sharedAccessPolicyKey)

Set the sharedAccessPolicyKey property: The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.

Parameters:

sharedAccessPolicyKey - the sharedAccessPolicyKey value to set.

Returns:

the IoTHubStreamInputDataSource object itself.

withSharedAccessPolicyName

public IoTHubStreamInputDataSource withSharedAccessPolicyName(String sharedAccessPolicyName)

Set the sharedAccessPolicyName property: The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.

Parameters:

sharedAccessPolicyName - the sharedAccessPolicyName value to set.

Returns:

the IoTHubStreamInputDataSource object itself.

Applies to