{-# 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.EMR.Types.Instance where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types.EbsVolume
import Amazonka.EMR.Types.InstanceStatus
import Amazonka.EMR.Types.MarketType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Instance = Instance'
{
Instance -> Maybe InstanceStatus
status :: Prelude.Maybe InstanceStatus,
Instance -> Maybe Text
publicDnsName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe [EbsVolume]
ebsVolumes :: Prelude.Maybe [EbsVolume],
Instance -> Maybe Text
ec2InstanceId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
Instance -> Maybe MarketType
market :: Prelude.Maybe MarketType,
Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
instanceFleetId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
instanceGroupId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
privateDnsName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text
}
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 InstanceStatus
-> Maybe Text
-> Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance
Instance'
{ $sel:status:Instance' :: Maybe InstanceStatus
status = Maybe InstanceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:publicDnsName:Instance' :: Maybe Text
publicDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ebsVolumes:Instance' :: Maybe [EbsVolume]
ebsVolumes = Maybe [EbsVolume]
forall a. Maybe a
Prelude.Nothing,
$sel:ec2InstanceId:Instance' :: Maybe Text
ec2InstanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:Instance' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:market:Instance' :: Maybe MarketType
market = Maybe MarketType
forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:Instance' :: Maybe Text
privateIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceFleetId:Instance' :: Maybe Text
instanceFleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:Instance' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceGroupId:Instance' :: Maybe Text
instanceGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateDnsName:Instance' :: Maybe Text
privateDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:publicIpAddress:Instance' :: Maybe Text
publicIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
instance_status :: Lens.Lens' Instance (Prelude.Maybe InstanceStatus)
instance_status :: (Maybe InstanceStatus -> f (Maybe InstanceStatus))
-> Instance -> f Instance
instance_status = (Instance -> Maybe InstanceStatus)
-> (Instance -> Maybe InstanceStatus -> Instance)
-> Lens
Instance Instance (Maybe InstanceStatus) (Maybe InstanceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe InstanceStatus
status :: Maybe InstanceStatus
$sel:status:Instance' :: Instance -> Maybe InstanceStatus
status} -> Maybe InstanceStatus
status) (\s :: Instance
s@Instance' {} Maybe InstanceStatus
a -> Instance
s {$sel:status:Instance' :: Maybe InstanceStatus
status = Maybe InstanceStatus
a} :: Instance)
instance_publicDnsName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_publicDnsName :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_publicDnsName = (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
publicDnsName :: Maybe Text
$sel:publicDnsName:Instance' :: Instance -> Maybe Text
publicDnsName} -> Maybe Text
publicDnsName) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:publicDnsName:Instance' :: Maybe Text
publicDnsName = Maybe Text
a} :: Instance)
instance_ebsVolumes :: Lens.Lens' Instance (Prelude.Maybe [EbsVolume])
instance_ebsVolumes :: (Maybe [EbsVolume] -> f (Maybe [EbsVolume]))
-> Instance -> f Instance
instance_ebsVolumes = (Instance -> Maybe [EbsVolume])
-> (Instance -> Maybe [EbsVolume] -> Instance)
-> Lens Instance Instance (Maybe [EbsVolume]) (Maybe [EbsVolume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe [EbsVolume]
ebsVolumes :: Maybe [EbsVolume]
$sel:ebsVolumes:Instance' :: Instance -> Maybe [EbsVolume]
ebsVolumes} -> Maybe [EbsVolume]
ebsVolumes) (\s :: Instance
s@Instance' {} Maybe [EbsVolume]
a -> Instance
s {$sel:ebsVolumes:Instance' :: Maybe [EbsVolume]
ebsVolumes = Maybe [EbsVolume]
a} :: Instance) ((Maybe [EbsVolume] -> f (Maybe [EbsVolume]))
-> Instance -> f Instance)
-> ((Maybe [EbsVolume] -> f (Maybe [EbsVolume]))
-> Maybe [EbsVolume] -> f (Maybe [EbsVolume]))
-> (Maybe [EbsVolume] -> f (Maybe [EbsVolume]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [EbsVolume] [EbsVolume] [EbsVolume] [EbsVolume]
-> Iso
(Maybe [EbsVolume])
(Maybe [EbsVolume])
(Maybe [EbsVolume])
(Maybe [EbsVolume])
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 [EbsVolume] [EbsVolume] [EbsVolume] [EbsVolume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_ec2InstanceId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_ec2InstanceId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_ec2InstanceId = (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
ec2InstanceId :: Maybe Text
$sel:ec2InstanceId:Instance' :: Instance -> Maybe Text
ec2InstanceId} -> Maybe Text
ec2InstanceId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:ec2InstanceId:Instance' :: Maybe Text
ec2InstanceId = 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_market :: Lens.Lens' Instance (Prelude.Maybe MarketType)
instance_market :: (Maybe MarketType -> f (Maybe MarketType))
-> Instance -> f Instance
instance_market = (Instance -> Maybe MarketType)
-> (Instance -> Maybe MarketType -> Instance)
-> Lens Instance Instance (Maybe MarketType) (Maybe MarketType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe MarketType
market :: Maybe MarketType
$sel:market:Instance' :: Instance -> Maybe MarketType
market} -> Maybe MarketType
market) (\s :: Instance
s@Instance' {} Maybe MarketType
a -> Instance
s {$sel:market:Instance' :: Maybe MarketType
market = Maybe MarketType
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_instanceFleetId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceFleetId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_instanceFleetId = (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
instanceFleetId :: Maybe Text
$sel:instanceFleetId:Instance' :: Instance -> Maybe Text
instanceFleetId} -> Maybe Text
instanceFleetId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:instanceFleetId:Instance' :: Maybe Text
instanceFleetId = Maybe Text
a} :: Instance)
instance_id :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_id :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_id = (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
id :: Maybe Text
$sel:id:Instance' :: Instance -> Maybe Text
id} -> Maybe Text
id) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:id:Instance' :: Maybe Text
id = Maybe Text
a} :: Instance)
instance_instanceGroupId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceGroupId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_instanceGroupId = (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
instanceGroupId :: Maybe Text
$sel:instanceGroupId:Instance' :: Instance -> Maybe Text
instanceGroupId} -> Maybe Text
instanceGroupId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:instanceGroupId:Instance' :: Maybe Text
instanceGroupId = Maybe Text
a} :: Instance)
instance_privateDnsName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_privateDnsName :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_privateDnsName = (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
privateDnsName :: Maybe Text
$sel:privateDnsName:Instance' :: Instance -> Maybe Text
privateDnsName} -> Maybe Text
privateDnsName) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:privateDnsName:Instance' :: Maybe Text
privateDnsName = Maybe Text
a} :: Instance)
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 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 InstanceStatus
-> Maybe Text
-> Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance
Instance'
(Maybe InstanceStatus
-> Maybe Text
-> Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe InstanceStatus)
-> Parser
(Maybe Text
-> Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InstanceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> 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
"PublicDnsName")
Parser
(Maybe [EbsVolume]
-> Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe [EbsVolume])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [EbsVolume]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EbsVolumes" Parser (Maybe (Maybe [EbsVolume]))
-> Maybe [EbsVolume] -> Parser (Maybe [EbsVolume])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [EbsVolume]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> 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
"Ec2InstanceId")
Parser
(Maybe Text
-> Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> 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 MarketType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe MarketType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MarketType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Market")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> 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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> 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
"InstanceFleetId")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Instance)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> 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
"Id")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Instance)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> 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
"InstanceGroupId")
Parser (Maybe Text -> Maybe Text -> Instance)
-> Parser (Maybe Text) -> Parser (Maybe Text -> 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
"PrivateDnsName")
Parser (Maybe Text -> Instance)
-> Parser (Maybe Text) -> Parser 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")
)
instance Prelude.Hashable Instance
instance Prelude.NFData Instance