Class TSPointsProtoResponseParser
- java.lang.Object
-
- com.cognite.client.servicesV1.response.TSPointsProtoResponseParser
-
- All Implemented Interfaces:
ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>
public abstract class TSPointsProtoResponseParser extends Object implements ResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTSPointsProtoResponseParser.Builder
-
Constructor Summary
Constructors Constructor Description TSPointsProtoResponseParser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TSPointsProtoResponseParser.Builderbuilder()com.google.common.collect.ImmutableList<com.cognite.v1.timeseries.proto.DataPointListItem>extractItems(byte[] payload)Extract the results items from a response body.Optional<String>extractNextCursor(byte[] payload)Extracts the start timestamp for the next iteration of timestamp points.abstract RequestgetRequest()abstract TSPointsProtoResponseParser.BuildertoBuilder()TSPointsProtoResponseParserwithRequest(Request parameters)
-
-
-
Method Detail
-
builder
public static TSPointsProtoResponseParser.Builder builder()
-
toBuilder
public abstract TSPointsProtoResponseParser.Builder toBuilder()
-
getRequest
public abstract Request getRequest()
-
withRequest
public TSPointsProtoResponseParser withRequest(Request parameters)
-
extractNextCursor
public Optional<String> extractNextCursor(byte[] payload) throws Exception
Extracts the start timestamp for the next iteration of timestamp points. The cursor is a json object with each TS *externalId* (or id, if no externalId exists) mapped to the next *start* timestamp.- Specified by:
extractNextCursorin interfaceResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>- Parameters:
payload- The response body- Returns:
- Throws:
ExceptionIOException
-
extractItems
public com.google.common.collect.ImmutableList<com.cognite.v1.timeseries.proto.DataPointListItem> extractItems(byte[] payload) throws ExceptionExtract the results items from a response body.- Specified by:
extractItemsin interfaceResponseParser<com.cognite.v1.timeseries.proto.DataPointListItem>- Parameters:
payload- The reponse body- Returns:
- Throws:
Exception
-
-