{-# 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.M2.Types.ExternalLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ExternalLocation = ExternalLocation'
{
ExternalLocation -> Maybe Text
s3Location :: Prelude.Maybe Prelude.Text
}
deriving (ExternalLocation -> ExternalLocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalLocation -> ExternalLocation -> Bool
$c/= :: ExternalLocation -> ExternalLocation -> Bool
== :: ExternalLocation -> ExternalLocation -> Bool
$c== :: ExternalLocation -> ExternalLocation -> Bool
Prelude.Eq, ReadPrec [ExternalLocation]
ReadPrec ExternalLocation
Int -> ReadS ExternalLocation
ReadS [ExternalLocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExternalLocation]
$creadListPrec :: ReadPrec [ExternalLocation]
readPrec :: ReadPrec ExternalLocation
$creadPrec :: ReadPrec ExternalLocation
readList :: ReadS [ExternalLocation]
$creadList :: ReadS [ExternalLocation]
readsPrec :: Int -> ReadS ExternalLocation
$creadsPrec :: Int -> ReadS ExternalLocation
Prelude.Read, Int -> ExternalLocation -> ShowS
[ExternalLocation] -> ShowS
ExternalLocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalLocation] -> ShowS
$cshowList :: [ExternalLocation] -> ShowS
show :: ExternalLocation -> String
$cshow :: ExternalLocation -> String
showsPrec :: Int -> ExternalLocation -> ShowS
$cshowsPrec :: Int -> ExternalLocation -> ShowS
Prelude.Show, forall x. Rep ExternalLocation x -> ExternalLocation
forall x. ExternalLocation -> Rep ExternalLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExternalLocation x -> ExternalLocation
$cfrom :: forall x. ExternalLocation -> Rep ExternalLocation x
Prelude.Generic)
newExternalLocation ::
ExternalLocation
newExternalLocation :: ExternalLocation
newExternalLocation =
ExternalLocation' {$sel:s3Location:ExternalLocation' :: Maybe Text
s3Location = forall a. Maybe a
Prelude.Nothing}
externalLocation_s3Location :: Lens.Lens' ExternalLocation (Prelude.Maybe Prelude.Text)
externalLocation_s3Location :: Lens' ExternalLocation (Maybe Text)
externalLocation_s3Location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalLocation' {Maybe Text
s3Location :: Maybe Text
$sel:s3Location:ExternalLocation' :: ExternalLocation -> Maybe Text
s3Location} -> Maybe Text
s3Location) (\s :: ExternalLocation
s@ExternalLocation' {} Maybe Text
a -> ExternalLocation
s {$sel:s3Location:ExternalLocation' :: Maybe Text
s3Location = Maybe Text
a} :: ExternalLocation)
instance Prelude.Hashable ExternalLocation where
hashWithSalt :: Int -> ExternalLocation -> Int
hashWithSalt Int
_salt ExternalLocation' {Maybe Text
s3Location :: Maybe Text
$sel:s3Location:ExternalLocation' :: ExternalLocation -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Location
instance Prelude.NFData ExternalLocation where
rnf :: ExternalLocation -> ()
rnf ExternalLocation' {Maybe Text
s3Location :: Maybe Text
$sel:s3Location:ExternalLocation' :: ExternalLocation -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Location
instance Data.ToJSON ExternalLocation where
toJSON :: ExternalLocation -> Value
toJSON ExternalLocation' {Maybe Text
s3Location :: Maybe Text
$sel:s3Location:ExternalLocation' :: ExternalLocation -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"s3Location" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Location]
)