{-# 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.SnowDeviceManagement.Types.Instance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SnowDeviceManagement.Types.CpuOptions
import Amazonka.SnowDeviceManagement.Types.InstanceBlockDeviceMapping
import Amazonka.SnowDeviceManagement.Types.InstanceState
import Amazonka.SnowDeviceManagement.Types.SecurityGroupIdentifier
data Instance = Instance'
{
Instance -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe InstanceState
state :: Prelude.Maybe InstanceState,
Instance -> Maybe [SecurityGroupIdentifier]
securityGroups :: Prelude.Maybe [SecurityGroupIdentifier],
Instance -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Instance -> Maybe CpuOptions
cpuOptions :: Prelude.Maybe CpuOptions,
Instance -> Maybe Text
rootDeviceName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
Instance -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [InstanceBlockDeviceMapping],
Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Int
amiLaunchIndex :: Prelude.Maybe Prelude.Int
}
deriving (Instance -> Instance -> Bool
(Instance -> Instance -> Bool)
-> (Instance -> Instance -> Bool) -> Eq Instance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Instance -> Instance -> Bool
$c/= :: Instance -> Instance -> Bool
== :: Instance -> Instance -> Bool
$c== :: Instance -> Instance -> Bool
Prelude.Eq, ReadPrec [Instance]
ReadPrec Instance
Int -> ReadS Instance
ReadS [Instance]
(Int -> ReadS Instance)
-> ReadS [Instance]
-> ReadPrec Instance
-> ReadPrec [Instance]
-> Read Instance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Instance]
$creadListPrec :: ReadPrec [Instance]
readPrec :: ReadPrec Instance
$creadPrec :: ReadPrec Instance
readList :: ReadS [Instance]
$creadList :: ReadS [Instance]
readsPrec :: Int -> ReadS Instance
$creadsPrec :: Int -> ReadS Instance
Prelude.Read, Int -> Instance -> ShowS
[Instance] -> ShowS
Instance -> String
(Int -> Instance -> ShowS)
-> (Instance -> String) -> ([Instance] -> ShowS) -> Show Instance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Instance] -> ShowS
$cshowList :: [Instance] -> ShowS
show :: Instance -> String
$cshow :: Instance -> String
showsPrec :: Int -> Instance -> ShowS
$cshowsPrec :: Int -> Instance -> ShowS
Prelude.Show, (forall x. Instance -> Rep Instance x)
-> (forall x. Rep Instance x -> Instance) -> Generic Instance
forall x. Rep Instance x -> Instance
forall x. Instance -> Rep Instance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Instance x -> Instance
$cfrom :: forall x. Instance -> Rep Instance x
Prelude.Generic)
newInstance ::
Instance
newInstance :: Instance
newInstance =
Instance' :: Maybe Text
-> Maybe InstanceState
-> Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance
Instance'
{ $sel:instanceId:Instance' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:Instance' :: Maybe InstanceState
state = Maybe InstanceState
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroups:Instance' :: Maybe [SecurityGroupIdentifier]
securityGroups = Maybe [SecurityGroupIdentifier]
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Instance' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:cpuOptions:Instance' :: Maybe CpuOptions
cpuOptions = Maybe CpuOptions
forall a. Maybe a
Prelude.Nothing,
$sel:rootDeviceName:Instance' :: Maybe Text
rootDeviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:Instance' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageId:Instance' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:Instance' :: Maybe Text
privateIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:Instance' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:blockDeviceMappings:Instance' :: Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings = Maybe [InstanceBlockDeviceMapping]
forall a. Maybe a
Prelude.Nothing,
$sel:publicIpAddress:Instance' :: Maybe Text
publicIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:amiLaunchIndex:Instance' :: Maybe Int
amiLaunchIndex = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
instance_instanceId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_instanceId = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:Instance' :: Instance -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:instanceId:Instance' :: Maybe Text
instanceId = Maybe Text
a} :: Instance)
instance_state :: Lens.Lens' Instance (Prelude.Maybe InstanceState)
instance_state :: (Maybe InstanceState -> f (Maybe InstanceState))
-> Instance -> f Instance
instance_state = (Instance -> Maybe InstanceState)
-> (Instance -> Maybe InstanceState -> Instance)
-> Lens
Instance Instance (Maybe InstanceState) (Maybe InstanceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe InstanceState
state :: Maybe InstanceState
$sel:state:Instance' :: Instance -> Maybe InstanceState
state} -> Maybe InstanceState
state) (\s :: Instance
s@Instance' {} Maybe InstanceState
a -> Instance
s {$sel:state:Instance' :: Maybe InstanceState
state = Maybe InstanceState
a} :: Instance)
instance_securityGroups :: Lens.Lens' Instance (Prelude.Maybe [SecurityGroupIdentifier])
instance_securityGroups :: (Maybe [SecurityGroupIdentifier]
-> f (Maybe [SecurityGroupIdentifier]))
-> Instance -> f Instance
instance_securityGroups = (Instance -> Maybe [SecurityGroupIdentifier])
-> (Instance -> Maybe [SecurityGroupIdentifier] -> Instance)
-> Lens
Instance
Instance
(Maybe [SecurityGroupIdentifier])
(Maybe [SecurityGroupIdentifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe [SecurityGroupIdentifier]
securityGroups :: Maybe [SecurityGroupIdentifier]
$sel:securityGroups:Instance' :: Instance -> Maybe [SecurityGroupIdentifier]
securityGroups} -> Maybe [SecurityGroupIdentifier]
securityGroups) (\s :: Instance
s@Instance' {} Maybe [SecurityGroupIdentifier]
a -> Instance
s {$sel:securityGroups:Instance' :: Maybe [SecurityGroupIdentifier]
securityGroups = Maybe [SecurityGroupIdentifier]
a} :: Instance) ((Maybe [SecurityGroupIdentifier]
-> f (Maybe [SecurityGroupIdentifier]))
-> Instance -> f Instance)
-> ((Maybe [SecurityGroupIdentifier]
-> f (Maybe [SecurityGroupIdentifier]))
-> Maybe [SecurityGroupIdentifier]
-> f (Maybe [SecurityGroupIdentifier]))
-> (Maybe [SecurityGroupIdentifier]
-> f (Maybe [SecurityGroupIdentifier]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
-> Iso
(Maybe [SecurityGroupIdentifier])
(Maybe [SecurityGroupIdentifier])
(Maybe [SecurityGroupIdentifier])
(Maybe [SecurityGroupIdentifier])
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
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
[SecurityGroupIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_createdAt :: Lens.Lens' Instance (Prelude.Maybe Prelude.UTCTime)
instance_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Instance -> f Instance
instance_createdAt = (Instance -> Maybe POSIX)
-> (Instance -> Maybe POSIX -> Instance)
-> Lens Instance Instance (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Instance' :: Instance -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Instance
s@Instance' {} Maybe POSIX
a -> Instance
s {$sel:createdAt:Instance' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Instance) ((Maybe POSIX -> f (Maybe POSIX)) -> Instance -> f Instance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Instance
-> f Instance
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
instance_cpuOptions :: Lens.Lens' Instance (Prelude.Maybe CpuOptions)
instance_cpuOptions :: (Maybe CpuOptions -> f (Maybe CpuOptions))
-> Instance -> f Instance
instance_cpuOptions = (Instance -> Maybe CpuOptions)
-> (Instance -> Maybe CpuOptions -> Instance)
-> Lens Instance Instance (Maybe CpuOptions) (Maybe CpuOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe CpuOptions
cpuOptions :: Maybe CpuOptions
$sel:cpuOptions:Instance' :: Instance -> Maybe CpuOptions
cpuOptions} -> Maybe CpuOptions
cpuOptions) (\s :: Instance
s@Instance' {} Maybe CpuOptions
a -> Instance
s {$sel:cpuOptions:Instance' :: Maybe CpuOptions
cpuOptions = Maybe CpuOptions
a} :: Instance)
instance_rootDeviceName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_rootDeviceName :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_rootDeviceName = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
rootDeviceName :: Maybe Text
$sel:rootDeviceName:Instance' :: Instance -> Maybe Text
rootDeviceName} -> Maybe Text
rootDeviceName) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:rootDeviceName:Instance' :: Maybe Text
rootDeviceName = Maybe Text
a} :: Instance)
instance_instanceType :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceType :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_instanceType = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:Instance' :: Instance -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:instanceType:Instance' :: Maybe Text
instanceType = Maybe Text
a} :: Instance)
instance_imageId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_imageId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_imageId = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
imageId :: Maybe Text
$sel:imageId:Instance' :: Instance -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:imageId:Instance' :: Maybe Text
imageId = Maybe Text
a} :: Instance)
instance_privateIpAddress :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_privateIpAddress :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_privateIpAddress = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
privateIpAddress :: Maybe Text
$sel:privateIpAddress:Instance' :: Instance -> Maybe Text
privateIpAddress} -> Maybe Text
privateIpAddress) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:privateIpAddress:Instance' :: Maybe Text
privateIpAddress = Maybe Text
a} :: Instance)
instance_updatedAt :: Lens.Lens' Instance (Prelude.Maybe Prelude.UTCTime)
instance_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Instance -> f Instance
instance_updatedAt = (Instance -> Maybe POSIX)
-> (Instance -> Maybe POSIX -> Instance)
-> Lens Instance Instance (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:Instance' :: Instance -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: Instance
s@Instance' {} Maybe POSIX
a -> Instance
s {$sel:updatedAt:Instance' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: Instance) ((Maybe POSIX -> f (Maybe POSIX)) -> Instance -> f Instance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Instance
-> f Instance
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
instance_blockDeviceMappings :: Lens.Lens' Instance (Prelude.Maybe [InstanceBlockDeviceMapping])
instance_blockDeviceMappings :: (Maybe [InstanceBlockDeviceMapping]
-> f (Maybe [InstanceBlockDeviceMapping]))
-> Instance -> f Instance
instance_blockDeviceMappings = (Instance -> Maybe [InstanceBlockDeviceMapping])
-> (Instance -> Maybe [InstanceBlockDeviceMapping] -> Instance)
-> Lens
Instance
Instance
(Maybe [InstanceBlockDeviceMapping])
(Maybe [InstanceBlockDeviceMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings :: Maybe [InstanceBlockDeviceMapping]
$sel:blockDeviceMappings:Instance' :: Instance -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings} -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings) (\s :: Instance
s@Instance' {} Maybe [InstanceBlockDeviceMapping]
a -> Instance
s {$sel:blockDeviceMappings:Instance' :: Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings = Maybe [InstanceBlockDeviceMapping]
a} :: Instance) ((Maybe [InstanceBlockDeviceMapping]
-> f (Maybe [InstanceBlockDeviceMapping]))
-> Instance -> f Instance)
-> ((Maybe [InstanceBlockDeviceMapping]
-> f (Maybe [InstanceBlockDeviceMapping]))
-> Maybe [InstanceBlockDeviceMapping]
-> f (Maybe [InstanceBlockDeviceMapping]))
-> (Maybe [InstanceBlockDeviceMapping]
-> f (Maybe [InstanceBlockDeviceMapping]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
-> Iso
(Maybe [InstanceBlockDeviceMapping])
(Maybe [InstanceBlockDeviceMapping])
(Maybe [InstanceBlockDeviceMapping])
(Maybe [InstanceBlockDeviceMapping])
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
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
[InstanceBlockDeviceMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_publicIpAddress :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_publicIpAddress :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_publicIpAddress = (Instance -> Maybe Text)
-> (Instance -> Maybe Text -> Instance)
-> Lens Instance Instance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Text
publicIpAddress :: Maybe Text
$sel:publicIpAddress:Instance' :: Instance -> Maybe Text
publicIpAddress} -> Maybe Text
publicIpAddress) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:publicIpAddress:Instance' :: Maybe Text
publicIpAddress = Maybe Text
a} :: Instance)
instance_amiLaunchIndex :: Lens.Lens' Instance (Prelude.Maybe Prelude.Int)
instance_amiLaunchIndex :: (Maybe Int -> f (Maybe Int)) -> Instance -> f Instance
instance_amiLaunchIndex = (Instance -> Maybe Int)
-> (Instance -> Maybe Int -> Instance)
-> Lens Instance Instance (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Int
amiLaunchIndex :: Maybe Int
$sel:amiLaunchIndex:Instance' :: Instance -> Maybe Int
amiLaunchIndex} -> Maybe Int
amiLaunchIndex) (\s :: Instance
s@Instance' {} Maybe Int
a -> Instance
s {$sel:amiLaunchIndex:Instance' :: Maybe Int
amiLaunchIndex = Maybe Int
a} :: Instance)
instance Core.FromJSON Instance where
parseJSON :: Value -> Parser Instance
parseJSON =
String -> (Object -> Parser Instance) -> Value -> Parser Instance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Instance"
( \Object
x ->
Maybe Text
-> Maybe InstanceState
-> Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance
Instance'
(Maybe Text
-> Maybe InstanceState
-> Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe InstanceState
-> Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
forall (f :: * -> *) a b. Functor 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
"instanceId")
Parser
(Maybe InstanceState
-> Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe InstanceState)
-> Parser
(Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe [SecurityGroupIdentifier]
-> Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe [SecurityGroupIdentifier])
-> Parser
(Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [SecurityGroupIdentifier]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityGroups" Parser (Maybe (Maybe [SecurityGroupIdentifier]))
-> Maybe [SecurityGroupIdentifier]
-> Parser (Maybe [SecurityGroupIdentifier])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SecurityGroupIdentifier]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe POSIX
-> Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe POSIX)
-> Parser
(Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
forall (f :: * -> *) a b. Applicative f => 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
"createdAt")
Parser
(Maybe CpuOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe CpuOptions)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CpuOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cpuOptions")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
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
"rootDeviceName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
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
"instanceType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
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
"imageId")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
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
"privateIpAddress")
Parser
(Maybe POSIX
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe Int
-> Instance)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [InstanceBlockDeviceMapping]
-> Maybe Text -> Maybe Int -> Instance)
forall (f :: * -> *) a b. Applicative f => 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
"updatedAt")
Parser
(Maybe [InstanceBlockDeviceMapping]
-> Maybe Text -> Maybe Int -> Instance)
-> Parser (Maybe [InstanceBlockDeviceMapping])
-> Parser (Maybe Text -> Maybe Int -> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [InstanceBlockDeviceMapping]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"blockDeviceMappings"
Parser (Maybe (Maybe [InstanceBlockDeviceMapping]))
-> Maybe [InstanceBlockDeviceMapping]
-> Parser (Maybe [InstanceBlockDeviceMapping])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InstanceBlockDeviceMapping]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> Maybe Int -> Instance)
-> Parser (Maybe Text) -> Parser (Maybe Int -> Instance)
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
"publicIpAddress")
Parser (Maybe Int -> Instance)
-> Parser (Maybe Int) -> Parser Instance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"amiLaunchIndex")
)
instance Prelude.Hashable Instance
instance Prelude.NFData Instance