{-# 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.ServiceSoftwareOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpenSearch.Types.DeploymentStatus
import qualified Amazonka.Prelude as Prelude
data ServiceSoftwareOptions = ServiceSoftwareOptions'
{
ServiceSoftwareOptions -> Maybe POSIX
automatedUpdateDate :: Prelude.Maybe Core.POSIX,
ServiceSoftwareOptions -> Maybe Text
currentVersion :: Prelude.Maybe Prelude.Text,
ServiceSoftwareOptions -> Maybe Bool
optionalDeployment :: Prelude.Maybe Prelude.Bool,
ServiceSoftwareOptions -> Maybe DeploymentStatus
updateStatus :: Prelude.Maybe DeploymentStatus,
ServiceSoftwareOptions -> Maybe Bool
cancellable :: Prelude.Maybe Prelude.Bool,
ServiceSoftwareOptions -> Maybe Bool
updateAvailable :: Prelude.Maybe Prelude.Bool,
ServiceSoftwareOptions -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ServiceSoftwareOptions -> Maybe Text
newVersion' :: Prelude.Maybe Prelude.Text
}
deriving (ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool
(ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool)
-> (ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool)
-> Eq ServiceSoftwareOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool
$c/= :: ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool
== :: ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool
$c== :: ServiceSoftwareOptions -> ServiceSoftwareOptions -> Bool
Prelude.Eq, ReadPrec [ServiceSoftwareOptions]
ReadPrec ServiceSoftwareOptions
Int -> ReadS ServiceSoftwareOptions
ReadS [ServiceSoftwareOptions]
(Int -> ReadS ServiceSoftwareOptions)
-> ReadS [ServiceSoftwareOptions]
-> ReadPrec ServiceSoftwareOptions
-> ReadPrec [ServiceSoftwareOptions]
-> Read ServiceSoftwareOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceSoftwareOptions]
$creadListPrec :: ReadPrec [ServiceSoftwareOptions]
readPrec :: ReadPrec ServiceSoftwareOptions
$creadPrec :: ReadPrec ServiceSoftwareOptions
readList :: ReadS [ServiceSoftwareOptions]
$creadList :: ReadS [ServiceSoftwareOptions]
readsPrec :: Int -> ReadS ServiceSoftwareOptions
$creadsPrec :: Int -> ReadS ServiceSoftwareOptions
Prelude.Read, Int -> ServiceSoftwareOptions -> ShowS
[ServiceSoftwareOptions] -> ShowS
ServiceSoftwareOptions -> String
(Int -> ServiceSoftwareOptions -> ShowS)
-> (ServiceSoftwareOptions -> String)
-> ([ServiceSoftwareOptions] -> ShowS)
-> Show ServiceSoftwareOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceSoftwareOptions] -> ShowS
$cshowList :: [ServiceSoftwareOptions] -> ShowS
show :: ServiceSoftwareOptions -> String
$cshow :: ServiceSoftwareOptions -> String
showsPrec :: Int -> ServiceSoftwareOptions -> ShowS
$cshowsPrec :: Int -> ServiceSoftwareOptions -> ShowS
Prelude.Show, (forall x. ServiceSoftwareOptions -> Rep ServiceSoftwareOptions x)
-> (forall x.
Rep ServiceSoftwareOptions x -> ServiceSoftwareOptions)
-> Generic ServiceSoftwareOptions
forall x. Rep ServiceSoftwareOptions x -> ServiceSoftwareOptions
forall x. ServiceSoftwareOptions -> Rep ServiceSoftwareOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceSoftwareOptions x -> ServiceSoftwareOptions
$cfrom :: forall x. ServiceSoftwareOptions -> Rep ServiceSoftwareOptions x
Prelude.Generic)
newServiceSoftwareOptions ::
ServiceSoftwareOptions
newServiceSoftwareOptions :: ServiceSoftwareOptions
newServiceSoftwareOptions =
ServiceSoftwareOptions' :: Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions
ServiceSoftwareOptions'
{ $sel:automatedUpdateDate:ServiceSoftwareOptions' :: Maybe POSIX
automatedUpdateDate =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:currentVersion:ServiceSoftwareOptions' :: Maybe Text
currentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optionalDeployment:ServiceSoftwareOptions' :: Maybe Bool
optionalDeployment = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:updateStatus:ServiceSoftwareOptions' :: Maybe DeploymentStatus
updateStatus = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
$sel:cancellable:ServiceSoftwareOptions' :: Maybe Bool
cancellable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:updateAvailable:ServiceSoftwareOptions' :: Maybe Bool
updateAvailable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceSoftwareOptions' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:newVersion':ServiceSoftwareOptions' :: Maybe Text
newVersion' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serviceSoftwareOptions_automatedUpdateDate :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.UTCTime)
serviceSoftwareOptions_automatedUpdateDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_automatedUpdateDate = (ServiceSoftwareOptions -> Maybe POSIX)
-> (ServiceSoftwareOptions
-> Maybe POSIX -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe POSIX
automatedUpdateDate :: Maybe POSIX
$sel:automatedUpdateDate:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe POSIX
automatedUpdateDate} -> Maybe POSIX
automatedUpdateDate) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe POSIX
a -> ServiceSoftwareOptions
s {$sel:automatedUpdateDate:ServiceSoftwareOptions' :: Maybe POSIX
automatedUpdateDate = Maybe POSIX
a} :: ServiceSoftwareOptions) ((Maybe POSIX -> f (Maybe POSIX))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSoftwareOptions
-> f ServiceSoftwareOptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceSoftwareOptions_currentVersion :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Text)
serviceSoftwareOptions_currentVersion :: (Maybe Text -> f (Maybe Text))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_currentVersion = (ServiceSoftwareOptions -> Maybe Text)
-> (ServiceSoftwareOptions -> Maybe Text -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Text
currentVersion :: Maybe Text
$sel:currentVersion:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Text
currentVersion} -> Maybe Text
currentVersion) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Text
a -> ServiceSoftwareOptions
s {$sel:currentVersion:ServiceSoftwareOptions' :: Maybe Text
currentVersion = Maybe Text
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_optionalDeployment :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Bool)
serviceSoftwareOptions_optionalDeployment :: (Maybe Bool -> f (Maybe Bool))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_optionalDeployment = (ServiceSoftwareOptions -> Maybe Bool)
-> (ServiceSoftwareOptions -> Maybe Bool -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Bool
optionalDeployment :: Maybe Bool
$sel:optionalDeployment:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Bool
optionalDeployment} -> Maybe Bool
optionalDeployment) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Bool
a -> ServiceSoftwareOptions
s {$sel:optionalDeployment:ServiceSoftwareOptions' :: Maybe Bool
optionalDeployment = Maybe Bool
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_updateStatus :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe DeploymentStatus)
serviceSoftwareOptions_updateStatus :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_updateStatus = (ServiceSoftwareOptions -> Maybe DeploymentStatus)
-> (ServiceSoftwareOptions
-> Maybe DeploymentStatus -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe DeploymentStatus)
(Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe DeploymentStatus
updateStatus :: Maybe DeploymentStatus
$sel:updateStatus:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe DeploymentStatus
updateStatus} -> Maybe DeploymentStatus
updateStatus) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe DeploymentStatus
a -> ServiceSoftwareOptions
s {$sel:updateStatus:ServiceSoftwareOptions' :: Maybe DeploymentStatus
updateStatus = Maybe DeploymentStatus
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_cancellable :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Bool)
serviceSoftwareOptions_cancellable :: (Maybe Bool -> f (Maybe Bool))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_cancellable = (ServiceSoftwareOptions -> Maybe Bool)
-> (ServiceSoftwareOptions -> Maybe Bool -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Bool
cancellable :: Maybe Bool
$sel:cancellable:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Bool
cancellable} -> Maybe Bool
cancellable) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Bool
a -> ServiceSoftwareOptions
s {$sel:cancellable:ServiceSoftwareOptions' :: Maybe Bool
cancellable = Maybe Bool
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_updateAvailable :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Bool)
serviceSoftwareOptions_updateAvailable :: (Maybe Bool -> f (Maybe Bool))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_updateAvailable = (ServiceSoftwareOptions -> Maybe Bool)
-> (ServiceSoftwareOptions -> Maybe Bool -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Bool
updateAvailable :: Maybe Bool
$sel:updateAvailable:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Bool
updateAvailable} -> Maybe Bool
updateAvailable) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Bool
a -> ServiceSoftwareOptions
s {$sel:updateAvailable:ServiceSoftwareOptions' :: Maybe Bool
updateAvailable = Maybe Bool
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_description :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Text)
serviceSoftwareOptions_description :: (Maybe Text -> f (Maybe Text))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_description = (ServiceSoftwareOptions -> Maybe Text)
-> (ServiceSoftwareOptions -> Maybe Text -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Text
description :: Maybe Text
$sel:description:ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Text
description} -> Maybe Text
description) (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Text
a -> ServiceSoftwareOptions
s {$sel:description:ServiceSoftwareOptions' :: Maybe Text
description = Maybe Text
a} :: ServiceSoftwareOptions)
serviceSoftwareOptions_newVersion :: Lens.Lens' ServiceSoftwareOptions (Prelude.Maybe Prelude.Text)
serviceSoftwareOptions_newVersion :: (Maybe Text -> f (Maybe Text))
-> ServiceSoftwareOptions -> f ServiceSoftwareOptions
serviceSoftwareOptions_newVersion = (ServiceSoftwareOptions -> Maybe Text)
-> (ServiceSoftwareOptions -> Maybe Text -> ServiceSoftwareOptions)
-> Lens
ServiceSoftwareOptions
ServiceSoftwareOptions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSoftwareOptions' {Maybe Text
newVersion' :: Maybe Text
$sel:newVersion':ServiceSoftwareOptions' :: ServiceSoftwareOptions -> Maybe Text
newVersion'} -> Maybe Text
newVersion') (\s :: ServiceSoftwareOptions
s@ServiceSoftwareOptions' {} Maybe Text
a -> ServiceSoftwareOptions
s {$sel:newVersion':ServiceSoftwareOptions' :: Maybe Text
newVersion' = Maybe Text
a} :: ServiceSoftwareOptions)
instance Core.FromJSON ServiceSoftwareOptions where
parseJSON :: Value -> Parser ServiceSoftwareOptions
parseJSON =
String
-> (Object -> Parser ServiceSoftwareOptions)
-> Value
-> Parser ServiceSoftwareOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceSoftwareOptions"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions
ServiceSoftwareOptions'
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutomatedUpdateDate")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
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
"CurrentVersion")
Parser
(Maybe Bool
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
-> Parser (Maybe Bool)
-> Parser
(Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OptionalDeployment")
Parser
(Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
-> Parser (Maybe DeploymentStatus)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdateStatus")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ServiceSoftwareOptions)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> ServiceSoftwareOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Cancellable")
Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> ServiceSoftwareOptions)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> ServiceSoftwareOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdateAvailable")
Parser (Maybe Text -> Maybe Text -> ServiceSoftwareOptions)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ServiceSoftwareOptions)
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
"Description")
Parser (Maybe Text -> ServiceSoftwareOptions)
-> Parser (Maybe Text) -> Parser ServiceSoftwareOptions
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
"NewVersion")
)
instance Prelude.Hashable ServiceSoftwareOptions
instance Prelude.NFData ServiceSoftwareOptions