{-# 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.OpenSearch.Types.InstanceTypeDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.OpenSearch.Types.OpenSearchPartitionInstanceType
import qualified Amazonka.Prelude as Prelude
data InstanceTypeDetails = InstanceTypeDetails'
{
InstanceTypeDetails -> Maybe Bool
advancedSecurityEnabled :: Prelude.Maybe Prelude.Bool,
InstanceTypeDetails -> Maybe Bool
appLogsEnabled :: Prelude.Maybe Prelude.Bool,
InstanceTypeDetails -> Maybe Bool
cognitoEnabled :: Prelude.Maybe Prelude.Bool,
InstanceTypeDetails -> Maybe Bool
encryptionEnabled :: Prelude.Maybe Prelude.Bool,
InstanceTypeDetails -> Maybe [Text]
instanceRole :: Prelude.Maybe [Prelude.Text],
InstanceTypeDetails -> Maybe OpenSearchPartitionInstanceType
instanceType :: Prelude.Maybe OpenSearchPartitionInstanceType,
InstanceTypeDetails -> Maybe Bool
warmEnabled :: Prelude.Maybe Prelude.Bool
}
deriving (InstanceTypeDetails -> InstanceTypeDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceTypeDetails -> InstanceTypeDetails -> Bool
$c/= :: InstanceTypeDetails -> InstanceTypeDetails -> Bool
== :: InstanceTypeDetails -> InstanceTypeDetails -> Bool
$c== :: InstanceTypeDetails -> InstanceTypeDetails -> Bool
Prelude.Eq, ReadPrec [InstanceTypeDetails]
ReadPrec InstanceTypeDetails
Int -> ReadS InstanceTypeDetails
ReadS [InstanceTypeDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceTypeDetails]
$creadListPrec :: ReadPrec [InstanceTypeDetails]
readPrec :: ReadPrec InstanceTypeDetails
$creadPrec :: ReadPrec InstanceTypeDetails
readList :: ReadS [InstanceTypeDetails]
$creadList :: ReadS [InstanceTypeDetails]
readsPrec :: Int -> ReadS InstanceTypeDetails
$creadsPrec :: Int -> ReadS InstanceTypeDetails
Prelude.Read, Int -> InstanceTypeDetails -> ShowS
[InstanceTypeDetails] -> ShowS
InstanceTypeDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceTypeDetails] -> ShowS
$cshowList :: [InstanceTypeDetails] -> ShowS
show :: InstanceTypeDetails -> String
$cshow :: InstanceTypeDetails -> String
showsPrec :: Int -> InstanceTypeDetails -> ShowS
$cshowsPrec :: Int -> InstanceTypeDetails -> ShowS
Prelude.Show, forall x. Rep InstanceTypeDetails x -> InstanceTypeDetails
forall x. InstanceTypeDetails -> Rep InstanceTypeDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceTypeDetails x -> InstanceTypeDetails
$cfrom :: forall x. InstanceTypeDetails -> Rep InstanceTypeDetails x
Prelude.Generic)
newInstanceTypeDetails ::
InstanceTypeDetails
newInstanceTypeDetails :: InstanceTypeDetails
newInstanceTypeDetails =
InstanceTypeDetails'
{ $sel:advancedSecurityEnabled:InstanceTypeDetails' :: Maybe Bool
advancedSecurityEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:appLogsEnabled:InstanceTypeDetails' :: Maybe Bool
appLogsEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:cognitoEnabled:InstanceTypeDetails' :: Maybe Bool
cognitoEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:encryptionEnabled:InstanceTypeDetails' :: Maybe Bool
encryptionEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:instanceRole:InstanceTypeDetails' :: Maybe [Text]
instanceRole = forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:InstanceTypeDetails' :: Maybe OpenSearchPartitionInstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:warmEnabled:InstanceTypeDetails' :: Maybe Bool
warmEnabled = forall a. Maybe a
Prelude.Nothing
}
instanceTypeDetails_advancedSecurityEnabled :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe Prelude.Bool)
instanceTypeDetails_advancedSecurityEnabled :: Lens' InstanceTypeDetails (Maybe Bool)
instanceTypeDetails_advancedSecurityEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe Bool
advancedSecurityEnabled :: Maybe Bool
$sel:advancedSecurityEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
advancedSecurityEnabled} -> Maybe Bool
advancedSecurityEnabled) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe Bool
a -> InstanceTypeDetails
s {$sel:advancedSecurityEnabled:InstanceTypeDetails' :: Maybe Bool
advancedSecurityEnabled = Maybe Bool
a} :: InstanceTypeDetails)
instanceTypeDetails_appLogsEnabled :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe Prelude.Bool)
instanceTypeDetails_appLogsEnabled :: Lens' InstanceTypeDetails (Maybe Bool)
instanceTypeDetails_appLogsEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe Bool
appLogsEnabled :: Maybe Bool
$sel:appLogsEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
appLogsEnabled} -> Maybe Bool
appLogsEnabled) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe Bool
a -> InstanceTypeDetails
s {$sel:appLogsEnabled:InstanceTypeDetails' :: Maybe Bool
appLogsEnabled = Maybe Bool
a} :: InstanceTypeDetails)
instanceTypeDetails_cognitoEnabled :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe Prelude.Bool)
instanceTypeDetails_cognitoEnabled :: Lens' InstanceTypeDetails (Maybe Bool)
instanceTypeDetails_cognitoEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe Bool
cognitoEnabled :: Maybe Bool
$sel:cognitoEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
cognitoEnabled} -> Maybe Bool
cognitoEnabled) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe Bool
a -> InstanceTypeDetails
s {$sel:cognitoEnabled:InstanceTypeDetails' :: Maybe Bool
cognitoEnabled = Maybe Bool
a} :: InstanceTypeDetails)
instanceTypeDetails_encryptionEnabled :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe Prelude.Bool)
instanceTypeDetails_encryptionEnabled :: Lens' InstanceTypeDetails (Maybe Bool)
instanceTypeDetails_encryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe Bool
encryptionEnabled :: Maybe Bool
$sel:encryptionEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
encryptionEnabled} -> Maybe Bool
encryptionEnabled) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe Bool
a -> InstanceTypeDetails
s {$sel:encryptionEnabled:InstanceTypeDetails' :: Maybe Bool
encryptionEnabled = Maybe Bool
a} :: InstanceTypeDetails)
instanceTypeDetails_instanceRole :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe [Prelude.Text])
instanceTypeDetails_instanceRole :: Lens' InstanceTypeDetails (Maybe [Text])
instanceTypeDetails_instanceRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe [Text]
instanceRole :: Maybe [Text]
$sel:instanceRole:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe [Text]
instanceRole} -> Maybe [Text]
instanceRole) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe [Text]
a -> InstanceTypeDetails
s {$sel:instanceRole:InstanceTypeDetails' :: Maybe [Text]
instanceRole = Maybe [Text]
a} :: InstanceTypeDetails) 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
instanceTypeDetails_instanceType :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe OpenSearchPartitionInstanceType)
instanceTypeDetails_instanceType :: Lens' InstanceTypeDetails (Maybe OpenSearchPartitionInstanceType)
instanceTypeDetails_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe OpenSearchPartitionInstanceType
instanceType :: Maybe OpenSearchPartitionInstanceType
$sel:instanceType:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe OpenSearchPartitionInstanceType
instanceType} -> Maybe OpenSearchPartitionInstanceType
instanceType) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe OpenSearchPartitionInstanceType
a -> InstanceTypeDetails
s {$sel:instanceType:InstanceTypeDetails' :: Maybe OpenSearchPartitionInstanceType
instanceType = Maybe OpenSearchPartitionInstanceType
a} :: InstanceTypeDetails)
instanceTypeDetails_warmEnabled :: Lens.Lens' InstanceTypeDetails (Prelude.Maybe Prelude.Bool)
instanceTypeDetails_warmEnabled :: Lens' InstanceTypeDetails (Maybe Bool)
instanceTypeDetails_warmEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeDetails' {Maybe Bool
warmEnabled :: Maybe Bool
$sel:warmEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
warmEnabled} -> Maybe Bool
warmEnabled) (\s :: InstanceTypeDetails
s@InstanceTypeDetails' {} Maybe Bool
a -> InstanceTypeDetails
s {$sel:warmEnabled:InstanceTypeDetails' :: Maybe Bool
warmEnabled = Maybe Bool
a} :: InstanceTypeDetails)
instance Data.FromJSON InstanceTypeDetails where
parseJSON :: Value -> Parser InstanceTypeDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InstanceTypeDetails"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> InstanceTypeDetails
InstanceTypeDetails'
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
"AdvancedSecurityEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AppLogsEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CognitoEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EncryptionEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InstanceRole" 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 (Maybe a)
Data..:? Key
"InstanceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WarmEnabled")
)
instance Prelude.Hashable InstanceTypeDetails where
hashWithSalt :: Int -> InstanceTypeDetails -> Int
hashWithSalt Int
_salt InstanceTypeDetails' {Maybe Bool
Maybe [Text]
Maybe OpenSearchPartitionInstanceType
warmEnabled :: Maybe Bool
instanceType :: Maybe OpenSearchPartitionInstanceType
instanceRole :: Maybe [Text]
encryptionEnabled :: Maybe Bool
cognitoEnabled :: Maybe Bool
appLogsEnabled :: Maybe Bool
advancedSecurityEnabled :: Maybe Bool
$sel:warmEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:instanceType:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe OpenSearchPartitionInstanceType
$sel:instanceRole:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe [Text]
$sel:encryptionEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:cognitoEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:appLogsEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:advancedSecurityEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
advancedSecurityEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
appLogsEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
cognitoEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
encryptionEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
instanceRole
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenSearchPartitionInstanceType
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
warmEnabled
instance Prelude.NFData InstanceTypeDetails where
rnf :: InstanceTypeDetails -> ()
rnf InstanceTypeDetails' {Maybe Bool
Maybe [Text]
Maybe OpenSearchPartitionInstanceType
warmEnabled :: Maybe Bool
instanceType :: Maybe OpenSearchPartitionInstanceType
instanceRole :: Maybe [Text]
encryptionEnabled :: Maybe Bool
cognitoEnabled :: Maybe Bool
appLogsEnabled :: Maybe Bool
advancedSecurityEnabled :: Maybe Bool
$sel:warmEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:instanceType:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe OpenSearchPartitionInstanceType
$sel:instanceRole:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe [Text]
$sel:encryptionEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:cognitoEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:appLogsEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
$sel:advancedSecurityEnabled:InstanceTypeDetails' :: InstanceTypeDetails -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
advancedSecurityEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
appLogsEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
cognitoEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
encryptionEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
instanceRole
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenSearchPartitionInstanceType
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
warmEnabled