-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google Translate SDK.
--   
--   Translates text from one language to another.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v2</tt> of the API.
@package gogol-translate
@version 0.3.0


module Network.Google.Translate.Types

-- | Default request referring to version <tt>v2</tt> of the Translate API.
--   This contains the host and root path used as a starting point for
--   constructing service requests.
translateService :: ServiceConfig
data TranslationsResource

-- | Creates a value of <a>TranslationsResource</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>trDetectedSourceLanguage</a></li>
--   <li><a>trTranslatedText</a></li>
--   </ul>
translationsResource :: TranslationsResource

-- | Detected source language if source parameter is unspecified.
trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text)

-- | The translation.
trTranslatedText :: Lens' TranslationsResource (Maybe Text)
data DetectionsListResponse

-- | Creates a value of <a>DetectionsListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dlrDetections</a></li>
--   </ul>
detectionsListResponse :: DetectionsListResponse

-- | A detections contains detection results of several text
dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]]
data LanguagesListResponse

-- | Creates a value of <a>LanguagesListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>llrLanguages</a></li>
--   </ul>
languagesListResponse :: LanguagesListResponse

-- | 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.
llrLanguages :: Lens' LanguagesListResponse [LanguagesResource]
data DetectionsResourceItem

-- | Creates a value of <a>DetectionsResourceItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>driConfidence</a></li>
--   <li><a>driIsReliable</a></li>
--   <li><a>driLanguage</a></li>
--   </ul>
detectionsResourceItem :: DetectionsResourceItem

-- | The confidence of the detection resul of this language.
driConfidence :: Lens' DetectionsResourceItem (Maybe Double)

-- | A boolean to indicate is the language detection result reliable.
driIsReliable :: Lens' DetectionsResourceItem (Maybe Bool)

-- | The language we detect
driLanguage :: Lens' DetectionsResourceItem (Maybe Text)
data LanguagesResource

-- | Creates a value of <a>LanguagesResource</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrName</a></li>
--   <li><a>lrLanguage</a></li>
--   </ul>
languagesResource :: LanguagesResource

-- | The localized name of the language if target parameter is given.
lrName :: Lens' LanguagesResource (Maybe Text)

-- | The language code.
lrLanguage :: Lens' LanguagesResource (Maybe Text)

-- | The format of the text
data TranslationsListFormat

-- | <tt>html</tt> Specifies the input is in HTML
HTML :: TranslationsListFormat

-- | <tt>text</tt> Specifies the input is in plain textual format
Text :: TranslationsListFormat
data TranslationsListResponse

-- | Creates a value of <a>TranslationsListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tlrTranslations</a></li>
--   </ul>
translationsListResponse :: TranslationsListResponse

-- | Translations contains list of translation results of given text
tlrTranslations :: Lens' TranslationsListResponse [TranslationsResource]


-- | Returns text translations from one language to another.
--   
--   <i>See:</i> <a>Translate API Reference</a> for
--   <tt>language.translations.list</tt>.
module Network.Google.Resource.Language.Translations.List

-- | A resource alias for <tt>language.translations.list</tt> method which
--   the <a>TranslationsList</a> request conforms to.
type TranslationsListResource = "language" :> ("translate" :> ("v2" :> (QueryParams "q" Text :> (QueryParam "target" Text :> (QueryParam "format" TranslationsListFormat :> (QueryParam "source" Text :> (QueryParams "cid" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] TranslationsListResponse))))))))

-- | Creates a value of <a>TranslationsList</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tlFormat</a></li>
--   <li><a>tlQ</a></li>
--   <li><a>tlSource</a></li>
--   <li><a>tlCid</a></li>
--   <li><a>tlTarget</a></li>
--   </ul>
translationsList :: [Text] -> Text -> TranslationsList

-- | Returns text translations from one language to another.
--   
--   <i>See:</i> <a>translationsList</a> smart constructor.
data TranslationsList

-- | The format of the text
tlFormat :: Lens' TranslationsList (Maybe TranslationsListFormat)

-- | The text to translate
tlQ :: Lens' TranslationsList [Text]

-- | The source language of the text
tlSource :: Lens' TranslationsList (Maybe Text)

-- | The customization id for translate
tlCid :: Lens' TranslationsList [Text]

-- | The target language into which the text should be translated
tlTarget :: Lens' TranslationsList Text
instance GHC.Generics.Generic Network.Google.Resource.Language.Translations.List.TranslationsList
instance Data.Data.Data Network.Google.Resource.Language.Translations.List.TranslationsList
instance GHC.Show.Show Network.Google.Resource.Language.Translations.List.TranslationsList
instance GHC.Classes.Eq Network.Google.Resource.Language.Translations.List.TranslationsList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Language.Translations.List.TranslationsList


-- | List the source/target languages supported by the API
--   
--   <i>See:</i> <a>Translate API Reference</a> for
--   <tt>language.languages.list</tt>.
module Network.Google.Resource.Language.Languages.List

