Copyright | (c) 2015-2016 Brendan Hay <brendan.g.hay@gmail.com> |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data AltJSON = AltJSON
- data AltMedia = AltMedia
- data Multipart = Multipart
- newtype OAuthScope = OAuthScope Text
- newtype AccessToken = AccessToken Text
- newtype RefreshToken = RefreshToken Text
- newtype ClientId = ClientId Text
- newtype ServiceId = ServiceId Text
- newtype Secret = Secret Text
- newtype MediaDownload a = MediaDownload a
- data MediaUpload a = MediaUpload a Body
- _Coerce :: (Coercible a b, Coercible b a) => Iso' a b
- _Default :: Monoid a => Iso' (Maybe a) a
- type Stream = ConduitM () ByteString (ResourceT IO) ()
- data Error
- = TransportError HttpException
- | SerializeError SerializeError
- | ServiceError ServiceError
- data SerializeError = SerializeError' {
- _serializeId :: !ServiceId
- _serializeHeaders :: [Header]
- _serializeStatus :: !Status
- _serializeMessage :: !String
- _serializeBody :: !(Maybe ByteString)
- data ServiceError = ServiceError' {
- _serviceId :: !ServiceId
- _serviceStatus :: !Status
- _serviceHeaders :: ![Header]
- _serviceBody :: !(Maybe ByteString)
- class AsError a where
- data ServiceConfig = ServiceConfig {
- _svcId :: !ServiceId
- _svcHost :: !ByteString
- _svcPath :: !Builder
- _svcPort :: !Int
- _svcSecure :: !Bool
- _svcTimeout :: !(Maybe Seconds)
- defaultService :: ServiceId -> ByteString -> ServiceConfig
- serviceHost :: Lens' ServiceConfig ByteString
- servicePort :: Lens' ServiceConfig Int
- servicePath :: Lens' ServiceConfig Builder
- serviceSecure :: Lens' ServiceConfig Bool
- serviceTimeout :: Lens' ServiceConfig (Maybe Seconds)
- data Body = Body !MediaType !RequestBody
- bodyContentType :: Lens' Body MediaType
- data Request = Request {
- _rqPath :: !Builder
- _rqQuery :: !(DList (ByteString, Maybe ByteString))
- _rqHeaders :: !(DList (HeaderName, ByteString))
- _rqBody :: ![Body]
- appendPath :: Request -> Builder -> Request
- appendPaths :: ToHttpApiData a => Request -> [a] -> Request
- appendQuery :: Request -> ByteString -> Maybe Text -> Request
- appendHeader :: Request -> HeaderName -> Maybe Text -> Request
- setBody :: Request -> [Body] -> Request
- data Client a = Client {
- _cliAccept :: !(Maybe MediaType)
- _cliMethod :: !Method
- _cliCheck :: !(Status -> Bool)
- _cliService :: !ServiceConfig
- _cliRequest :: !Request
- _cliResponse :: !(Stream -> ResourceT IO (Either (String, ByteString) a))
- clientService :: Lens' (Client a) ServiceConfig
- mime :: FromStream c a => Proxy c -> Method -> [Int] -> Request -> ServiceConfig -> Client a
- discard :: Method -> [Int] -> Request -> ServiceConfig -> Client ()
- client :: (Stream -> ResourceT IO (Either (String, ByteString) a)) -> Maybe MediaType -> Method -> [Int] -> Request -> ServiceConfig -> Client a
- class Accept c => ToBody c a where
- class Accept c => FromStream c a where
- class GoogleRequest a where
- class GoogleClient fn where
- data Captures (s :: Symbol) a
- data CaptureMode (s :: Symbol) (m :: Symbol) a
- data MultipartRelated (cs :: [*]) m
- sinkLBS :: Stream -> ResourceT IO ByteString
- buildText :: ToHttpApiData a => a -> Builder
- buildSymbol :: forall n proxy. KnownSymbol n => proxy n -> Builder
- byteSymbol :: forall n proxy. KnownSymbol n => proxy n -> ByteString
- newtype Seconds = Seconds Int
- seconds :: Seconds -> Int
- microseconds :: Seconds -> Int
- newtype FieldMask = FieldMask Text
Documentation
Instances
Eq AltJSON Source # | |
Ord AltJSON Source # | |
Read AltJSON Source # | |
Show AltJSON Source # | |
Generic AltJSON Source # | |
ToHttpApiData AltJSON Source # | |
Defined in Network.Google.Types toUrlPiece :: AltJSON -> Text # toEncodedUrlPiece :: AltJSON -> Builder # toHeader :: AltJSON -> ByteString # toQueryParam :: AltJSON -> Text # | |
type Rep AltJSON Source # | |
Instances
Eq AltMedia Source # | |
Ord AltMedia Source # | |
Defined in Network.Google.Types | |
Read AltMedia Source # | |
Show AltMedia Source # | |
Generic AltMedia Source # | |
ToHttpApiData AltMedia Source # | |
Defined in Network.Google.Types toUrlPiece :: AltMedia -> Text # toEncodedUrlPiece :: AltMedia -> Builder # toHeader :: AltMedia -> ByteString # toQueryParam :: AltMedia -> Text # | |
GoogleClient fn => GoogleClient (AltMedia :> fn) Source # | |
type Rep AltMedia Source # | |
type Fn (AltMedia :> fn) Source # | |
Instances
Eq Multipart Source # | |
Ord Multipart Source # | |
Defined in Network.Google.Types | |
Read Multipart Source # | |
Show Multipart Source # | |
Generic Multipart Source # | |
ToHttpApiData Multipart Source # | |
Defined in Network.Google.Types toUrlPiece :: Multipart -> Text # toEncodedUrlPiece :: Multipart -> Builder # toHeader :: Multipart -> ByteString # toQueryParam :: Multipart -> Text # | |
type Rep Multipart Source # | |
newtype OAuthScope Source #
An OAuth2 scope.
Instances
newtype AccessToken Source #
An OAuth2 access token.
Instances
newtype RefreshToken Source #
An OAuth2 refresh token.
Instances
A client identifier.
Instances
Eq ClientId Source # | |
Ord ClientId Source # | |
Defined in Network.Google.Types | |
Read ClientId Source # | |
Show ClientId Source # | |
IsString ClientId Source # | |
Defined in Network.Google.Types fromString :: String -> ClientId # | |
Generic ClientId Source # | |
FromJSON ClientId Source # | |
Defined in Network.Google.Types | |
ToJSON ClientId Source # | |
Defined in Network.Google.Types toEncoding :: ClientId -> Encoding # toJSONList :: [ClientId] -> Value # toEncodingList :: [ClientId] -> Encoding # | |
FromHttpApiData ClientId Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text ClientId # parseHeader :: ByteString -> Either Text ClientId # | |
ToHttpApiData ClientId Source # | |
Defined in Network.Google.Types toUrlPiece :: ClientId -> Text # toEncodedUrlPiece :: ClientId -> Builder # toHeader :: ClientId -> ByteString # toQueryParam :: ClientId -> Text # | |
type Rep ClientId Source # | |
Defined in Network.Google.Types |
A service identifier.
Instances
Eq ServiceId Source # | |
Ord ServiceId Source # | |
Defined in Network.Google.Types | |
Read ServiceId Source # | |
Show ServiceId Source # | |
IsString ServiceId Source # | |
Defined in Network.Google.Types fromString :: String -> ServiceId # | |
Generic ServiceId Source # | |
FromJSON ServiceId Source # | |
Defined in Network.Google.Types | |
ToJSON ServiceId Source # | |
Defined in Network.Google.Types toJSON :: ServiceId -> Value # toEncoding :: ServiceId -> Encoding # toJSONList :: [ServiceId] -> Value # toEncodingList :: [ServiceId] -> Encoding # | |
FromHttpApiData ServiceId Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text ServiceId # parseHeader :: ByteString -> Either Text ServiceId # | |
ToHttpApiData ServiceId Source # | |
Defined in Network.Google.Types toUrlPiece :: ServiceId -> Text # toEncodedUrlPiece :: ServiceId -> Builder # toHeader :: ServiceId -> ByteString # toQueryParam :: ServiceId -> Text # | |
type Rep ServiceId Source # | |
Defined in Network.Google.Types |
An opaque client secret.
Instances
Eq Secret Source # | |
Ord Secret Source # | |
Read Secret Source # | |
Show Secret Source # | |
IsString Secret Source # | |
Defined in Network.Google.Types fromString :: String -> Secret # | |
Generic Secret Source # | |
FromJSON Secret Source # | |
Defined in Network.Google.Types | |
ToJSON Secret Source # | |
Defined in Network.Google.Types toEncoding :: Secret -> Encoding # toJSONList :: [Secret] -> Value # toEncodingList :: [Secret] -> Encoding # | |
FromHttpApiData Secret Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text Secret # parseHeader :: ByteString -> Either Text Secret # | |
ToHttpApiData Secret Source # | |
Defined in Network.Google.Types toUrlPiece :: Secret -> Text # toEncodedUrlPiece :: Secret -> Builder # toHeader :: Secret -> ByteString # toQueryParam :: Secret -> Text # | |
type Rep Secret Source # | |
Defined in Network.Google.Types |
newtype MediaDownload a Source #
data MediaUpload a Source #
_Default :: Monoid a => Iso' (Maybe a) a Source #
Invalid Iso, exists for ease of composition with the current 'Lens . Iso' chaining to hide internal types from the user.
type Stream = ConduitM () ByteString (ResourceT IO) () Source #
TransportError HttpException | |
SerializeError SerializeError | |
ServiceError ServiceError |
Instances
Show Error Source # | |
Exception Error Source # | |
Defined in Network.Google.Types toException :: Error -> SomeException # fromException :: SomeException -> Maybe Error # displayException :: Error -> String # | |
AsError Error Source # | |
Defined in Network.Google.Types _Error :: Prism' Error Error Source # _TransportError :: Prism' Error HttpException Source # _SerializeError :: Prism' Error SerializeError Source # _ServiceError :: Prism' Error ServiceError Source # |
data SerializeError Source #
SerializeError' | |
|
Instances
Eq SerializeError Source # | |
Defined in Network.Google.Types (==) :: SerializeError -> SerializeError -> Bool # (/=) :: SerializeError -> SerializeError -> Bool # | |
Show SerializeError Source # | |
Defined in Network.Google.Types showsPrec :: Int -> SerializeError -> ShowS # show :: SerializeError -> String # showList :: [SerializeError] -> ShowS # |
data ServiceError Source #
ServiceError' | |
|
Instances
Eq ServiceError Source # | |
Defined in Network.Google.Types (==) :: ServiceError -> ServiceError -> Bool # (/=) :: ServiceError -> ServiceError -> Bool # | |
Show ServiceError Source # | |
Defined in Network.Google.Types showsPrec :: Int -> ServiceError -> ShowS # show :: ServiceError -> String # showList :: [ServiceError] -> ShowS # |
class AsError a where Source #
_Error :: Prism' a Error Source #
A general Amazonka error.
_TransportError :: Prism' a HttpException Source #
An error occured while communicating over HTTP with a remote service.
_SerializeError :: Prism' a SerializeError Source #
A serialisation error occured when attempting to deserialise a response.
_ServiceError :: Prism' a ServiceError Source #
A service specific error returned by the remote service.
Instances
AsError SomeException Source # | |
Defined in Network.Google.Types _Error :: Prism' SomeException Error Source # _TransportError :: Prism' SomeException HttpException Source # _SerializeError :: Prism' SomeException SerializeError Source # _ServiceError :: Prism' SomeException ServiceError Source # | |
AsError Error Source # | |
Defined in Network.Google.Types _Error :: Prism' Error Error Source # _TransportError :: Prism' Error HttpException Source # _SerializeError :: Prism' Error SerializeError Source # _ServiceError :: Prism' Error ServiceError Source # |
data ServiceConfig Source #
ServiceConfig | |
|
defaultService :: ServiceId -> ByteString -> ServiceConfig Source #
serviceHost :: Lens' ServiceConfig ByteString Source #
The remote host name, used for both the IP address to connect to and the host request header.
servicePort :: Lens' ServiceConfig Int Source #
The remote port to connect to.
Defaults to 443
.
servicePath :: Lens' ServiceConfig Builder Source #
A path prefix that is prepended to any sent HTTP request.
Defaults to mempty
.
serviceSecure :: Lens' ServiceConfig Bool Source #
Whether to use HTTPS/SSL.
Defaults to True
.
serviceTimeout :: Lens' ServiceConfig (Maybe Seconds) Source #
Number of seconds to wait for a response.
A single part of a (potentially multipart) request body.
Note: The IsString
instance defaults to a text/plain
MIME type.
Body !MediaType !RequestBody |
Instances
IsString Body Source # | |
Defined in Network.Google.Types fromString :: String -> Body # |
An intermediary request builder.
Request | |
|
appendPaths :: ToHttpApiData a => Request -> [a] -> Request Source #
appendQuery :: Request -> ByteString -> Maybe Text -> Request Source #
A materialised 'http-client' request and associated response parser.
Client | |
|
clientService :: Lens' (Client a) ServiceConfig Source #
mime :: FromStream c a => Proxy c -> Method -> [Int] -> Request -> ServiceConfig -> Client a Source #
client :: (Stream -> ResourceT IO (Either (String, ByteString) a)) -> Maybe MediaType -> Method -> [Int] -> Request -> ServiceConfig -> Client a Source #
class Accept c => ToBody c a where Source #
Instances
ToJSON a => ToBody JSON a Source # | |
ToBody OctetStream ByteString Source # | |
Defined in Network.Google.Types toBody :: Proxy OctetStream -> ByteString -> Body Source # | |
ToBody OctetStream ByteString Source # | |
Defined in Network.Google.Types toBody :: Proxy OctetStream -> ByteString -> Body Source # | |
ToBody PlainText ByteString Source # | |
Defined in Network.Google.Types | |
ToBody PlainText ByteString Source # | |
Defined in Network.Google.Types |
class Accept c => FromStream c a where Source #
fromStream :: Proxy c -> Stream -> ResourceT IO (Either (String, ByteString) a) Source #
Instances
FromJSON a => FromStream JSON a Source # | |
Defined in Network.Google.Types fromStream :: Proxy JSON -> Stream -> ResourceT IO (Either (String, ByteString) a) Source # | |
FromStream OctetStream Stream Source # | |
Defined in Network.Google.Types fromStream :: Proxy OctetStream -> Stream -> ResourceT IO (Either (String, ByteString) Stream) Source # |
class GoogleRequest a where Source #
requestClient :: a -> Client (Rs a) Source #
class GoogleClient fn where Source #
Instances
data Captures (s :: Symbol) a Source #
Instances
(KnownSymbol s, ToHttpApiData a, GoogleClient fn) => GoogleClient (Captures s a :> fn) Source # | |
type Fn (Captures s a :> fn) Source # | |
Defined in Network.Google.Types |
data CaptureMode (s :: Symbol) (m :: Symbol) a Source #
Instances
(KnownSymbol s, KnownSymbol m, ToHttpApiData a, GoogleClient fn) => GoogleClient (CaptureMode s m a :> fn) Source # | |
Defined in Network.Google.Types buildClient :: Proxy (CaptureMode s m a :> fn) -> Request -> Fn (CaptureMode s m a :> fn) Source # | |
type Fn (CaptureMode s m a :> fn) Source # | |
Defined in Network.Google.Types |
data MultipartRelated (cs :: [*]) m Source #
Instances
(ToBody c m, GoogleClient fn) => GoogleClient (MultipartRelated (c ': cs) m :> fn) Source # | |
Defined in Network.Google.Types buildClient :: Proxy (MultipartRelated (c ': cs) m :> fn) -> Request -> Fn (MultipartRelated (c ': cs) m :> fn) Source # | |
type Fn (MultipartRelated (c ': cs) m :> fn) Source # | |
Defined in Network.Google.Types |
buildText :: ToHttpApiData a => a -> Builder Source #
buildSymbol :: forall n proxy. KnownSymbol n => proxy n -> Builder Source #
byteSymbol :: forall n proxy. KnownSymbol n => proxy n -> ByteString Source #
An integral value representing seconds.
Instances
Bounded Seconds Source # | |
Enum Seconds Source # | |
Eq Seconds Source # | |
Integral Seconds Source # | |
Defined in Network.Google.Types | |
Data Seconds Source # | |
Defined in Network.Google.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seconds -> c Seconds # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Seconds # toConstr :: Seconds -> Constr # dataTypeOf :: Seconds -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Seconds) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds) # gmapT :: (forall b. Data b => b -> b) -> Seconds -> Seconds # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r # gmapQ :: (forall d. Data d => d -> u) -> Seconds -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Seconds -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds # | |
Num Seconds Source # | |
Ord Seconds Source # | |
Read Seconds Source # | |
Real Seconds Source # | |
Defined in Network.Google.Types toRational :: Seconds -> Rational # | |
Show Seconds Source # | |
Generic Seconds Source # | |
type Rep Seconds Source # | |
Defined in Network.Google.Types |
microseconds :: Seconds -> Int Source #