{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SnowDeviceManagement.Types.Instance
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SnowDeviceManagement.Types.Instance where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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

-- | The description of an instance. Currently, Amazon EC2 instances are the
-- only supported instance type.
--
-- /See:/ 'newInstance' smart constructor.
data Instance = Instance'
  { -- | The Amazon Machine Image (AMI) launch index, which you can use to find
    -- this instance in the launch group.
    Instance -> Maybe Int
amiLaunchIndex :: Prelude.Maybe Prelude.Int,
    -- | Any block device mapping entries for the instance.
    Instance -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [InstanceBlockDeviceMapping],
    -- | The CPU options for the instance.
    Instance -> Maybe CpuOptions
cpuOptions :: Prelude.Maybe CpuOptions,
    -- | When the instance was created.
    Instance -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The ID of the AMI used to launch the instance.
    Instance -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the instance.
    Instance -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | The instance type.
    Instance -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The private IPv4 address assigned to the instance.
    Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The public IPv4 address assigned to the instance.
    Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The device name of the root device volume (for example, @\/dev\/sda1@).
    Instance -> Maybe Text
rootDeviceName :: Prelude.Maybe Prelude.Text,
    -- | The security groups for the instance.
    Instance -> Maybe [SecurityGroupIdentifier]
securityGroups :: Prelude.Maybe [SecurityGroupIdentifier],
    Instance -> Maybe InstanceState
state :: Prelude.Maybe InstanceState,
    -- | When the instance was last updated.
    Instance -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
  }
  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)

-- |
-- Create a value of 'Instance' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'amiLaunchIndex', 'instance_amiLaunchIndex' - The Amazon Machine Image (AMI) launch index, which you can use to find
-- this instance in the launch group.
--
-- 'blockDeviceMappings', 'instance_blockDeviceMappings' - Any block device mapping entries for the instance.
--
-- 'cpuOptions', 'instance_cpuOptions' - The CPU options for the instance.
--
-- 'createdAt', 'instance_createdAt' - When the instance was created.
--
-- 'imageId', 'instance_imageId' - The ID of the AMI used to launch the instance.
--
-- 'instanceId', 'instance_instanceId' - The ID of the instance.
--
-- 'instanceType', 'instance_instanceType' - The instance type.
--
-- 'privateIpAddress', 'instance_privateIpAddress' - The private IPv4 address assigned to the instance.
--
-- 'publicIpAddress', 'instance_publicIpAddress' - The public IPv4 address assigned to the instance.
--
-- 'rootDeviceName', 'instance_rootDeviceName' - The device name of the root device volume (for example, @\/dev\/sda1@).
--
-- 'securityGroups', 'instance_securityGroups' - The security groups for the instance.
--
-- 'state', 'instance_state' - Undocumented member.
--
-- 'updatedAt', 'instance_updatedAt' - When the instance was last updated.
newInstance ::
  Instance
newInstance :: Instance
newInstance =
  Instance'
    { $sel:amiLaunchIndex:Instance' :: Maybe Int
amiLaunchIndex = forall a. Maybe a
Prelude.Nothing,
      $sel:blockDeviceMappings:Instance' :: Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:cpuOptions:Instance' :: Maybe CpuOptions
cpuOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Instance' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:Instance' :: Maybe Text
imageId = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:Instance' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:Instance' :: Maybe Text
instanceType = 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:rootDeviceName:Instance' :: Maybe Text
rootDeviceName = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:Instance' :: Maybe [SecurityGroupIdentifier]
securityGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Instance' :: Maybe InstanceState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:Instance' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Machine Image (AMI) launch index, which you can use to find
-- this instance in the launch group.
instance_amiLaunchIndex :: Lens.Lens' Instance (Prelude.Maybe Prelude.Int)
instance_amiLaunchIndex :: Lens' Instance (Maybe Int)
instance_amiLaunchIndex = 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)

-- | Any block device mapping entries for the instance.
instance_blockDeviceMappings :: Lens.Lens' Instance (Prelude.Maybe [InstanceBlockDeviceMapping])
instance_blockDeviceMappings :: Lens' Instance (Maybe [InstanceBlockDeviceMapping])
instance_blockDeviceMappings = 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) 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

-- | The CPU options for the instance.
instance_cpuOptions :: Lens.Lens' Instance (Prelude.Maybe CpuOptions)
instance_cpuOptions :: Lens' Instance (Maybe CpuOptions)
instance_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)

-- | When the instance was created.
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

-- | The ID of the AMI used to launch the instance.
instance_imageId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_imageId :: Lens' Instance (Maybe Text)
instance_imageId = 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)

-- | The ID of the instance.
instance_instanceId :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceId :: Lens' Instance (Maybe Text)
instance_instanceId = 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)

-- | The instance type.
instance_instanceType :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_instanceType :: Lens' Instance (Maybe Text)
instance_instanceType = 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)

-- | The private IPv4 address assigned to the 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)

-- | The public IPv4 address assigned to the 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)

-- | The device name of the root device volume (for example, @\/dev\/sda1@).
instance_rootDeviceName :: Lens.Lens' Instance (Prelude.Maybe Prelude.Text)
instance_rootDeviceName :: Lens' Instance (Maybe Text)
instance_rootDeviceName = 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)

