gogol-translate-0.2.0: Google Translate SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Translate.Types

Contents

Description

 

Synopsis

Service Configuration

translateService :: ServiceConfig Source #

Default request referring to version v2 of the Translate API. This contains the host and root path used as a starting point for constructing service requests.

TranslationsResource

data TranslationsResource Source #

Instances

Eq TranslationsResource Source # 
Data TranslationsResource Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TranslationsResource -> c TranslationsResource #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TranslationsResource #

toConstr :: TranslationsResource -> Constr #

dataTypeOf :: TranslationsResource -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TranslationsResource) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TranslationsResource) #

gmapT :: (forall b. Data b => b -> b) -> TranslationsResource -> TranslationsResource #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsResource -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsResource -> r #

gmapQ :: (forall d. Data d => d -> u) -> TranslationsResource -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TranslationsResource -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TranslationsResource -> m TranslationsResource #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsResource -> m TranslationsResource #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsResource -> m TranslationsResource #

Show TranslationsResource Source # 
Generic TranslationsResource Source # 
ToJSON TranslationsResource Source # 
FromJSON TranslationsResource Source # 
type Rep TranslationsResource Source # 
type Rep TranslationsResource = D1 (MetaData "TranslationsResource" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" False) (C1 (MetaCons "TranslationsResource'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_trDetectedSourceLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_trTranslatedText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))

translationsResource :: TranslationsResource Source #

Creates a value of TranslationsResource with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text) Source #

Detected source language if source parameter is unspecified.

DetectionsListResponse

data DetectionsListResponse Source #

Instances

Eq DetectionsListResponse Source # 
Data DetectionsListResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectionsListResponse -> c DetectionsListResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectionsListResponse #

toConstr :: DetectionsListResponse -> Constr #

dataTypeOf :: DetectionsListResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DetectionsListResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectionsListResponse) #

gmapT :: (forall b. Data b => b -> b) -> DetectionsListResponse -> DetectionsListResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectionsListResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectionsListResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectionsListResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectionsListResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectionsListResponse -> m DetectionsListResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectionsListResponse -> m DetectionsListResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectionsListResponse -> m DetectionsListResponse #

Show DetectionsListResponse Source # 
Generic DetectionsListResponse Source # 
ToJSON DetectionsListResponse Source # 
FromJSON DetectionsListResponse Source # 
type Rep DetectionsListResponse Source # 
type Rep DetectionsListResponse = D1 (MetaData "DetectionsListResponse" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" True) (C1 (MetaCons "DetectionsListResponse'" PrefixI True) (S1 (MetaSel (Just Symbol "_dlrDetections") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [[DetectionsResourceItem]]))))

detectionsListResponse :: DetectionsListResponse Source #

Creates a value of DetectionsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]] Source #

A detections contains detection results of several text

LanguagesListResponse

data LanguagesListResponse Source #

Instances

Eq LanguagesListResponse Source # 
Data LanguagesListResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LanguagesListResponse -> c LanguagesListResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LanguagesListResponse #

toConstr :: LanguagesListResponse -> Constr #

dataTypeOf :: LanguagesListResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c LanguagesListResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LanguagesListResponse) #

gmapT :: (forall b. Data b => b -> b) -> LanguagesListResponse -> LanguagesListResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LanguagesListResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LanguagesListResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> LanguagesListResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LanguagesListResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LanguagesListResponse -> m LanguagesListResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LanguagesListResponse -> m LanguagesListResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LanguagesListResponse -> m LanguagesListResponse #

Show LanguagesListResponse Source # 
Generic LanguagesListResponse Source # 
ToJSON LanguagesListResponse Source # 
FromJSON LanguagesListResponse Source # 
type Rep LanguagesListResponse Source # 
type Rep LanguagesListResponse = D1 (MetaData "LanguagesListResponse" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" True) (C1 (MetaCons "LanguagesListResponse'" PrefixI True) (S1 (MetaSel (Just Symbol "_llrLanguages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [LanguagesResource]))))

languagesListResponse :: LanguagesListResponse Source #

Creates a value of LanguagesListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

llrLanguages :: Lens' LanguagesListResponse [LanguagesResource] Source #

List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.

DetectionsResourceItem

data DetectionsResourceItem Source #

Instances

Eq DetectionsResourceItem Source # 
Data DetectionsResourceItem Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectionsResourceItem -> c DetectionsResourceItem #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectionsResourceItem #

toConstr :: DetectionsResourceItem -> Constr #

dataTypeOf :: DetectionsResourceItem -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DetectionsResourceItem) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectionsResourceItem) #

gmapT :: (forall b. Data b => b -> b) -> DetectionsResourceItem -> DetectionsResourceItem #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectionsResourceItem -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectionsResourceItem -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectionsResourceItem -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectionsResourceItem -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectionsResourceItem -> m DetectionsResourceItem #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectionsResourceItem -> m DetectionsResourceItem #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectionsResourceItem -> m DetectionsResourceItem #

