{-# 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.MQ.Types.Configuration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MQ.Types.AuthenticationStrategy
import Amazonka.MQ.Types.ConfigurationRevision
import Amazonka.MQ.Types.EngineType
import qualified Amazonka.Prelude as Prelude
data Configuration = Configuration'
{
Configuration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Configuration -> Text
description :: Prelude.Text,
Configuration -> Text
engineVersion :: Prelude.Text,
Configuration -> ConfigurationRevision
latestRevision :: ConfigurationRevision,
Configuration -> AuthenticationStrategy
authenticationStrategy :: AuthenticationStrategy,
Configuration -> EngineType
engineType :: EngineType,
Configuration -> Text
id :: Prelude.Text,
Configuration -> Text
arn :: Prelude.Text,
Configuration -> Text
name :: Prelude.Text,
Configuration -> ISO8601
created :: Data.ISO8601
}
deriving (Configuration -> Configuration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Configuration -> Configuration -> Bool
$c/= :: Configuration -> Configuration -> Bool
== :: Configuration -> Configuration -> Bool
$c== :: Configuration -> Configuration -> Bool
Prelude.Eq, ReadPrec [Configuration]
ReadPrec Configuration
Int -> ReadS Configuration
ReadS [Configuration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Configuration]
$creadListPrec :: ReadPrec [Configuration]
readPrec :: ReadPrec Configuration
$creadPrec :: ReadPrec Configuration
readList :: ReadS [Configuration]
$creadList :: ReadS [Configuration]
readsPrec :: Int -> ReadS Configuration
$creadsPrec :: Int -> ReadS Configuration
Prelude.Read, Int -> Configuration -> ShowS
[Configuration] -> ShowS
Configuration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Configuration] -> ShowS
$cshowList :: [Configuration] -> ShowS
show :: Configuration -> String
$cshow :: Configuration -> String
showsPrec :: Int -> Configuration -> ShowS
$cshowsPrec :: Int -> Configuration -> ShowS
Prelude.Show, forall x. Rep Configuration x -> Configuration
forall x. Configuration -> Rep Configuration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Configuration x -> Configuration
$cfrom :: forall x. Configuration -> Rep Configuration x
Prelude.Generic)
newConfiguration ::
Prelude.Text ->
Prelude.Text ->
ConfigurationRevision ->
AuthenticationStrategy ->
EngineType ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Configuration
newConfiguration :: Text
-> Text
-> ConfigurationRevision
-> AuthenticationStrategy
-> EngineType
-> Text
-> Text
-> Text
-> UTCTime
-> Configuration
newConfiguration
Text
pDescription_
Text
pEngineVersion_
ConfigurationRevision
pLatestRevision_
AuthenticationStrategy
pAuthenticationStrategy_
EngineType
pEngineType_
Text
pId_
Text
pArn_
Text
pName_
UTCTime
pCreated_ =
Configuration'
{ $sel:tags:Configuration' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:description:Configuration' :: Text
description = Text
pDescription_,
$sel:engineVersion:Configuration' :: Text
engineVersion = Text
pEngineVersion_,
$sel:latestRevision:Configuration' :: ConfigurationRevision
latestRevision = ConfigurationRevision
pLatestRevision_,
$sel:authenticationStrategy:Configuration' :: AuthenticationStrategy
authenticationStrategy = AuthenticationStrategy
pAuthenticationStrategy_,
$sel:engineType:Configuration' :: EngineType
engineType = EngineType
pEngineType_,
$sel:id:Configuration' :: Text
id = Text
pId_,
$sel:arn:Configuration' :: Text
arn = Text
pArn_,
$sel:name:Configuration' :: Text
name = Text
pName_,
$sel:created:Configuration' :: ISO8601
created = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreated_
}
configuration_tags :: Lens.Lens' Configuration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
configuration_tags :: Lens' Configuration (Maybe (HashMap Text Text))
configuration_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Configuration' :: Configuration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Configuration
s@Configuration' {} Maybe (HashMap Text Text)
a -> Configuration
s {$sel:tags:Configuration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Configuration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
configuration_description :: Lens.Lens' Configuration Prelude.Text
configuration_description :: Lens' Configuration Text
configuration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Text
description :: Text
$sel:description:Configuration' :: Configuration -> Text
description} -> Text
description) (\s :: Configuration
s@Configuration' {} Text
a -> Configuration
s {$sel:description:Configuration' :: Text
description = Text
a} :: Configuration)
configuration_engineVersion :: Lens.Lens' Configuration Prelude.Text
configuration_engineVersion :: Lens' Configuration Text
configuration_engineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Text
engineVersion :: Text
$sel:engineVersion:Configuration' :: Configuration -> Text
engineVersion} -> Text
engineVersion) (\s :: Configuration
s@Configuration' {} Text
a -> Configuration
s {$sel:engineVersion:Configuration' :: Text
engineVersion = Text
a} :: Configuration)
configuration_latestRevision :: Lens.Lens' Configuration ConfigurationRevision
configuration_latestRevision :: Lens' Configuration ConfigurationRevision
configuration_latestRevision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {ConfigurationRevision
latestRevision :: ConfigurationRevision
$sel:latestRevision:Configuration' :: Configuration -> ConfigurationRevision
latestRevision} -> ConfigurationRevision
latestRevision) (\s :: Configuration
s@Configuration' {} ConfigurationRevision
a -> Configuration
s {$sel:latestRevision:Configuration' :: ConfigurationRevision
latestRevision = ConfigurationRevision
a} :: Configuration)
configuration_authenticationStrategy :: Lens.Lens' Configuration AuthenticationStrategy
configuration_authenticationStrategy :: Lens' Configuration AuthenticationStrategy
configuration_authenticationStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {AuthenticationStrategy
authenticationStrategy :: AuthenticationStrategy
$sel:authenticationStrategy:Configuration' :: Configuration -> AuthenticationStrategy
authenticationStrategy} -> AuthenticationStrategy
authenticationStrategy) (\s :: Configuration
s@Configuration' {} AuthenticationStrategy
a -> Configuration
s {$sel:authenticationStrategy:Configuration' :: AuthenticationStrategy
authenticationStrategy = AuthenticationStrategy
a} :: Configuration)
configuration_engineType :: Lens.Lens' Configuration EngineType
configuration_engineType :: Lens' Configuration EngineType
configuration_engineType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {EngineType
engineType :: EngineType
$sel:engineType:Configuration' :: Configuration -> EngineType
engineType} -> EngineType
engineType) (\s :: Configuration
s@Configuration' {} EngineType
a -> Configuration
s {$sel:engineType:Configuration' :: EngineType
engineType = EngineType
a} :: Configuration)
configuration_id :: Lens.Lens' Configuration Prelude.Text
configuration_id :: Lens' Configuration Text
configuration_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Text
id :: Text
$sel:id:Configuration' :: Configuration -> Text
id} -> Text
id) (\s :: Configuration
s@Configuration' {} Text
a -> Configuration
s {$sel:id:Configuration' :: Text
id = Text
a} :: Configuration)
configuration_arn :: Lens.Lens' Configuration Prelude.Text
configuration_arn :: Lens' Configuration Text
configuration_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Text
arn :: Text
$sel:arn:Configuration' :: Configuration -> Text
arn} -> Text
arn) (\s :: Configuration
s@Configuration' {} Text
a -> Configuration
s {$sel:arn:Configuration' :: Text
arn = Text
a} :: Configuration)
configuration_name :: Lens.Lens' Configuration Prelude.Text
configuration_name :: Lens' Configuration Text
configuration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {Text
name :: Text
$sel:name:Configuration' :: Configuration -> Text
name} -> Text
name) (\s :: Configuration
s@Configuration' {} Text
a -> Configuration
s {$sel:name:Configuration' :: Text
name = Text
a} :: Configuration)
configuration_created :: Lens.Lens' Configuration Prelude.UTCTime
configuration_created :: Lens' Configuration UTCTime
configuration_created = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Configuration' {ISO8601
created :: ISO8601
$sel:created:Configuration' :: Configuration -> ISO8601
created} -> ISO8601
created) (\s :: Configuration
s@Configuration' {} ISO8601
a -> Configuration
s {$sel:created:Configuration' :: ISO8601
created = ISO8601
a} :: Configuration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON Configuration where
parseJSON :: Value -> Parser Configuration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Configuration"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> Text
-> ConfigurationRevision
-> AuthenticationStrategy
-> EngineType
-> Text
-> Text
-> Text
-> ISO8601
-> Configuration
Configuration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"engineVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"latestRevision")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"authenticationStrategy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"engineType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"created")
)
instance Prelude.Hashable Configuration where
hashWithSalt :: Int -> Configuration -> Int
hashWithSalt Int
_salt Configuration' {Maybe (HashMap Text Text)
Text
ISO8601
AuthenticationStrategy
ConfigurationRevision
EngineType
created :: ISO8601
name :: Text
arn :: Text
id :: Text
engineType :: EngineType
authenticationStrategy :: AuthenticationStrategy
latestRevision :: ConfigurationRevision
engineVersion :: Text
description :: Text
tags :: Maybe (HashMap Text Text)
$sel:created:Configuration' :: Configuration -> ISO8601
$sel:name:Configuration' :: Configuration -> Text
$sel:arn:Configuration' :: Configuration -> Text
$sel:id:Configuration' :: Configuration -> Text
$sel:engineType:Configuration' :: Configuration -> EngineType
$sel:authenticationStrategy:Configuration' :: Configuration -> AuthenticationStrategy
$sel:latestRevision:Configuration' :: Configuration -> ConfigurationRevision
$sel:engineVersion:Configuration' :: Configuration -> Text
$sel:description:Configuration' :: Configuration -> Text
$sel:tags:Configuration' :: Configuration -> Maybe (HashMap Text Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
engineVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ConfigurationRevision
latestRevision
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AuthenticationStrategy
authenticationStrategy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EngineType
engineType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
created
instance Prelude.NFData Configuration where
rnf :: Configuration -> ()
rnf Configuration' {Maybe (HashMap Text Text)
Text
ISO8601
AuthenticationStrategy
ConfigurationRevision
EngineType
created :: ISO8601
name :: Text
arn :: Text
id :: Text
engineType :: EngineType
authenticationStrategy :: AuthenticationStrategy
latestRevision :: ConfigurationRevision
engineVersion :: Text
description :: Text
tags :: Maybe (HashMap Text Text)
$sel:created:Configuration' :: Configuration -> ISO8601
$sel:name:Configuration' :: Configuration -> Text
$sel:arn:Configuration' :: Configuration -> Text
$sel:id:Configuration' :: Configuration -> Text
$sel:engineType:Configuration' :: Configuration -> EngineType
$sel:authenticationStrategy:Configuration' :: Configuration -> AuthenticationStrategy
$sel:latestRevision:Configuration' :: Configuration -> ConfigurationRevision
$sel:engineVersion:Configuration' :: Configuration -> Text
$sel:description:Configuration' :: Configuration -> Text
$sel:tags:Configuration' :: Configuration -> Maybe (HashMap Text Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
engineVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ConfigurationRevision
latestRevision
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AuthenticationStrategy
authenticationStrategy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EngineType
engineType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
created