{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.QPXExpress.Trips.Search
(
TripsSearchResource
, tripsSearch
, TripsSearch
, tsPayload
) where
import Network.Google.Prelude
import Network.Google.QPXExpress.Types
type TripsSearchResource =
"qpxExpress" :>
"v1" :>
"trips" :>
"search" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TripsSearchRequest :>
Post '[JSON] TripsSearchResponse
newtype TripsSearch = TripsSearch'
{ _tsPayload :: TripsSearchRequest
} deriving (Eq,Show,Data,Typeable,Generic)
tripsSearch
:: TripsSearchRequest
-> TripsSearch
tripsSearch pTsPayload_ =
TripsSearch'
{ _tsPayload = pTsPayload_
}
tsPayload :: Lens' TripsSearch TripsSearchRequest
tsPayload
= lens _tsPayload (\ s a -> s{_tsPayload = a})
instance GoogleRequest TripsSearch where
type Rs TripsSearch = TripsSearchResponse
type Scopes TripsSearch = '[]
requestClient TripsSearch'{..}
= go (Just AltJSON) _tsPayload qPXExpressService
where go
= buildClient (Proxy :: Proxy TripsSearchResource)
mempty