Package com.nettoolkit.dashboards
Class EndDurationRequest
java.lang.Object
com.nettoolkit.internal.request.BaseApiRequest
com.nettoolkit.internal.request.PostRequest
com.nettoolkit.dashboards.EndDurationRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalValues(JSONObject jsonAdditionalValues) Sets the duration end additional values JSON.additionalValues(String strAdditionalValuesJson) Sets the duration end additional values JSON string.Sets the duration to end by channel ID.channelName(String strChannelName) Sets the duration to end by channel name.durationId(UUID durationId) Sets the duration to end.failure(boolean bIsFailure) Sets the end failure status.protected HttpContentTypeprotected StringgetPath()send()Sends the request.timestamp(OffsetDateTime timestamp) Sets the end time.Methods inherited from class com.nettoolkit.internal.request.PostRequest
getHttpMethod, newHttpRequestBuilder, serializeParametersMethods inherited from class com.nettoolkit.internal.request.BaseApiRequest
getClient, getParameters, toHttpRequest, toString
-
Constructor Details
-
EndDurationRequest
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein classPostRequest
-
getPath
- Specified by:
getPathin classBaseApiRequest
-
durationId
Sets the duration to end. required unless channel ID/name provided- Parameters:
durationId- the duration ID- Returns:
- this
-
channelName
Sets the duration to end by channel name.- Parameters:
strChannelName- the channel name- Returns:
- this
-
channelId
Sets the duration to end by channel ID.- Parameters:
channelId- the channel ID- Returns:
- this
-
timestamp
Sets the end time. By default, uses current time.- Parameters:
timestamp- the end time- Returns:
- this
-
failure
Sets the end failure status. If true, this indicates that this duration ended in failure.- Parameters:
bIsFailure- the failure status- Returns:
- this
-
additionalValues
Sets the duration end additional values JSON.- Parameters:
jsonAdditionalValues- the additional values JSON- Returns:
- this
-
additionalValues
Sets the duration end additional values JSON string. This is an escape hatch for situations where it's inconvenient to use the providedJSONObject. 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
Sends the request.- Returns:
- the duration that was ended
- Throws:
NetToolKitException
-