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 GSecret = GSecret Text
- newtype MediaDownload a = MediaDownload a
- data MediaUpload a = MediaUpload a GBody
- _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
- data SerializeError = SerializeError' {}
- 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 GBody = GBody !MediaType !RequestBody
- bodyContentType :: Lens' GBody MediaType
- data Request = Request {
- _rqPath :: !Builder
- _rqQuery :: !(DList (ByteString, Maybe ByteString))
- _rqHeaders :: !(DList (HeaderName, ByteString))
- _rqBody :: ![GBody]
- appendPath :: Request -> Builder -> Request
- appendPaths :: ToHttpApiData a => Request -> [a] -> Request
- appendQuery :: Request -> ByteString -> Maybe Text -> Request
- appendHeader :: Request -> HeaderName -> Maybe Text -> Request
- setBody :: Request -> [GBody] -> Request
- data GClient a = GClient {
- _cliAccept :: !(Maybe MediaType)
- _cliMethod :: !Method
- _cliCheck :: !(Status -> Bool)
- _cliService :: !ServiceConfig
- _cliRequest :: !Request
- _cliResponse :: !(Stream -> ResourceT IO (Either (String, ByteString) a))
- clientService :: Lens' (GClient a) ServiceConfig
- mime :: FromStream c a => Proxy c -> Method -> [Int] -> Request -> ServiceConfig -> GClient a
- discard :: Method -> [Int] -> Request -> ServiceConfig -> GClient ()
- gClient :: (Stream -> ResourceT IO (Either (String, ByteString) a)) -> Maybe MediaType -> Method -> [Int] -> Request -> ServiceConfig -> GClient a
- class Accept c => ToBody c a where
- class Accept c => FromStream c a where
- fromStream :: Proxy c -> Stream -> ResourceT IO (Either (String, ByteString) a)
- class GoogleRequest a where
- class GoogleClient fn where
- type Fn fn :: *
- buildClient :: Proxy fn -> Request -> Fn fn
- 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 GFieldMask = GFieldMask 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 # | |
ToJSON ClientId Source # | |
Defined in Network.Google.Types | |
FromJSON ClientId Source # | |
ToHttpApiData ClientId Source # | |
Defined in Network.Google.Types toUrlPiece :: ClientId -> Text # toEncodedUrlPiece :: ClientId -> Builder # toHeader :: ClientId -> ByteString # toQueryParam :: ClientId -> Text # | |
FromHttpApiData ClientId Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text ClientId # parseHeader :: ByteString -> Either Text ClientId # | |
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 # | |
ToJSON ServiceId Source # | |
Defined in Network.Google.Types | |
FromJSON ServiceId Source # | |
ToHttpApiData ServiceId Source # | |
Defined in Network.Google.Types toUrlPiece :: ServiceId -> Text # toEncodedUrlPiece :: ServiceId -> Builder # toHeader :: ServiceId -> ByteString # toQueryParam :: ServiceId -> Text # | |
FromHttpApiData ServiceId Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text ServiceId # parseHeader :: ByteString -> Either Text ServiceId # | |
type Rep ServiceId Source # | |
Defined in Network.Google.Types |
An opaque client secret.
Instances
Eq GSecret Source # | |
Ord GSecret Source # | |
Read GSecret Source # | |
Show GSecret Source # | |
IsString GSecret Source # | |
Defined in Network.Google.Types fromString :: String -> GSecret # | |
Generic GSecret Source # | |
ToJSON GSecret Source # | |
Defined in Network.Google.Types | |
FromJSON GSecret Source # | |
ToHttpApiData GSecret Source # | |
Defined in Network.Google.Types toUrlPiece :: GSecret -> Text # toEncodedUrlPiece :: GSecret -> Builder # toHeader :: GSecret -> ByteString # toQueryParam :: GSecret -> Text # | |
FromHttpApiData GSecret Source # | |
Defined in Network.Google.Types parseUrlPiece :: Text -> Either Text GSecret # parseHeader :: ByteString -> Either Text GSecret # | |
type Rep GSecret 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.
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 # | |
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.
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.
Instances
IsString GBody Source # | |
Defined in Network.Google.Types fromString :: String -> GBody # |
An intermediary request builder.
Request | |
|
appendPaths :: ToHttpApiData a => Request -> [a] -> Request Source #
appendQuery :: Request -> ByteString -> Maybe Text -> Request Source #
appendHeader :: Request -> HeaderName -> Maybe Text -> Request Source #
A materialised 'http-client' request and associated response parser.
GClient | |
|
clientService :: Lens' (GClient a) ServiceConfig Source #
mime :: FromStream c a => Proxy c -> Method -> [Int] -> Request -> ServiceConfig -> GClient a Source #
gClient :: (Stream -> ResourceT IO (Either (String, ByteString) a)) -> Maybe MediaType -> Method -> [Int] -> Request -> ServiceConfig -> GClient a Source #
class Accept c => ToBody c a where Source #
Instances
ToJSON a => ToBody JSON a Source # | |
ToBody PlainText ByteString Source # | |
Defined in Network.Google.Types | |
ToBody PlainText ByteString Source # | |
Defined in Network.Google.Types | |
ToBody OctetStream ByteString Source # | |
Defined in Network.Google.Types toBody :: Proxy OctetStream -> ByteString -> GBody Source # | |
ToBody OctetStream ByteString Source # | |
Defined in Network.Google.Types toBody :: Proxy OctetStream -> ByteString -> GBody Source # |
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 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 -> GClient (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 #
newtype GFieldMask Source #