Class StartDurationRequest


public class StartDurationRequest extends PostRequest
  • Constructor Details

  • Method Details

    • getContentType

      protected HttpContentType getContentType()
      Specified by:
      getContentType in class PostRequest
    • getPath

      protected String getPath()
      Specified by:
      getPath in class BaseApiRequest
    • channelName

      public StartDurationRequest channelName(String strChannelName)
      Sets the channel for this duration by name. required unless channel ID is given
      Parameters:
      strChannelName - the channel name
      Returns:
      this
    • channelId

      public StartDurationRequest channelId(UUID channelId)
      Sets the channel for this duration by ID. required unless channel name is given
      Parameters:
      channelId - the channel ID
      Returns:
      this
    • timestamp

      public StartDurationRequest timestamp(OffsetDateTime timestamp)
      Sets the duration start time. By default, uses current time.
      Parameters:
      timestamp - the start time
      Returns:
      this
    • additionalValues

      public StartDurationRequest additionalValues(JSONObject jsonAdditionalValues)
      Sets the duration start additional values JSON.
      Parameters:
      jsonAdditionalValues - the additional values JSON
      Returns:
      this
    • additionalValues

      public StartDurationRequest additionalValues(String strAdditionalValuesJson)
      Sets the duration start additional values JSON string. This is an escape hatch for situations where it's inconvenient to use the provided JSONObject. If you use this function, you must ensure that the given string represents a valid JSON object.
      Parameters:
      strAdditionalValuesJson - the additional values JSON string
      Returns:
      this
    • send

      public Duration send() throws NetToolKitException
      Sends the request.
      Returns:
      a duration object
      Throws:
      NetToolKitException