-- | The security groups for the instance.
instance_securityGroups :: Lens.Lens' Instance (Prelude.Maybe [SecurityGroupIdentifier])
instance_securityGroups :: Lens' Instance (Maybe [SecurityGroupIdentifier])
instance_securityGroups = 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) 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

-- | Undocumented member.
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)

-- | When the instance was last updated.
instance_updatedAt :: Lens.Lens' Instance (Prelude.Maybe Prelude.UTCTime)
instance_updatedAt :: Lens' Instance (Maybe UTCTime)
instance_updatedAt = 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) 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 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 Int
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe CpuOptions
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [SecurityGroupIdentifier]
-> Maybe InstanceState
-> Maybe POSIX
-> 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
"amiLaunchIndex")
            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
"blockDeviceMappings"
                            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
"cpuOptions")
            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
"imageId")
            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
"instanceId")
            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
"instanceType")
            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
"rootDeviceName")
            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
"securityGroups" 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
"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
"updatedAt")
      )

instance Prelude.Hashable Instance where
  hashWithSalt :: Int -> Instance -> Int
hashWithSalt Int
_salt Instance' {Maybe Int
Maybe [InstanceBlockDeviceMapping]
Maybe [SecurityGroupIdentifier]
Maybe Text
Maybe POSIX
Maybe CpuOptions
Maybe InstanceState
updatedAt :: Maybe POSIX
state :: Maybe InstanceState
securityGroups :: Maybe [SecurityGroupIdentifier]
rootDeviceName :: Maybe Text
publicIpAddress :: Maybe Text
privateIpAddress :: Maybe Text
instanceType :: Maybe Text
instanceId :: Maybe Text
imageId :: Maybe Text
createdAt :: Maybe POSIX
cpuOptions :: Maybe CpuOptions
blockDeviceMappings :: Maybe [InstanceBlockDeviceMapping]
amiLaunchIndex :: Maybe Int
$sel:updatedAt:Instance' :: Instance -> Maybe POSIX
$sel:state:Instance' :: Instance -> Maybe InstanceState
$sel:securityGroups:Instance' :: Instance -> Maybe [SecurityGroupIdentifier]
$sel:rootDeviceName:Instance' :: Instance -> Maybe Text
$sel:publicIpAddress:Instance' :: Instance -> Maybe Text
$sel:privateIpAddress:Instance' :: Instance -> Maybe Text
$sel:instanceType:Instance' :: Instance -> Maybe Text
$sel:instanceId:Instance' :: Instance -> Maybe Text
$sel:imageId:Instance' :: Instance -> Maybe Text
$sel:createdAt:Instance' :: Instance -> Maybe POSIX
$sel:cpuOptions:Instance' :: Instance -> Maybe CpuOptions
$sel:blockDeviceMappings:Instance' :: Instance -> Maybe [InstanceBlockDeviceMapping]
$sel:amiLaunchIndex:Instance' :: Instance -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
amiLaunchIndex
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CpuOptions
cpuOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
      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 Text
rootDeviceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SecurityGroupIdentifier]
securityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt

instance Prelude.NFData Instance where
  rnf :: Instance -> ()
rnf Instance' {Maybe Int
Maybe [InstanceBlockDeviceMapping]
Maybe [SecurityGroupIdentifier]
Maybe Text
Maybe POSIX
Maybe CpuOptions
Maybe InstanceState
updatedAt :: Maybe POSIX
state :: Maybe InstanceState
securityGroups :: Maybe [SecurityGroupIdentifier]
rootDeviceName :: Maybe Text
publicIpAddress :: Maybe Text
privateIpAddress :: Maybe Text
instanceType :: Maybe Text
instanceId :: Maybe Text
imageId :: Maybe Text
createdAt :: Maybe POSIX
cpuOptions :: Maybe CpuOptions
blockDeviceMappings :: Maybe [InstanceBlockDeviceMapping]
amiLaunchIndex :: Maybe Int
$sel:updatedAt:Instance' :: Instance -> Maybe POSIX
$sel:state:Instance' :: Instance -> Maybe InstanceState
$sel:securityGroups:Instance' :: Instance -> Maybe [SecurityGroupIdentifier]
$sel:rootDeviceName:Instance' :: Instance -> Maybe Text
$sel:publicIpAddress:Instance' :: Instance -> Maybe Text
$sel:privateIpAddress:Instance' :: Instance -> Maybe Text
$sel:instanceType:Instance' :: Instance -> Maybe Text
$sel:instanceId:Instance' :: Instance -> Maybe Text
$sel:imageId:Instance' :: Instance -> Maybe Text
$sel:createdAt:Instance' :: Instance -> Maybe POSIX
$sel:cpuOptions:Instance' :: Instance -> Maybe CpuOptions
$sel:blockDeviceMappings:Instance' :: Instance -> Maybe [InstanceBlockDeviceMapping]
$sel:amiLaunchIndex:Instance' :: Instance -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
amiLaunchIndex
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CpuOptions
cpuOptions
      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 Text
imageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceType
      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 Text
rootDeviceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SecurityGroupIdentifier]
securityGroups
      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 POSIX
updatedAt