{-# 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.SnapshotOptionsStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpenSearch.Types.OptionStatus
import Amazonka.OpenSearch.Types.SnapshotOptions
import qualified Amazonka.Prelude as Prelude
data SnapshotOptionsStatus = SnapshotOptionsStatus'
{
SnapshotOptionsStatus -> SnapshotOptions
options :: SnapshotOptions,
SnapshotOptionsStatus -> OptionStatus
status :: OptionStatus
}
deriving (SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool
(SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool)
-> (SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool)
-> Eq SnapshotOptionsStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool
$c/= :: SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool
== :: SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool
$c== :: SnapshotOptionsStatus -> SnapshotOptionsStatus -> Bool
Prelude.Eq, ReadPrec [SnapshotOptionsStatus]
ReadPrec SnapshotOptionsStatus
Int -> ReadS SnapshotOptionsStatus
ReadS [SnapshotOptionsStatus]
(Int -> ReadS SnapshotOptionsStatus)
-> ReadS [SnapshotOptionsStatus]
-> ReadPrec SnapshotOptionsStatus
-> ReadPrec [SnapshotOptionsStatus]
-> Read SnapshotOptionsStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapshotOptionsStatus]
$creadListPrec :: ReadPrec [SnapshotOptionsStatus]
readPrec :: ReadPrec SnapshotOptionsStatus
$creadPrec :: ReadPrec SnapshotOptionsStatus
readList :: ReadS [SnapshotOptionsStatus]
$creadList :: ReadS [SnapshotOptionsStatus]
readsPrec :: Int -> ReadS SnapshotOptionsStatus
$creadsPrec :: Int -> ReadS SnapshotOptionsStatus
Prelude.Read, Int -> SnapshotOptionsStatus -> ShowS
[SnapshotOptionsStatus] -> ShowS
SnapshotOptionsStatus -> String
(Int -> SnapshotOptionsStatus -> ShowS)
-> (SnapshotOptionsStatus -> String)
-> ([SnapshotOptionsStatus] -> ShowS)
-> Show SnapshotOptionsStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapshotOptionsStatus] -> ShowS
$cshowList :: [SnapshotOptionsStatus] -> ShowS
show :: SnapshotOptionsStatus -> String
$cshow :: SnapshotOptionsStatus -> String
showsPrec :: Int -> SnapshotOptionsStatus -> ShowS
$cshowsPrec :: Int -> SnapshotOptionsStatus -> ShowS
Prelude.Show, (forall x. SnapshotOptionsStatus -> Rep SnapshotOptionsStatus x)
-> (forall x. Rep SnapshotOptionsStatus x -> SnapshotOptionsStatus)
-> Generic SnapshotOptionsStatus
forall x. Rep SnapshotOptionsStatus x -> SnapshotOptionsStatus
forall x. SnapshotOptionsStatus -> Rep SnapshotOptionsStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapshotOptionsStatus x -> SnapshotOptionsStatus
$cfrom :: forall x. SnapshotOptionsStatus -> Rep SnapshotOptionsStatus x
Prelude.Generic)
newSnapshotOptionsStatus ::
SnapshotOptions ->
OptionStatus ->
SnapshotOptionsStatus
newSnapshotOptionsStatus :: SnapshotOptions -> OptionStatus -> SnapshotOptionsStatus
newSnapshotOptionsStatus SnapshotOptions
pOptions_ OptionStatus
pStatus_ =
SnapshotOptionsStatus' :: SnapshotOptions -> OptionStatus -> SnapshotOptionsStatus
SnapshotOptionsStatus'
{ $sel:options:SnapshotOptionsStatus' :: SnapshotOptions
options = SnapshotOptions
pOptions_,
$sel:status:SnapshotOptionsStatus' :: OptionStatus
status = OptionStatus
pStatus_
}
snapshotOptionsStatus_options :: Lens.Lens' SnapshotOptionsStatus SnapshotOptions
snapshotOptionsStatus_options :: (SnapshotOptions -> f SnapshotOptions)
-> SnapshotOptionsStatus -> f SnapshotOptionsStatus
snapshotOptionsStatus_options = (SnapshotOptionsStatus -> SnapshotOptions)
-> (SnapshotOptionsStatus
-> SnapshotOptions -> SnapshotOptionsStatus)
-> Lens
SnapshotOptionsStatus
SnapshotOptionsStatus
SnapshotOptions
SnapshotOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotOptionsStatus' {SnapshotOptions
options :: SnapshotOptions
$sel:options:SnapshotOptionsStatus' :: SnapshotOptionsStatus -> SnapshotOptions
options} -> SnapshotOptions
options) (\s :: SnapshotOptionsStatus
s@SnapshotOptionsStatus' {} SnapshotOptions
a -> SnapshotOptionsStatus
s {$sel:options:SnapshotOptionsStatus' :: SnapshotOptions
options = SnapshotOptions
a} :: SnapshotOptionsStatus)
snapshotOptionsStatus_status :: Lens.Lens' SnapshotOptionsStatus OptionStatus
snapshotOptionsStatus_status :: (OptionStatus -> f OptionStatus)
-> SnapshotOptionsStatus -> f SnapshotOptionsStatus
snapshotOptionsStatus_status = (SnapshotOptionsStatus -> OptionStatus)
-> (SnapshotOptionsStatus -> OptionStatus -> SnapshotOptionsStatus)
-> Lens
SnapshotOptionsStatus
SnapshotOptionsStatus
OptionStatus
OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotOptionsStatus' {OptionStatus
status :: OptionStatus
$sel:status:SnapshotOptionsStatus' :: SnapshotOptionsStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: SnapshotOptionsStatus
s@SnapshotOptionsStatus' {} OptionStatus
a -> SnapshotOptionsStatus
s {$sel:status:SnapshotOptionsStatus' :: OptionStatus
status = OptionStatus
a} :: SnapshotOptionsStatus)
instance Core.FromJSON SnapshotOptionsStatus where
parseJSON :: Value -> Parser SnapshotOptionsStatus
parseJSON =
String
-> (Object -> Parser SnapshotOptionsStatus)
-> Value
-> Parser SnapshotOptionsStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SnapshotOptionsStatus"
( \Object
x ->
SnapshotOptions -> OptionStatus -> SnapshotOptionsStatus
SnapshotOptionsStatus'
(SnapshotOptions -> OptionStatus -> SnapshotOptionsStatus)
-> Parser SnapshotOptions
-> Parser (OptionStatus -> SnapshotOptionsStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser SnapshotOptions
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Options")
Parser (OptionStatus -> SnapshotOptionsStatus)
-> Parser OptionStatus -> Parser SnapshotOptionsStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OptionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
)
instance Prelude.Hashable SnapshotOptionsStatus
instance Prelude.NFData SnapshotOptionsStatus