-- | A resource alias for <tt>language.languages.list</tt> method which the
--   <a>LanguagesList</a> request conforms to.
type LanguagesListResource = "language" :> ("translate" :> ("v2" :> ("languages" :> (QueryParam "target" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] LanguagesListResponse)))))

-- | Creates a value of <a>LanguagesList</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>llTarget</a></li>
--   </ul>
languagesList :: LanguagesList

-- | List the source/target languages supported by the API
--   
--   <i>See:</i> <a>languagesList</a> smart constructor.
data LanguagesList

-- | the language and collation in which the localized results should be
--   returned
llTarget :: Lens' LanguagesList (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Language.Languages.List.LanguagesList
instance Data.Data.Data Network.Google.Resource.Language.Languages.List.LanguagesList
instance GHC.Show.Show Network.Google.Resource.Language.Languages.List.LanguagesList
instance GHC.Classes.Eq Network.Google.Resource.Language.Languages.List.LanguagesList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Language.Languages.List.LanguagesList


-- | Detect the language of text.
--   
--   <i>See:</i> <a>Translate API Reference</a> for
--   <tt>language.detections.list</tt>.
module Network.Google.Resource.Language.Detections.List

-- | A resource alias for <tt>language.detections.list</tt> method which
--   the <a>DetectionsList</a> request conforms to.
type DetectionsListResource = "language" :> ("translate" :> ("v2" :> ("detect" :> (QueryParams "q" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] DetectionsListResponse)))))

-- | Creates a value of <a>DetectionsList</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dlQ</a></li>
--   </ul>
detectionsList :: [Text] -> DetectionsList

-- | Detect the language of text.
--   
--   <i>See:</i> <a>detectionsList</a> smart constructor.
data DetectionsList

-- | The text to detect
dlQ :: Lens' DetectionsList [Text]
instance GHC.Generics.Generic Network.Google.Resource.Language.Detections.List.DetectionsList
instance Data.Data.Data Network.Google.Resource.Language.Detections.List.DetectionsList
instance GHC.Show.Show Network.Google.Resource.Language.Detections.List.DetectionsList
instance GHC.Classes.Eq Network.Google.Resource.Language.Detections.List.DetectionsList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Language.Detections.List.DetectionsList


-- | Translates text from one language to another.
--   
--   <i>See:</i> <a>Translate API Reference</a>
module Network.Google.Translate

-- | Default request referring to version <tt>v2</tt> of the Translate API.
--   This contains the host and root path used as a starting point for
--   constructing service requests.
translateService :: ServiceConfig

-- | Represents the entirety of the methods and resources available for the
--   Translate API service.
type TranslateAPI = DetectionsListResource :<|> (LanguagesListResource :<|> TranslationsListResource)
data TranslationsResource

-- | Creates a value of <a>TranslationsResource</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>trDetectedSourceLanguage</a></li>
--   <li><a>trTranslatedText</a></li>
--   </ul>
translationsResource :: TranslationsResource

-- | Detected source language if source parameter is unspecified.
trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text)

-- | The translation.
trTranslatedText :: Lens' TranslationsResource (Maybe Text)
data DetectionsListResponse

-- | Creates a value of <a>DetectionsListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dlrDetections</a></li>
--   </ul>
detectionsListResponse :: DetectionsListResponse

-- | A detections contains detection results of several text
dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]]
data LanguagesListResponse

-- | Creates a value of <a>LanguagesListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>llrLanguages</a></li>
--   </ul>
languagesListResponse :: LanguagesListResponse

-- | 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.
llrLanguages :: Lens' LanguagesListResponse [LanguagesResource]
data DetectionsResourceItem

-- | Creates a value of <a>DetectionsResourceItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>driConfidence</a></li>
--   <li><a>driIsReliable</a></li>
--   <li><a>driLanguage</a></li>
--   </ul>
detectionsResourceItem :: DetectionsResourceItem

-- | The confidence of the detection resul of this language.
driConfidence :: Lens' DetectionsResourceItem (Maybe Double)

-- | A boolean to indicate is the language detection result reliable.
driIsReliable :: Lens' DetectionsResourceItem (Maybe Bool)

-- | The language we detect
driLanguage :: Lens' DetectionsResourceItem (Maybe Text)
data LanguagesResource

-- | Creates a value of <a>LanguagesResource</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrName</a></li>
--   <li><a>lrLanguage</a></li>
--   </ul>
languagesResource :: LanguagesResource

-- | The localized name of the language if target parameter is given.
lrName :: Lens' LanguagesResource (Maybe Text)

-- | The language code.
lrLanguage :: Lens' LanguagesResource (Maybe Text)

-- | The format of the text
data TranslationsListFormat

-- | <tt>html</tt> Specifies the input is in HTML
HTML :: TranslationsListFormat

-- | <tt>text</tt> Specifies the input is in plain textual format
Text :: TranslationsListFormat
data TranslationsListResponse

-- | Creates a value of <a>TranslationsListResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tlrTranslations</a></li>
--   </ul>
translationsListResponse :: TranslationsListResponse

-- | Translations contains list of translation results of given text
tlrTranslations :: Lens' TranslationsListResponse [TranslationsResource]
