{-# 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.Lightsail.Types.Instance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.AddOn
import Amazonka.Lightsail.Types.InstanceHardware
import Amazonka.Lightsail.Types.InstanceNetworking
import Amazonka.Lightsail.Types.InstanceState
import Amazonka.Lightsail.Types.IpAddressType
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude
data Instance = Instance'
{
Instance -> Maybe InstanceState
state :: Prelude.Maybe InstanceState,
Instance -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
Instance -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Instance -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Instance -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
Instance -> Maybe Text
sshKeyName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe [AddOn]
addOns :: Prelude.Maybe [AddOn],
Instance -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
Instance -> Maybe InstanceNetworking
networking :: Prelude.Maybe InstanceNetworking,
Instance -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Instance -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
Instance -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
blueprintId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Bool
isStaticIp :: Prelude.Maybe Prelude.Bool,
Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe InstanceHardware
hardware :: Prelude.Maybe InstanceHardware,
Instance -> Maybe [Text]
ipv6Addresses :: Prelude.Maybe [Prelude.Text],
Instance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
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 InstanceState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance
Instance'
{ $sel:state:Instance' :: Maybe InstanceState
state = Maybe InstanceState
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:Instance' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Instance' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Instance' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:location:Instance' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
$sel:sshKeyName:Instance' :: Maybe Text
sshKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addOns:Instance' :: Maybe [AddOn]
addOns = Maybe [AddOn]
forall a. Maybe a
Prelude.Nothing,
$sel:username:Instance' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networking:Instance' :: Maybe InstanceNetworking
networking = Maybe InstanceNetworking
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:Instance' :: Maybe Text
bundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Instance' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:Instance' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:Instance' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:blueprintId:Instance' :: Maybe Text
blueprintId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:Instance' :: Maybe Text
privateIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:blueprintName:Instance' :: Maybe Text
blueprintName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isStaticIp:Instance' :: Maybe Bool
isStaticIp = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:publicIpAddress:Instance' :: Maybe Text
publicIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hardware:Instance' :: Maybe InstanceHardware
hardware = Maybe InstanceHardware
forall a. Maybe a
Prelude.Nothing,
$sel:ipv6Addresses:Instance' :: Maybe [Text]
ipv6Addresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Instance' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
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_resourceType :: Lens.Lens' Instance (Prelude.Maybe ResourceType)
instance_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> Instance -> f Instance
instance_resourceType = (Instance -> Maybe ResourceType)
-> (Instance -> Maybe ResourceType -> Instance)
-> Lens Instance Instance (Maybe ResourceType) (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:Instance' :: Instance -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: Instance
s@Instance' {} Maybe ResourceType
a -> Instance
s {$sel:resourceType:Instance' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: Instance)
instance_arn :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_arn :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_arn = (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
arn :: Maybe Text
$sel:arn:Instance' :: Instance -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:arn:Instance' :: Maybe Text
arn = Maybe Text
a} :: Instance)
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_location :: Lens.Lens' Instance (Prelude.Maybe ResourceLocation)
instance_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> Instance -> f Instance
instance_location = (Instance -> Maybe ResourceLocation)
-> (Instance -> Maybe ResourceLocation -> Instance)
-> Lens
Instance Instance (Maybe ResourceLocation) (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:Instance' :: Instance -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: Instance
s@Instance' {} Maybe ResourceLocation
a -> Instance
s {$sel:location:Instance' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: Instance)
instance_sshKeyName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_sshKeyName :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_sshKeyName = (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
sshKeyName :: Maybe Text
$sel:sshKeyName:Instance' :: Instance -> Maybe Text
sshKeyName} -> Maybe Text
sshKeyName) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:sshKeyName:Instance' :: Maybe Text
sshKeyName = Maybe Text
a} :: Instance)
instance_addOns :: Lens.Lens' Instance (Prelude.Maybe [AddOn])
instance_addOns :: (Maybe [AddOn] -> f (Maybe [AddOn])) -> Instance -> f Instance
instance_addOns = (Instance -> Maybe [AddOn])
-> (Instance -> Maybe [AddOn] -> Instance)
-> Lens Instance Instance (Maybe [AddOn]) (Maybe [AddOn])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe [AddOn]
addOns :: Maybe [AddOn]
$sel:addOns:Instance' :: Instance -> Maybe [AddOn]
addOns} -> Maybe [AddOn]
addOns) (\s :: Instance
s@Instance' {} Maybe [AddOn]
a -> Instance
s {$sel:addOns:Instance' :: Maybe [AddOn]
addOns = Maybe [AddOn]
a} :: Instance) ((Maybe [AddOn] -> f (Maybe [AddOn])) -> Instance -> f Instance)
-> ((Maybe [AddOn] -> f (Maybe [AddOn]))
-> Maybe [AddOn] -> f (Maybe [AddOn]))
-> (Maybe [AddOn] -> f (Maybe [AddOn]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AddOn] [AddOn] [AddOn] [AddOn]
-> Iso
(Maybe [AddOn]) (Maybe [AddOn]) (Maybe [AddOn]) (Maybe [AddOn])
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 [AddOn] [AddOn] [AddOn] [AddOn]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_username :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_username :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_username = (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
username :: Maybe Text
$sel:username:Instance' :: Instance -> Maybe Text
username} -> Maybe Text
username) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:username:Instance' :: Maybe Text
username = Maybe Text
a} :: Instance)
instance_networking :: Lens.Lens' Instance (Prelude.Maybe InstanceNetworking)
instance_networking :: (Maybe InstanceNetworking -> f (Maybe InstanceNetworking))
-> Instance -> f Instance
instance_networking = (Instance -> Maybe InstanceNetworking)
-> (Instance -> Maybe InstanceNetworking -> Instance)
-> Lens
Instance
Instance
(Maybe InstanceNetworking)
(Maybe InstanceNetworking)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe InstanceNetworking
networking :: Maybe InstanceNetworking
$sel:networking:Instance' :: Instance -> Maybe InstanceNetworking
networking} -> Maybe InstanceNetworking
networking) (\s :: Instance
s@Instance' {} Maybe InstanceNetworking
a -> Instance
s {$sel:networking:Instance' :: Maybe InstanceNetworking
networking = Maybe InstanceNetworking
a} :: Instance)
instance_bundleId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_bundleId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_bundleId = (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
bundleId :: Maybe Text
$sel:bundleId:Instance' :: Instance -> Maybe Text
bundleId} -> Maybe Text
bundleId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:bundleId:Instance' :: Maybe Text
bundleId = Maybe Text
a} :: Instance)
instance_name :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_name :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_name = (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
name :: Maybe Text
$sel:name:Instance' :: Instance -> Maybe Text
name} -> Maybe Text
name) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:name:Instance' :: Maybe Text
name = Maybe Text
a} :: Instance)
instance_ipAddressType :: Lens.Lens' Instance (Prelude.Maybe IpAddressType)
instance_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> Instance -> f Instance
instance_ipAddressType = (Instance -> Maybe IpAddressType)
-> (Instance -> Maybe IpAddressType -> Instance)
-> Lens
Instance Instance (Maybe IpAddressType) (Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:Instance' :: Instance -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: Instance
s@Instance' {} Maybe IpAddressType
a -> Instance
s {$sel:ipAddressType:Instance' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: Instance)
instance_supportCode :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_supportCode :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_supportCode = (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
supportCode :: Maybe Text
$sel:supportCode:Instance' :: Instance -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:supportCode:Instance' :: Maybe Text
supportCode = Maybe Text
a} :: Instance)
instance_blueprintId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_blueprintId :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_blueprintId = (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
blueprintId :: Maybe Text
$sel:blueprintId:Instance' :: Instance -> Maybe Text
blueprintId} -> Maybe Text
blueprintId) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:blueprintId:Instance' :: Maybe Text
blueprintId = 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_blueprintName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_blueprintName :: (Maybe Text -> f (Maybe Text)) -> Instance -> f Instance
instance_blueprintName = (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
blueprintName :: Maybe Text
$sel:blueprintName:Instance' :: Instance -> Maybe Text
blueprintName} -> Maybe Text
blueprintName) (\s :: Instance
s@Instance' {} Maybe Text
a -> Instance
s {$sel:blueprintName:Instance' :: Maybe Text
blueprintName = Maybe Text
a} :: Instance)
instance_isStaticIp :: Lens.Lens' Instance (Prelude.Maybe Prelude.Bool)
instance_isStaticIp :: (Maybe Bool -> f (Maybe Bool)) -> Instance -> f Instance
instance_isStaticIp = (Instance -> Maybe Bool)
-> (Instance -> Maybe Bool -> Instance)
-> Lens Instance Instance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe Bool
isStaticIp :: Maybe Bool
$sel:isStaticIp:Instance' :: Instance -> Maybe Bool
isStaticIp} -> Maybe Bool
isStaticIp) (\s :: Instance
s@Instance' {} Maybe Bool
a -> Instance
s {$sel:isStaticIp:Instance' :: Maybe Bool
isStaticIp = Maybe Bool
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_hardware :: Lens.Lens' Instance (Prelude.Maybe InstanceHardware)
instance_hardware :: (Maybe InstanceHardware -> f (Maybe InstanceHardware))
-> Instance -> f Instance
instance_hardware = (Instance -> Maybe InstanceHardware)
-> (Instance -> Maybe InstanceHardware -> Instance)
-> Lens
Instance Instance (Maybe InstanceHardware) (Maybe InstanceHardware)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe InstanceHardware
hardware :: Maybe InstanceHardware
$sel:hardware:Instance' :: Instance -> Maybe InstanceHardware
hardware} -> Maybe InstanceHardware
hardware) (\s :: Instance
s@Instance' {} Maybe InstanceHardware
a -> Instance
s {$sel:hardware:Instance' :: Maybe InstanceHardware
hardware = Maybe InstanceHardware
a} :: Instance)
instance_ipv6Addresses :: Lens.Lens' Instance (Prelude.Maybe [Prelude.Text])
instance_ipv6Addresses :: (Maybe [Text] -> f (Maybe [Text])) -> Instance -> f Instance
instance_ipv6Addresses = (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]
ipv6Addresses :: Maybe [Text]
$sel:ipv6Addresses:Instance' :: Instance -> Maybe [Text]
ipv6Addresses} -> Maybe [Text]
ipv6Addresses) (\s :: Instance
s@Instance' {} Maybe [Text]
a -> Instance
s {$sel:ipv6Addresses:Instance' :: Maybe [Text]
ipv6Addresses = Maybe [Text]
a} :: Instance) ((Maybe [Text] -> f (Maybe [Text])) -> Instance -> f Instance)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_tags :: Lens.Lens' Instance (Prelude.Maybe [Tag])
instance_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Instance -> f Instance
instance_tags = (Instance -> Maybe [Tag])
-> (Instance -> Maybe [Tag] -> Instance)
-> Lens Instance Instance (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Instance' :: Instance -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Instance
s@Instance' {} Maybe [Tag]
a -> Instance
s {$sel:tags:Instance' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Instance) ((Maybe [Tag] -> f (Maybe [Tag])) -> Instance -> f Instance)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Instance
-> f Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
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 InstanceState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance
Instance'
(Maybe InstanceState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe InstanceState)
-> Parser
(Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Functor 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 ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"arn")
Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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 ResourceLocation
-> Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe ResourceLocation)
-> Parser
(Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
Parser
(Maybe Text
-> Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"sshKeyName")
Parser
(Maybe [AddOn]
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe [AddOn])
-> Parser
(Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [AddOn]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"addOns" Parser (Maybe (Maybe [AddOn]))
-> Maybe [AddOn] -> Parser (Maybe [AddOn])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AddOn]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"username")
Parser
(Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe InstanceNetworking)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceNetworking)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"networking")
Parser
(Maybe Text
-> Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"bundleId")
Parser
(Maybe Text
-> Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"name")
Parser
(Maybe IpAddressType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe IpAddressType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpAddressType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipAddressType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"supportCode")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"blueprintId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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 Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> 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
"blueprintName")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
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
"isStaticIp")
Parser
(Maybe Text
-> Maybe InstanceHardware
-> Maybe [Text]
-> Maybe [Tag]
-> Instance)
-> Parser (Maybe Text)
-> Parser
(Maybe InstanceHardware -> Maybe [Text] -> Maybe [Tag] -> 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 InstanceHardware -> Maybe [Text] -> Maybe [Tag] -> Instance)
-> Parser (Maybe InstanceHardware)
-> Parser (Maybe [Text] -> Maybe [Tag] -> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceHardware)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hardware")
Parser (Maybe [Text] -> Maybe [Tag] -> Instance)
-> Parser (Maybe [Text]) -> Parser (Maybe [Tag] -> Instance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipv6Addresses" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe [Tag] -> Instance)
-> Parser (Maybe [Tag]) -> Parser Instance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Instance
instance Prelude.NFData Instance