Class GetTripsRequest
-
- All Implemented Interfaces:
public final class GetTripsRequest extends DriveMotionRequest<GetTripsRequest, GetTripsResponse>
Request class to get trips by time range. Create an instance through GetTripsRequest.Builder.build. It supports paging query (not required) for trips within a certain time range.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGetTripsRequest.BuilderThis builder is used to create a instance of GetTripsRequest, used for Trip Analytics Api to get trips by time range
-
Field Summary
Fields Modifier and Type Field Description private final DatestartDateprivate final DateendDateprivate final StringassetIdprivate final Integerlimitprivate final Integeroffsetprivate final TripSortTypesortByprivate final Array<TransportationMode>transportationModesprivate final BooleanexcludeTripEventsprivate final TripSelectionStatustripSelectionStatusprivate final ConnectionModeconnectionModeprivate final AssetContextassetContext
-
Constructor Summary
Constructors Constructor Description GetTripsRequest(GetTripsRequest.Builder builder)
-
Method Summary
Modifier and Type Method Description final DategetStartDate()final DategetEndDate()final StringgetAssetId()Vehicle Identification which wants to be requested, null for request all trips. final IntegergetLimit()Maximum number of queries per page. final IntegergetOffset()Please note that offset is a record index. final TripSortTypegetSortBy()Trips sort order. final Array<TransportationMode>getTransportationModes()Trips transportation modes which request. final BooleangetExcludeTripEvents()Mark need exclude trip's events in response or not. final TripSelectionStatusgetTripSelectionStatus()Represents the status of the trip selection, which can be either valid or duplicate. StringtoString()final static GetTripsRequest.Builderbuilder(Call<GetTripsRequest, GetTripsResponse> call, ConnectionMode connectionMode)Build a GetTripsRequest.Builder instance used for setting request condition final static GetTripsRequest.Builderbuilder(Call<GetTripsRequest, GetTripsResponse> call)Build a GetTripsRequest.Builder instance used for setting request condition -
-
Constructor Detail
-
GetTripsRequest
GetTripsRequest(GetTripsRequest.Builder builder)
-
-
Method Detail
-
getStartDate
final Date getStartDate()
-
getEndDate
final Date getEndDate()
-
getAssetId
final String getAssetId()
Vehicle Identification which wants to be requested, null for request all trips.
-
getLimit
final Integer getLimit()
Maximum number of queries per page. Set the value through GetTripsRequest.Builder.withLimit. Default value 20 and max limit is 100.
-
getOffset
final Integer getOffset()
Please note that offset is a record index. Set the value through GetTripsRequest.Builder.withOffset A query using offset and limit means that starting from "offset" and querying "limit" records, the result will include the records located in "offset". offset is the index of object that defines your place in the list, starting with 0
-
getSortBy
final TripSortType getSortBy()
Trips sort order. Set the value through GetTripsRequest.Builder.withSortBy Default value is TripSortType.TRIP_START_TIME_DESC
-
getTransportationModes
final Array<TransportationMode> getTransportationModes()
Trips transportation modes which request. Set the value through GetTripsRequest.Builder.withTransportationModes Default value is null for all type of trips.
-
getExcludeTripEvents
final Boolean getExcludeTripEvents()
Mark need exclude trip's events in response or not. Set the value through GetTripsRequest.Builder.withExcludeTripEvents Default value is true so trip events are not included.
-
getTripSelectionStatus
final TripSelectionStatus getTripSelectionStatus()
Represents the status of the trip selection, which can be either valid or duplicate.
-
builder
@JvmOverloads() final static GetTripsRequest.Builder builder(Call<GetTripsRequest, GetTripsResponse> call, ConnectionMode connectionMode)
Build a GetTripsRequest.Builder instance used for setting request condition
- Parameters:
call- Call- Returns:
GetTripsRequest.Builder instance
-
builder
@JvmOverloads() final static GetTripsRequest.Builder builder(Call<GetTripsRequest, GetTripsResponse> call)
Build a GetTripsRequest.Builder instance used for setting request condition
- Parameters:
call- Call- Returns:
GetTripsRequest.Builder instance
-
-
-
-