{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types.AddOn
import Amazonka.Lightsail.Types.InstanceHardware
import Amazonka.Lightsail.Types.InstanceMetadataOptions
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 [AddOn]
addOns :: Prelude.Maybe [AddOn],
Instance -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
blueprintId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
Instance -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
Instance -> Maybe InstanceHardware
hardware :: Prelude.Maybe InstanceHardware,
Instance -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
Instance -> Maybe [Text]
ipv6Addresses :: Prelude.Maybe [Prelude.Text],
Instance -> Maybe Bool
isStaticIp :: Prelude.Maybe Prelude.Bool,
Instance -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
Instance -> Maybe InstanceMetadataOptions
metadataOptions :: Prelude.Maybe InstanceMetadataOptions,
Instance -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Instance -> Maybe InstanceNetworking
networking :: Prelude.Maybe InstanceNetworking,
Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text,
Instance -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
Instance -> Maybe Text
sshKeyName :: Prelude.Maybe Prelude.Text,
Instance -> Maybe InstanceState
state :: Prelude.Maybe InstanceState,
Instance -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
Instance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
Instance -> Maybe Text
username :: Prelude.Maybe Prelude.Text
}
deriving (Instance -> Instance -> Bool
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]
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
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. 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'
{ $sel:addOns:Instance' :: Maybe [AddOn]
addOns = forall a. Maybe a
Prelude.Nothing,
$sel:arn:Instance' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:blueprintId:Instance' :: Maybe Text
blueprintId = forall a. Maybe a
Prelude.Nothing,
$sel:blueprintName:Instance' :: Maybe Text
blueprintName = forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:Instance' :: Maybe Text
bundleId = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Instance' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:hardware:Instance' :: Maybe InstanceHardware
hardware = forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:Instance' :: Maybe IpAddressType
ipAddressType = forall a. Maybe a
Prelude.Nothing,
$sel:ipv6Addresses:Instance' :: Maybe [Text]
ipv6Addresses = forall a. Maybe a
Prelude.Nothing,
$sel:isStaticIp:Instance' :: Maybe Bool
isStaticIp = forall a. Maybe a
Prelude.Nothing,
$sel:location:Instance' :: Maybe ResourceLocation
location = forall a. Maybe a
Prelude.Nothing,
$sel:metadataOptions:Instance' :: Maybe InstanceMetadataOptions
metadataOptions = forall a. Maybe a
Prelude.Nothing,
$sel:name:Instance' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:networking:Instance' :: Maybe InstanceNetworking
networking = forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:Instance' :: Maybe Text
privateIpAddress = forall a. Maybe a
Prelude.Nothing,
$sel:publicIpAddress:Instance' :: Maybe Text
publicIpAddress = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:Instance' :: Maybe ResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:sshKeyName:Instance' :: Maybe Text
sshKeyName = forall a. Maybe a
Prelude.Nothing,
$sel:state:Instance' :: Maybe InstanceState
state = forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:Instance' :: Maybe Text
supportCode = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Instance' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:username:Instance' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
}
instance_addOns :: Lens.Lens' Instance (Prelude.Maybe [AddOn])
instance_addOns :: Lens' Instance (Maybe [AddOn])
instance_addOns = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_arn :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_arn :: Lens' Instance (Maybe Text)
instance_arn = 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_blueprintId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_blueprintId :: Lens' Instance (Maybe Text)
instance_blueprintId = 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_blueprintName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_blueprintName :: Lens' Instance (Maybe Text)
instance_blueprintName = 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_bundleId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_bundleId :: Lens' Instance (Maybe Text)
instance_bundleId = 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_createdAt :: Lens.Lens' Instance (Prelude.Maybe Prelude.UTCTime)
instance_createdAt :: Lens' Instance (Maybe UTCTime)
instance_createdAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance_hardware :: Lens.Lens' Instance (Prelude.Maybe InstanceHardware)
instance_hardware :: Lens' Instance (Maybe InstanceHardware)
instance_hardware = 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_ipAddressType :: Lens.Lens' Instance (Prelude.Maybe IpAddressType)
instance_ipAddressType :: Lens' Instance (Maybe IpAddressType)
instance_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_ipv6Addresses :: Lens.Lens' Instance (Prelude.Maybe [Prelude.Text])
instance_ipv6Addresses :: Lens' Instance (Maybe [Text])
instance_ipv6Addresses = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance_isStaticIp :: Lens.Lens' Instance (Prelude.Maybe Prelude.Bool)
instance_isStaticIp :: Lens' Instance (Maybe Bool)
instance_isStaticIp = 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_location :: Lens.Lens' Instance (Prelude.Maybe ResourceLocation)
instance_location :: Lens' Instance (Maybe ResourceLocation)
instance_location = 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_metadataOptions :: Lens.Lens' Instance (Prelude.Maybe InstanceMetadataOptions)
instance_metadataOptions :: Lens' Instance (Maybe InstanceMetadataOptions)
instance_metadataOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Instance' {Maybe InstanceMetadataOptions
metadataOptions :: Maybe InstanceMetadataOptions
$sel:metadataOptions:Instance' :: Instance -> Maybe InstanceMetadataOptions
metadataOptions} -> Maybe InstanceMetadataOptions
metadataOptions) (\s :: Instance
s@Instance' {} Maybe InstanceMetadataOptions
a -> Instance
s {$sel:metadataOptions:Instance' :: Maybe InstanceMetadataOptions
metadataOptions = Maybe InstanceMetadataOptions
a} :: Instance)
instance_name :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_name :: Lens' Instance (Maybe Text)
instance_name = 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_networking :: Lens.Lens' Instance (Prelude.Maybe InstanceNetworking)
instance_networking :: Lens' Instance (Maybe InstanceNetworking)
instance_networking = 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_privateIpAddress :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_privateIpAddress :: Lens' Instance (Maybe Text)
instance_privateIpAddress = 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_publicIpAddress :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_publicIpAddress :: Lens' Instance (Maybe Text)
instance_publicIpAddress = 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_resourceType :: Lens.Lens' Instance (Prelude.Maybe ResourceType)
instance_resourceType :: Lens' Instance (Maybe ResourceType)
instance_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_sshKeyName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_sshKeyName :: Lens' Instance (Maybe Text)
instance_sshKeyName = 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_state :: Lens.Lens' Instance (Prelude.Maybe InstanceState)
instance_state :: Lens' Instance (Maybe InstanceState)
instance_state = 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_supportCode :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_supportCode :: Lens' Instance (Maybe Text)
instance_supportCode = 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_tags :: Lens.Lens' Instance (Prelude.Maybe [Tag])
instance_tags :: Lens' Instance (Maybe [Tag])
instance_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' Instance (Maybe Text)
instance_username = 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 Data.FromJSON Instance where
parseJSON :: Value -> Parser Instance
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Instance"
( \Object
x ->
Maybe [AddOn]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe InstanceHardware
-> Maybe IpAddressType
-> Maybe [Text]
-> Maybe Bool
-> Maybe ResourceLocation
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe InstanceNetworking
-> Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe InstanceState
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Instance
Instance'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"addOns" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"blueprintId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"blueprintName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"bundleId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hardware")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ipAddressType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ipv6Addresses" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"isStaticIp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"location")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"metadataOptions")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"networking")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"privateIpAddress")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"publicIpAddress")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sshKeyName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"supportCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"username")
)
instance Prelude.Hashable Instance where
hashWithSalt :: Int -> Instance -> Int
hashWithSalt Int
_salt Instance' {Maybe Bool
Maybe [Text]
Maybe [AddOn]
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe InstanceMetadataOptions
Maybe InstanceState
Maybe IpAddressType
Maybe InstanceNetworking
Maybe ResourceLocation
Maybe ResourceType
Maybe InstanceHardware
username :: Maybe Text
tags :: Maybe [Tag]
supportCode :: Maybe Text
state :: Maybe InstanceState
sshKeyName :: Maybe Text
resourceType :: Maybe ResourceType
publicIpAddress :: Maybe Text
privateIpAddress :: Maybe Text
networking :: Maybe InstanceNetworking
name :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
location :: Maybe ResourceLocation
isStaticIp :: Maybe Bool
ipv6Addresses :: Maybe [Text]
ipAddressType :: Maybe IpAddressType
hardware :: Maybe InstanceHardware
createdAt :: Maybe POSIX
bundleId :: Maybe Text
blueprintName :: Maybe Text
blueprintId :: Maybe Text
arn :: Maybe Text
addOns :: Maybe [AddOn]
$sel:username:Instance' :: Instance -> Maybe Text
$sel:tags:Instance' :: Instance -> Maybe [Tag]
$sel:supportCode:Instance' :: Instance -> Maybe Text
$sel:state:Instance' :: Instance -> Maybe InstanceState
$sel:sshKeyName:Instance' :: Instance -> Maybe Text
$sel:resourceType:Instance' :: Instance -> Maybe ResourceType
$sel:publicIpAddress:Instance' :: Instance -> Maybe Text
$sel:privateIpAddress:Instance' :: Instance -> Maybe Text
$sel:networking:Instance' :: Instance -> Maybe InstanceNetworking
$sel:name:Instance' :: Instance -> Maybe Text
$sel:metadataOptions:Instance' :: Instance -> Maybe InstanceMetadataOptions
$sel:location:Instance' :: Instance -> Maybe ResourceLocation
$sel:isStaticIp:Instance' :: Instance -> Maybe Bool
$sel:ipv6Addresses:Instance' :: Instance -> Maybe [Text]
$sel:ipAddressType:Instance' :: Instance -> Maybe IpAddressType
$sel:hardware:Instance' :: Instance -> Maybe InstanceHardware
$sel:createdAt:Instance' :: Instance -> Maybe POSIX
$sel:bundleId:Instance' :: Instance -> Maybe Text
$sel:blueprintName:Instance' :: Instance -> Maybe Text
$sel:blueprintId:Instance' :: Instance -> Maybe Text
$sel:arn:Instance' :: Instance -> Maybe Text
$sel:addOns:Instance' :: Instance -> Maybe [AddOn]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AddOn]
addOns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
blueprintId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
blueprintName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bundleId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceHardware
hardware
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressType
ipAddressType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
ipv6Addresses
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isStaticIp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceLocation
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMetadataOptions
metadataOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceNetworking
networking
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateIpAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIpAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceType
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sshKeyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username
instance Prelude.NFData Instance where
rnf :: Instance -> ()
rnf Instance' {Maybe Bool
Maybe [Text]
Maybe [AddOn]
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe InstanceMetadataOptions
Maybe InstanceState
Maybe IpAddressType
Maybe InstanceNetworking
Maybe ResourceLocation
Maybe ResourceType
Maybe InstanceHardware
username :: Maybe Text
tags :: Maybe [Tag]
supportCode :: Maybe Text
state :: Maybe InstanceState
sshKeyName :: Maybe Text
resourceType :: Maybe ResourceType
publicIpAddress :: Maybe Text
privateIpAddress :: Maybe Text
networking :: Maybe InstanceNetworking
name :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
location :: Maybe ResourceLocation
isStaticIp :: Maybe Bool
ipv6Addresses :: Maybe [Text]
ipAddressType :: Maybe IpAddressType
hardware :: Maybe InstanceHardware
createdAt :: Maybe POSIX
bundleId :: Maybe Text
blueprintName :: Maybe Text
blueprintId :: Maybe Text
arn :: Maybe Text
addOns :: Maybe [AddOn]
$sel:username:Instance' :: Instance -> Maybe Text
$sel:tags:Instance' :: Instance -> Maybe [Tag]
$sel:supportCode:Instance' :: Instance -> Maybe Text
$sel:state:Instance' :: Instance -> Maybe InstanceState
$sel:sshKeyName:Instance' :: Instance -> Maybe Text
$sel:resourceType:Instance' :: Instance -> Maybe ResourceType
$sel:publicIpAddress:Instance' :: Instance -> Maybe Text
$sel:privateIpAddress:Instance' :: Instance -> Maybe Text
$sel:networking:Instance' :: Instance -> Maybe InstanceNetworking
$sel:name:Instance' :: Instance -> Maybe Text
$sel:metadataOptions:Instance' :: Instance -> Maybe InstanceMetadataOptions
$sel:location:Instance' :: Instance -> Maybe ResourceLocation
$sel:isStaticIp:Instance' :: Instance -> Maybe Bool
$sel:ipv6Addresses:Instance' :: Instance -> Maybe [Text]
$sel:ipAddressType:Instance' :: Instance -> Maybe IpAddressType
$sel:hardware:Instance' :: Instance -> Maybe InstanceHardware
$sel:createdAt:Instance' :: Instance -> Maybe POSIX
$sel:bundleId:Instance' :: Instance -> Maybe Text
$sel:blueprintName:Instance' :: Instance -> Maybe Text
$sel:blueprintId:Instance' :: Instance -> Maybe Text
$sel:arn:Instance' :: Instance -> Maybe Text
$sel:addOns:Instance' :: Instance -> Maybe [AddOn]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AddOn]
addOns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
blueprintId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
blueprintName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bundleId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceHardware
hardware
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpAddressType
ipAddressType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
ipv6Addresses
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isStaticIp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceLocation
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceMetadataOptions
metadataOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceNetworking
networking
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
privateIpAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicIpAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceType
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sshKeyName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username