Package com.nettoolkit.dashboards
Class StartDurationRequest
java.lang.Object
com.nettoolkit.internal.request.BaseApiRequest
com.nettoolkit.internal.request.PostRequest
com.nettoolkit.dashboards.StartDurationRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalValues(JSONObject jsonAdditionalValues) Sets the duration start additional values JSON.additionalValues(String strAdditionalValuesJson) Sets the duration start additional values JSON string.Sets the channel for this duration by ID.channelName(String strChannelName) Sets the channel for this duration by name.protected HttpContentTypeprotected StringgetPath()send()Sends the request.timestamp(OffsetDateTime timestamp) Sets the duration start 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
-
StartDurationRequest
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein classPostRequest
-
getPath
- Specified by:
getPathin classBaseApiRequest
-
channelName
Sets the channel for this duration by name. required unless channel ID is given- Parameters:
strChannelName- the channel name- Returns:
- this
-
channelId
Sets the channel for this duration by ID. required unless channel name is given- Parameters:
channelId- the channel ID- Returns:
- this
-
timestamp
Sets the duration start time. By default, uses current time.- Parameters:
timestamp- the start time- Returns:
- this
-
additionalValues
Sets the duration start additional values JSON.- Parameters:
jsonAdditionalValues- the additional values JSON- Returns:
- this
-
additionalValues
Sets the duration start 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:
- a duration object
- Throws:
NetToolKitException
-