Class EndDurationRequest


public class EndDurationRequest 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
    • durationId

      public EndDurationRequest durationId(UUID durationId)
      Sets the duration to end. required unless channel ID/name provided
      Parameters:
      durationId - the duration ID
      Returns:
      this
    • channelName

      public EndDurationRequest channelName(String strChannelName)
      Sets the duration to end by channel name.
      Parameters:
      strChannelName - the channel name
      Returns:
      this
    • channelId

      public EndDurationRequest channelId(UUID channelId)
      Sets the duration to end by channel ID.
      Parameters:
      channelId - the channel ID
      Returns:
      this
    • timestamp

      public EndDurationRequest timestamp(OffsetDateTime timestamp)
      Sets the end time. By default, uses current time.
      Parameters:
      timestamp - the end time
      Returns:
      this
    • failure

      public EndDurationRequest failure(boolean bIsFailure)
      Sets the end failure status. If true, this indicates that this duration ended in failure.
      Parameters:
      bIsFailure - the failure status
      Returns:
      this
    • additionalValues

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

      public EndDurationRequest additionalValues(String strAdditionalValuesJson)
      Sets the duration end 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:
      the duration that was ended
      Throws:
      NetToolKitException