{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Translate.Types.TerminologyDataLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TerminologyDataLocation = TerminologyDataLocation'
{
TerminologyDataLocation -> Text
repositoryType :: Prelude.Text,
TerminologyDataLocation -> Text
location :: Prelude.Text
}
deriving (TerminologyDataLocation -> TerminologyDataLocation -> Bool
(TerminologyDataLocation -> TerminologyDataLocation -> Bool)
-> (TerminologyDataLocation -> TerminologyDataLocation -> Bool)
-> Eq TerminologyDataLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminologyDataLocation -> TerminologyDataLocation -> Bool
$c/= :: TerminologyDataLocation -> TerminologyDataLocation -> Bool
== :: TerminologyDataLocation -> TerminologyDataLocation -> Bool
$c== :: TerminologyDataLocation -> TerminologyDataLocation -> Bool
Prelude.Eq, ReadPrec [TerminologyDataLocation]
ReadPrec TerminologyDataLocation
Int -> ReadS TerminologyDataLocation
ReadS [TerminologyDataLocation]
(Int -> ReadS TerminologyDataLocation)
-> ReadS [TerminologyDataLocation]
-> ReadPrec TerminologyDataLocation
-> ReadPrec [TerminologyDataLocation]
-> Read TerminologyDataLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TerminologyDataLocation]
$creadListPrec :: ReadPrec [TerminologyDataLocation]
readPrec :: ReadPrec TerminologyDataLocation
$creadPrec :: ReadPrec TerminologyDataLocation
readList :: ReadS [TerminologyDataLocation]
$creadList :: ReadS [TerminologyDataLocation]
readsPrec :: Int -> ReadS TerminologyDataLocation
$creadsPrec :: Int -> ReadS TerminologyDataLocation
Prelude.Read, Int -> TerminologyDataLocation -> ShowS
[TerminologyDataLocation] -> ShowS
TerminologyDataLocation -> String
(Int -> TerminologyDataLocation -> ShowS)
-> (TerminologyDataLocation -> String)
-> ([TerminologyDataLocation] -> ShowS)
-> Show TerminologyDataLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminologyDataLocation] -> ShowS
$cshowList :: [TerminologyDataLocation] -> ShowS
show :: TerminologyDataLocation -> String
$cshow :: TerminologyDataLocation -> String
showsPrec :: Int -> TerminologyDataLocation -> ShowS
$cshowsPrec :: Int -> TerminologyDataLocation -> ShowS
Prelude.Show, (forall x.
TerminologyDataLocation -> Rep TerminologyDataLocation x)
-> (forall x.
Rep TerminologyDataLocation x -> TerminologyDataLocation)
-> Generic TerminologyDataLocation
forall x. Rep TerminologyDataLocation x -> TerminologyDataLocation
forall x. TerminologyDataLocation -> Rep TerminologyDataLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TerminologyDataLocation x -> TerminologyDataLocation
$cfrom :: forall x. TerminologyDataLocation -> Rep TerminologyDataLocation x
Prelude.Generic)
newTerminologyDataLocation ::
Prelude.Text ->
Prelude.Text ->
TerminologyDataLocation
newTerminologyDataLocation :: Text -> Text -> TerminologyDataLocation
newTerminologyDataLocation
Text
pRepositoryType_
Text
pLocation_ =
TerminologyDataLocation' :: Text -> Text -> TerminologyDataLocation
TerminologyDataLocation'
{ $sel:repositoryType:TerminologyDataLocation' :: Text
repositoryType =
Text
pRepositoryType_,
$sel:location:TerminologyDataLocation' :: Text
location = Text
pLocation_
}
terminologyDataLocation_repositoryType :: Lens.Lens' TerminologyDataLocation Prelude.Text
terminologyDataLocation_repositoryType :: (Text -> f Text)
-> TerminologyDataLocation -> f TerminologyDataLocation
terminologyDataLocation_repositoryType = (TerminologyDataLocation -> Text)
-> (TerminologyDataLocation -> Text -> TerminologyDataLocation)
-> Lens TerminologyDataLocation TerminologyDataLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminologyDataLocation' {Text
repositoryType :: Text
$sel:repositoryType:TerminologyDataLocation' :: TerminologyDataLocation -> Text
repositoryType} -> Text
repositoryType) (\s :: TerminologyDataLocation
s@TerminologyDataLocation' {} Text
a -> TerminologyDataLocation
s {$sel:repositoryType:TerminologyDataLocation' :: Text
repositoryType = Text
a} :: TerminologyDataLocation)
terminologyDataLocation_location :: Lens.Lens' TerminologyDataLocation Prelude.Text
terminologyDataLocation_location :: (Text -> f Text)
-> TerminologyDataLocation -> f TerminologyDataLocation
terminologyDataLocation_location = (TerminologyDataLocation -> Text)
-> (TerminologyDataLocation -> Text -> TerminologyDataLocation)
-> Lens TerminologyDataLocation TerminologyDataLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminologyDataLocation' {Text
location :: Text
$sel:location:TerminologyDataLocation' :: TerminologyDataLocation -> Text
location} -> Text
location) (\s :: TerminologyDataLocation
s@TerminologyDataLocation' {} Text
a -> TerminologyDataLocation
s {$sel:location:TerminologyDataLocation' :: Text
location = Text
a} :: TerminologyDataLocation)
instance Core.FromJSON TerminologyDataLocation where
parseJSON :: Value -> Parser TerminologyDataLocation
parseJSON =
String
-> (Object -> Parser TerminologyDataLocation)
-> Value
-> Parser TerminologyDataLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TerminologyDataLocation"
( \Object
x ->
Text -> Text -> TerminologyDataLocation
TerminologyDataLocation'
(Text -> Text -> TerminologyDataLocation)
-> Parser Text -> Parser (Text -> TerminologyDataLocation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RepositoryType")
Parser (Text -> TerminologyDataLocation)
-> Parser Text -> Parser TerminologyDataLocation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Location")
)
instance Prelude.Hashable TerminologyDataLocation
instance Prelude.NFData TerminologyDataLocation