{-# 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.DataSync.Types.LocationListEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LocationListEntry = LocationListEntry'
{
LocationListEntry -> Maybe Text
locationUri :: Prelude.Maybe Prelude.Text,
LocationListEntry -> Maybe Text
locationArn :: Prelude.Maybe Prelude.Text
}
deriving (LocationListEntry -> LocationListEntry -> Bool
(LocationListEntry -> LocationListEntry -> Bool)
-> (LocationListEntry -> LocationListEntry -> Bool)
-> Eq LocationListEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LocationListEntry -> LocationListEntry -> Bool
$c/= :: LocationListEntry -> LocationListEntry -> Bool
== :: LocationListEntry -> LocationListEntry -> Bool
$c== :: LocationListEntry -> LocationListEntry -> Bool
Prelude.Eq, ReadPrec [LocationListEntry]
ReadPrec LocationListEntry
Int -> ReadS LocationListEntry
ReadS [LocationListEntry]
(Int -> ReadS LocationListEntry)
-> ReadS [LocationListEntry]
-> ReadPrec LocationListEntry
-> ReadPrec [LocationListEntry]
-> Read LocationListEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LocationListEntry]
$creadListPrec :: ReadPrec [LocationListEntry]
readPrec :: ReadPrec LocationListEntry
$creadPrec :: ReadPrec LocationListEntry
readList :: ReadS [LocationListEntry]
$creadList :: ReadS [LocationListEntry]
readsPrec :: Int -> ReadS LocationListEntry
$creadsPrec :: Int -> ReadS LocationListEntry
Prelude.Read, Int -> LocationListEntry -> ShowS
[LocationListEntry] -> ShowS
LocationListEntry -> String
(Int -> LocationListEntry -> ShowS)
-> (LocationListEntry -> String)
-> ([LocationListEntry] -> ShowS)
-> Show LocationListEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LocationListEntry] -> ShowS
$cshowList :: [LocationListEntry] -> ShowS
show :: LocationListEntry -> String
$cshow :: LocationListEntry -> String
showsPrec :: Int -> LocationListEntry -> ShowS
$cshowsPrec :: Int -> LocationListEntry -> ShowS
Prelude.Show, (forall x. LocationListEntry -> Rep LocationListEntry x)
-> (forall x. Rep LocationListEntry x -> LocationListEntry)
-> Generic LocationListEntry
forall x. Rep LocationListEntry x -> LocationListEntry
forall x. LocationListEntry -> Rep LocationListEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LocationListEntry x -> LocationListEntry
$cfrom :: forall x. LocationListEntry -> Rep LocationListEntry x
Prelude.Generic)
newLocationListEntry ::
LocationListEntry
newLocationListEntry :: LocationListEntry
newLocationListEntry =
LocationListEntry' :: Maybe Text -> Maybe Text -> LocationListEntry
LocationListEntry'
{ $sel:locationUri:LocationListEntry' :: Maybe Text
locationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:locationArn:LocationListEntry' :: Maybe Text
locationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
locationListEntry_locationUri :: Lens.Lens' LocationListEntry (Prelude.Maybe Prelude.Text)
locationListEntry_locationUri :: (Maybe Text -> f (Maybe Text))
-> LocationListEntry -> f LocationListEntry
locationListEntry_locationUri = (LocationListEntry -> Maybe Text)
-> (LocationListEntry -> Maybe Text -> LocationListEntry)
-> Lens
LocationListEntry LocationListEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocationListEntry' {Maybe Text
locationUri :: Maybe Text
$sel:locationUri:LocationListEntry' :: LocationListEntry -> Maybe Text
locationUri} -> Maybe Text
locationUri) (\s :: LocationListEntry
s@LocationListEntry' {} Maybe Text
a -> LocationListEntry
s {$sel:locationUri:LocationListEntry' :: Maybe Text
locationUri = Maybe Text
a} :: LocationListEntry)
locationListEntry_locationArn :: Lens.Lens' LocationListEntry (Prelude.Maybe Prelude.Text)
locationListEntry_locationArn :: (Maybe Text -> f (Maybe Text))
-> LocationListEntry -> f LocationListEntry
locationListEntry_locationArn = (LocationListEntry -> Maybe Text)
-> (LocationListEntry -> Maybe Text -> LocationListEntry)
-> Lens
LocationListEntry LocationListEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocationListEntry' {Maybe Text
locationArn :: Maybe Text
$sel:locationArn:LocationListEntry' :: LocationListEntry -> Maybe Text
locationArn} -> Maybe Text
locationArn) (\s :: LocationListEntry
s@LocationListEntry' {} Maybe Text
a -> LocationListEntry
s {$sel:locationArn:LocationListEntry' :: Maybe Text
locationArn = Maybe Text
a} :: LocationListEntry)
instance Core.FromJSON LocationListEntry where
parseJSON :: Value -> Parser LocationListEntry
parseJSON =
String
-> (Object -> Parser LocationListEntry)
-> Value
-> Parser LocationListEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LocationListEntry"
( \Object
x ->
Maybe Text -> Maybe Text -> LocationListEntry
LocationListEntry'
(Maybe Text -> Maybe Text -> LocationListEntry)
-> Parser (Maybe Text) -> Parser (Maybe Text -> LocationListEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocationUri")
Parser (Maybe Text -> LocationListEntry)
-> Parser (Maybe Text) -> Parser LocationListEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocationArn")
)
instance Prelude.Hashable LocationListEntry
instance Prelude.NFData LocationListEntry