Class IoTHubEventSourceCreationProperties


public final class IoTHubEventSourceCreationProperties extends IoTHubEventSourceCommonProperties
Properties of the IoTHub event source that are required on create or update requests.
  • Constructor Details

    • IoTHubEventSourceCreationProperties

      public IoTHubEventSourceCreationProperties()
      Creates an instance of IoTHubEventSourceCreationProperties class.
  • Method Details

    • sharedAccessKey

      public String sharedAccessKey()
      Get the sharedAccessKey property: The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses.
      Returns:
      the sharedAccessKey value.
    • withSharedAccessKey

      public IoTHubEventSourceCreationProperties withSharedAccessKey(String sharedAccessKey)
      Set the sharedAccessKey property: The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses.
      Parameters:
      sharedAccessKey - the sharedAccessKey value to set.
      Returns:
      the IoTHubEventSourceCreationProperties object itself.
    • withIotHubName

      public IoTHubEventSourceCreationProperties withIotHubName(String iotHubName)
      Set the iotHubName property: The name of the iot hub.
      Overrides:
      withIotHubName in class IoTHubEventSourceCommonProperties
      Parameters:
      iotHubName - the iotHubName value to set.
      Returns:
      the IoTHubEventSourceCommonProperties object itself.
    • withConsumerGroupName

      public IoTHubEventSourceCreationProperties withConsumerGroupName(String consumerGroupName)
      Set the consumerGroupName property: The name of the iot hub's consumer group that holds the partitions from which events will be read.
      Overrides:
      withConsumerGroupName in class IoTHubEventSourceCommonProperties
      Parameters:
      consumerGroupName - the consumerGroupName value to set.
      Returns:
      the IoTHubEventSourceCommonProperties object itself.
    • withKeyName

      public IoTHubEventSourceCreationProperties withKeyName(String keyName)
      Set the keyName property: The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. This shared access policy key must grant 'service connect' permissions to the iot hub.
      Overrides:
      withKeyName in class IoTHubEventSourceCommonProperties
      Parameters:
      keyName - the keyName value to set.
      Returns:
      the IoTHubEventSourceCommonProperties object itself.
    • withEventSourceResourceId

      public IoTHubEventSourceCreationProperties withEventSourceResourceId(String eventSourceResourceId)
      Set the eventSourceResourceId property: The resource id of the event source in Azure Resource Manager.
      Overrides:
      withEventSourceResourceId in class IoTHubEventSourceCommonProperties
      Parameters:
      eventSourceResourceId - the eventSourceResourceId value to set.
      Returns:
      the AzureEventSourceProperties object itself.
    • withTimestampPropertyName

      public IoTHubEventSourceCreationProperties withTimestampPropertyName(String timestampPropertyName)
      Set the timestampPropertyName property: The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used.
      Overrides:
      withTimestampPropertyName in class IoTHubEventSourceCommonProperties
      Parameters:
      timestampPropertyName - the timestampPropertyName value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • withLocalTimestamp

      public IoTHubEventSourceCreationProperties withLocalTimestamp(LocalTimestamp localTimestamp)
      Set the localTimestamp property: An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used and the corresponding timezone offset information. If a value isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the events.
      Overrides:
      withLocalTimestamp in class IoTHubEventSourceCommonProperties
      Parameters:
      localTimestamp - the localTimestamp value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • withType

      Set the type property: The type of the ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime".
      Overrides:
      withType in class IoTHubEventSourceCommonProperties
      Parameters:
      type - the type value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • withTime

      Set the time property: ISO8601 UTC datetime with seconds precision (milliseconds are optional), specifying the date and time that will be the starting point for Events to be consumed.
      Overrides:
      withTime in class IoTHubEventSourceCommonProperties
      Parameters:
      time - the time value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • validate

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