Show DetectionsResourceItem Source # 
Generic DetectionsResourceItem Source # 
ToJSON DetectionsResourceItem Source # 
FromJSON DetectionsResourceItem Source # 
type Rep DetectionsResourceItem Source # 
type Rep DetectionsResourceItem = D1 (MetaData "DetectionsResourceItem" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" False) (C1 (MetaCons "DetectionsResourceItem'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_driConfidence") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Double)))) ((:*:) (S1 (MetaSel (Just Symbol "_driIsReliable") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_driLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))

detectionsResourceItem :: DetectionsResourceItem Source #

Creates a value of DetectionsResourceItem with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

driConfidence :: Lens' DetectionsResourceItem (Maybe Double) Source #

The confidence of the detection resul of this language.

driIsReliable :: Lens' DetectionsResourceItem (Maybe Bool) Source #

A boolean to indicate is the language detection result reliable.

LanguagesResource

data LanguagesResource Source #

Instances

Eq LanguagesResource Source # 
Data LanguagesResource Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LanguagesResource -> c LanguagesResource #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LanguagesResource #

toConstr :: LanguagesResource -> Constr #

dataTypeOf :: LanguagesResource -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c LanguagesResource) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LanguagesResource) #

gmapT :: (forall b. Data b => b -> b) -> LanguagesResource -> LanguagesResource #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LanguagesResource -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LanguagesResource -> r #

gmapQ :: (forall d. Data d => d -> u) -> LanguagesResource -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LanguagesResource -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LanguagesResource -> m LanguagesResource #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LanguagesResource -> m LanguagesResource #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LanguagesResource -> m LanguagesResource #

Show LanguagesResource Source # 
Generic LanguagesResource Source # 
ToJSON LanguagesResource Source # 
FromJSON LanguagesResource Source # 
type Rep LanguagesResource Source # 
type Rep LanguagesResource = D1 (MetaData "LanguagesResource" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" False) (C1 (MetaCons "LanguagesResource'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_lrName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_lrLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))

languagesResource :: LanguagesResource Source #

Creates a value of LanguagesResource with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

lrName :: Lens' LanguagesResource (Maybe Text) Source #

The localized name of the language if target parameter is given.

TranslationsListFormat

data TranslationsListFormat Source #

The format of the text

Constructors

HTML

html Specifies the input is in HTML

Text

text Specifies the input is in plain textual format

Instances

Enum TranslationsListFormat Source # 
Eq TranslationsListFormat Source # 
Data TranslationsListFormat Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TranslationsListFormat -> c TranslationsListFormat #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TranslationsListFormat #

toConstr :: TranslationsListFormat -> Constr #

dataTypeOf :: TranslationsListFormat -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TranslationsListFormat) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TranslationsListFormat) #

gmapT :: (forall b. Data b => b -> b) -> TranslationsListFormat -> TranslationsListFormat #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsListFormat -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsListFormat -> r #

gmapQ :: (forall d. Data d => d -> u) -> TranslationsListFormat -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TranslationsListFormat -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TranslationsListFormat -> m TranslationsListFormat #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsListFormat -> m TranslationsListFormat #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsListFormat -> m TranslationsListFormat #

Ord TranslationsListFormat Source # 
Read TranslationsListFormat Source # 
Show TranslationsListFormat Source # 
Generic TranslationsListFormat Source # 
Hashable TranslationsListFormat Source # 
ToJSON TranslationsListFormat Source # 
FromJSON TranslationsListFormat Source # 
FromHttpApiData TranslationsListFormat Source # 
ToHttpApiData TranslationsListFormat Source # 
type Rep TranslationsListFormat Source # 
type Rep TranslationsListFormat = D1 (MetaData "TranslationsListFormat" "Network.Google.Translate.Types.Sum" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" False) ((:+:) (C1 (MetaCons "HTML" PrefixI False) U1) (C1 (MetaCons "Text" PrefixI False) U1))

TranslationsListResponse

data TranslationsListResponse Source #

Instances

Eq TranslationsListResponse Source # 
Data TranslationsListResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TranslationsListResponse -> c TranslationsListResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TranslationsListResponse #

toConstr :: TranslationsListResponse -> Constr #

dataTypeOf :: TranslationsListResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TranslationsListResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TranslationsListResponse) #

gmapT :: (forall b. Data b => b -> b) -> TranslationsListResponse -> TranslationsListResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsListResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TranslationsListResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> TranslationsListResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TranslationsListResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TranslationsListResponse -> m TranslationsListResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsListResponse -> m TranslationsListResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TranslationsListResponse -> m TranslationsListResponse #

Show TranslationsListResponse Source # 
Generic TranslationsListResponse Source # 
ToJSON TranslationsListResponse Source # 
FromJSON TranslationsListResponse Source # 
type Rep TranslationsListResponse Source # 
type Rep TranslationsListResponse = D1 (MetaData "TranslationsListResponse" "Network.Google.Translate.Types.Product" "gogol-translate-0.2.0-3fOctl23nMlDZ0NqLoMNOg" True) (C1 (MetaCons "TranslationsListResponse'" PrefixI True) (S1 (MetaSel (Just Symbol "_tlrTranslations") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [TranslationsResource]))))

translationsListResponse :: TranslationsListResponse Source #

Creates a value of TranslationsListResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

tlrTranslations :: Lens' TranslationsListResponse [TranslationsResource] Source #

Translations contains list of translation results of given text