{-# 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.BrokerInstanceOption where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MQ.Types.AvailabilityZone
import Amazonka.MQ.Types.BrokerStorageType
import Amazonka.MQ.Types.DeploymentMode
import Amazonka.MQ.Types.EngineType
import qualified Amazonka.Prelude as Prelude
data BrokerInstanceOption = BrokerInstanceOption'
{
BrokerInstanceOption -> Maybe [Text]
supportedEngineVersions :: Prelude.Maybe [Prelude.Text],
BrokerInstanceOption -> Maybe [AvailabilityZone]
availabilityZones :: Prelude.Maybe [AvailabilityZone],
BrokerInstanceOption -> Maybe [DeploymentMode]
supportedDeploymentModes :: Prelude.Maybe [DeploymentMode],
BrokerInstanceOption -> Maybe EngineType
engineType :: Prelude.Maybe EngineType,
BrokerInstanceOption -> Maybe Text
hostInstanceType :: Prelude.Maybe Prelude.Text,
BrokerInstanceOption -> Maybe BrokerStorageType
storageType :: Prelude.Maybe BrokerStorageType
}
deriving (BrokerInstanceOption -> BrokerInstanceOption -> Bool
(BrokerInstanceOption -> BrokerInstanceOption -> Bool)
-> (BrokerInstanceOption -> BrokerInstanceOption -> Bool)
-> Eq BrokerInstanceOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BrokerInstanceOption -> BrokerInstanceOption -> Bool
$c/= :: BrokerInstanceOption -> BrokerInstanceOption -> Bool
== :: BrokerInstanceOption -> BrokerInstanceOption -> Bool
$c== :: BrokerInstanceOption -> BrokerInstanceOption -> Bool
Prelude.Eq, ReadPrec [BrokerInstanceOption]
ReadPrec BrokerInstanceOption
Int -> ReadS BrokerInstanceOption
ReadS [BrokerInstanceOption]
(Int -> ReadS BrokerInstanceOption)
-> ReadS [BrokerInstanceOption]
-> ReadPrec BrokerInstanceOption
-> ReadPrec [BrokerInstanceOption]
-> Read BrokerInstanceOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BrokerInstanceOption]
$creadListPrec :: ReadPrec [BrokerInstanceOption]
readPrec :: ReadPrec BrokerInstanceOption
$creadPrec :: ReadPrec BrokerInstanceOption
readList :: ReadS [BrokerInstanceOption]
$creadList :: ReadS [BrokerInstanceOption]
readsPrec :: Int -> ReadS BrokerInstanceOption
$creadsPrec :: Int -> ReadS BrokerInstanceOption
Prelude.Read, Int -> BrokerInstanceOption -> ShowS
[BrokerInstanceOption] -> ShowS
BrokerInstanceOption -> String
(Int -> BrokerInstanceOption -> ShowS)
-> (BrokerInstanceOption -> String)
-> ([BrokerInstanceOption] -> ShowS)
-> Show BrokerInstanceOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BrokerInstanceOption] -> ShowS
$cshowList :: [BrokerInstanceOption] -> ShowS
show :: BrokerInstanceOption -> String
$cshow :: BrokerInstanceOption -> String
showsPrec :: Int -> BrokerInstanceOption -> ShowS
$cshowsPrec :: Int -> BrokerInstanceOption -> ShowS
Prelude.Show, (forall x. BrokerInstanceOption -> Rep BrokerInstanceOption x)
-> (forall x. Rep BrokerInstanceOption x -> BrokerInstanceOption)
-> Generic BrokerInstanceOption
forall x. Rep BrokerInstanceOption x -> BrokerInstanceOption
forall x. BrokerInstanceOption -> Rep BrokerInstanceOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BrokerInstanceOption x -> BrokerInstanceOption
$cfrom :: forall x. BrokerInstanceOption -> Rep BrokerInstanceOption x
Prelude.Generic)
newBrokerInstanceOption ::
BrokerInstanceOption
newBrokerInstanceOption :: BrokerInstanceOption
newBrokerInstanceOption =
BrokerInstanceOption' :: Maybe [Text]
-> Maybe [AvailabilityZone]
-> Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption
BrokerInstanceOption'
{ $sel:supportedEngineVersions:BrokerInstanceOption' :: Maybe [Text]
supportedEngineVersions =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:BrokerInstanceOption' :: Maybe [AvailabilityZone]
availabilityZones = Maybe [AvailabilityZone]
forall a. Maybe a
Prelude.Nothing,
$sel:supportedDeploymentModes:BrokerInstanceOption' :: Maybe [DeploymentMode]
supportedDeploymentModes = Maybe [DeploymentMode]
forall a. Maybe a
Prelude.Nothing,
$sel:engineType:BrokerInstanceOption' :: Maybe EngineType
engineType = Maybe EngineType
forall a. Maybe a
Prelude.Nothing,
$sel:hostInstanceType:BrokerInstanceOption' :: Maybe Text
hostInstanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:storageType:BrokerInstanceOption' :: Maybe BrokerStorageType
storageType = Maybe BrokerStorageType
forall a. Maybe a
Prelude.Nothing
}
brokerInstanceOption_supportedEngineVersions :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe [Prelude.Text])
brokerInstanceOption_supportedEngineVersions :: (Maybe [Text] -> f (Maybe [Text]))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_supportedEngineVersions = (BrokerInstanceOption -> Maybe [Text])
-> (BrokerInstanceOption -> Maybe [Text] -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption
BrokerInstanceOption
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe [Text]
supportedEngineVersions :: Maybe [Text]
$sel:supportedEngineVersions:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe [Text]
supportedEngineVersions} -> Maybe [Text]
supportedEngineVersions) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe [Text]
a -> BrokerInstanceOption
s {$sel:supportedEngineVersions:BrokerInstanceOption' :: Maybe [Text]
supportedEngineVersions = Maybe [Text]
a} :: BrokerInstanceOption) ((Maybe [Text] -> f (Maybe [Text]))
-> BrokerInstanceOption -> f BrokerInstanceOption)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BrokerInstanceOption
-> f BrokerInstanceOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
brokerInstanceOption_availabilityZones :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe [AvailabilityZone])
brokerInstanceOption_availabilityZones :: (Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_availabilityZones = (BrokerInstanceOption -> Maybe [AvailabilityZone])
-> (BrokerInstanceOption
-> Maybe [AvailabilityZone] -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption
BrokerInstanceOption
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe [AvailabilityZone]
availabilityZones :: Maybe [AvailabilityZone]
$sel:availabilityZones:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe [AvailabilityZone]
availabilityZones} -> Maybe [AvailabilityZone]
availabilityZones) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe [AvailabilityZone]
a -> BrokerInstanceOption
s {$sel:availabilityZones:BrokerInstanceOption' :: Maybe [AvailabilityZone]
availabilityZones = Maybe [AvailabilityZone]
a} :: BrokerInstanceOption) ((Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> BrokerInstanceOption -> f BrokerInstanceOption)
-> ((Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> (Maybe [AvailabilityZone] -> f (Maybe [AvailabilityZone]))
-> BrokerInstanceOption
-> f BrokerInstanceOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
-> Iso
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
(Maybe [AvailabilityZone])
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 AnIso
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
[AvailabilityZone]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
brokerInstanceOption_supportedDeploymentModes :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe [DeploymentMode])
brokerInstanceOption_supportedDeploymentModes :: (Maybe [DeploymentMode] -> f (Maybe [DeploymentMode]))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_supportedDeploymentModes = (BrokerInstanceOption -> Maybe [DeploymentMode])
-> (BrokerInstanceOption
-> Maybe [DeploymentMode] -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption
BrokerInstanceOption
(Maybe [DeploymentMode])
(Maybe [DeploymentMode])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe [DeploymentMode]
supportedDeploymentModes :: Maybe [DeploymentMode]
$sel:supportedDeploymentModes:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe [DeploymentMode]
supportedDeploymentModes} -> Maybe [DeploymentMode]
supportedDeploymentModes) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe [DeploymentMode]
a -> BrokerInstanceOption
s {$sel:supportedDeploymentModes:BrokerInstanceOption' :: Maybe [DeploymentMode]
supportedDeploymentModes = Maybe [DeploymentMode]
a} :: BrokerInstanceOption) ((Maybe [DeploymentMode] -> f (Maybe [DeploymentMode]))
-> BrokerInstanceOption -> f BrokerInstanceOption)
-> ((Maybe [DeploymentMode] -> f (Maybe [DeploymentMode]))
-> Maybe [DeploymentMode] -> f (Maybe [DeploymentMode]))
-> (Maybe [DeploymentMode] -> f (Maybe [DeploymentMode]))
-> BrokerInstanceOption
-> f BrokerInstanceOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DeploymentMode] [DeploymentMode] [DeploymentMode] [DeploymentMode]
-> Iso
(Maybe [DeploymentMode])
(Maybe [DeploymentMode])
(Maybe [DeploymentMode])
(Maybe [DeploymentMode])
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 AnIso
[DeploymentMode] [DeploymentMode] [DeploymentMode] [DeploymentMode]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
brokerInstanceOption_engineType :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe EngineType)
brokerInstanceOption_engineType :: (Maybe EngineType -> f (Maybe EngineType))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_engineType = (BrokerInstanceOption -> Maybe EngineType)
-> (BrokerInstanceOption
-> Maybe EngineType -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption
BrokerInstanceOption
(Maybe EngineType)
(Maybe EngineType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe EngineType
engineType :: Maybe EngineType
$sel:engineType:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe EngineType
engineType} -> Maybe EngineType
engineType) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe EngineType
a -> BrokerInstanceOption
s {$sel:engineType:BrokerInstanceOption' :: Maybe EngineType
engineType = Maybe EngineType
a} :: BrokerInstanceOption)
brokerInstanceOption_hostInstanceType :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe Prelude.Text)
brokerInstanceOption_hostInstanceType :: (Maybe Text -> f (Maybe Text))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_hostInstanceType = (BrokerInstanceOption -> Maybe Text)
-> (BrokerInstanceOption -> Maybe Text -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption BrokerInstanceOption (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe Text
hostInstanceType :: Maybe Text
$sel:hostInstanceType:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe Text
hostInstanceType} -> Maybe Text
hostInstanceType) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe Text
a -> BrokerInstanceOption
s {$sel:hostInstanceType:BrokerInstanceOption' :: Maybe Text
hostInstanceType = Maybe Text
a} :: BrokerInstanceOption)
brokerInstanceOption_storageType :: Lens.Lens' BrokerInstanceOption (Prelude.Maybe BrokerStorageType)
brokerInstanceOption_storageType :: (Maybe BrokerStorageType -> f (Maybe BrokerStorageType))
-> BrokerInstanceOption -> f BrokerInstanceOption
brokerInstanceOption_storageType = (BrokerInstanceOption -> Maybe BrokerStorageType)
-> (BrokerInstanceOption
-> Maybe BrokerStorageType -> BrokerInstanceOption)
-> Lens
BrokerInstanceOption
BrokerInstanceOption
(Maybe BrokerStorageType)
(Maybe BrokerStorageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerInstanceOption' {Maybe BrokerStorageType
storageType :: Maybe BrokerStorageType
$sel:storageType:BrokerInstanceOption' :: BrokerInstanceOption -> Maybe BrokerStorageType
storageType} -> Maybe BrokerStorageType
storageType) (\s :: BrokerInstanceOption
s@BrokerInstanceOption' {} Maybe BrokerStorageType
a -> BrokerInstanceOption
s {$sel:storageType:BrokerInstanceOption' :: Maybe BrokerStorageType
storageType = Maybe BrokerStorageType
a} :: BrokerInstanceOption)
instance Core.FromJSON BrokerInstanceOption where
parseJSON :: Value -> Parser BrokerInstanceOption
parseJSON =
String
-> (Object -> Parser BrokerInstanceOption)
-> Value
-> Parser BrokerInstanceOption
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BrokerInstanceOption"
( \Object
x ->
Maybe [Text]
-> Maybe [AvailabilityZone]
-> Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption
BrokerInstanceOption'
(Maybe [Text]
-> Maybe [AvailabilityZone]
-> Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption)
-> Parser (Maybe [Text])
-> Parser
(Maybe [AvailabilityZone]
-> Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedEngineVersions"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [AvailabilityZone]
-> Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption)
-> Parser (Maybe [AvailabilityZone])
-> Parser
(Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AvailabilityZone]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"availabilityZones"
Parser (Maybe (Maybe [AvailabilityZone]))
-> Maybe [AvailabilityZone] -> Parser (Maybe [AvailabilityZone])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AvailabilityZone]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [DeploymentMode]
-> Maybe EngineType
-> Maybe Text
-> Maybe BrokerStorageType
-> BrokerInstanceOption)
-> Parser (Maybe [DeploymentMode])
-> Parser
(Maybe EngineType
-> Maybe Text -> Maybe BrokerStorageType -> BrokerInstanceOption)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [DeploymentMode]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedDeploymentModes"
Parser (Maybe (Maybe [DeploymentMode]))
-> Maybe [DeploymentMode] -> Parser (Maybe [DeploymentMode])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [DeploymentMode]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe EngineType
-> Maybe Text -> Maybe BrokerStorageType -> BrokerInstanceOption)
-> Parser (Maybe EngineType)
-> Parser
(Maybe Text -> Maybe BrokerStorageType -> BrokerInstanceOption)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EngineType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"engineType")
Parser
(Maybe Text -> Maybe BrokerStorageType -> BrokerInstanceOption)
-> Parser (Maybe Text)
-> Parser (Maybe BrokerStorageType -> BrokerInstanceOption)
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
"hostInstanceType")
Parser (Maybe BrokerStorageType -> BrokerInstanceOption)
-> Parser (Maybe BrokerStorageType) -> Parser BrokerInstanceOption
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BrokerStorageType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"storageType")
)
instance Prelude.Hashable BrokerInstanceOption
instance Prelude.NFData BrokerInstanceOption