Class EventHubEventSourceCreationProperties


public final class EventHubEventSourceCreationProperties extends EventHubEventSourceCommonProperties
Properties of the EventHub event source that are required on create or update requests.
  • Constructor Details

    • EventHubEventSourceCreationProperties

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

    • sharedAccessKey

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

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

      public EventHubEventSourceCreationProperties withServiceBusNamespace(String serviceBusNamespace)
      Set the serviceBusNamespace property: The name of the service bus that contains the event hub.
      Overrides:
      withServiceBusNamespace in class EventHubEventSourceCommonProperties
      Parameters:
      serviceBusNamespace - the serviceBusNamespace value to set.
      Returns:
      the EventHubEventSourceCommonProperties object itself.
    • withEventHubName

      public EventHubEventSourceCreationProperties withEventHubName(String eventHubName)
      Set the eventHubName property: The name of the event hub.
      Overrides:
      withEventHubName in class EventHubEventSourceCommonProperties
      Parameters:
      eventHubName - the eventHubName value to set.
      Returns:
      the EventHubEventSourceCommonProperties object itself.
    • withConsumerGroupName

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

      public EventHubEventSourceCreationProperties withKeyName(String keyName)
      Set the keyName property: The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access policies for this key must grant 'Listen' permissions to the event hub.
      Overrides:
      withKeyName in class EventHubEventSourceCommonProperties
      Parameters:
      keyName - the keyName value to set.
      Returns:
      the EventHubEventSourceCommonProperties object itself.
    • withEventSourceResourceId

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

      public EventHubEventSourceCreationProperties 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 EventHubEventSourceCommonProperties
      Parameters:
      timestampPropertyName - the timestampPropertyName value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • withLocalTimestamp

      public EventHubEventSourceCreationProperties 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 EventHubEventSourceCommonProperties
      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 EventHubEventSourceCommonProperties
      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 EventHubEventSourceCommonProperties
      Parameters:
      time - the time value to set.
      Returns:
      the EventSourceCommonProperties object itself.
    • validate

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