{-# 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.Lightsail.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.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

-- | Describes an instance (a virtual private server).
--
-- /See:/ 'newInstance' smart constructor.
data Instance = Instance'
  { -- | An array of objects representing the add-ons enabled on the instance.
    Instance -> Maybe [AddOn]
addOns :: Prelude.Maybe [AddOn],
    -- | The Amazon Resource Name (ARN) of the instance (e.g.,
    -- @arn:aws:lightsail:us-east-2:123456789101:Instance\/244ad76f-8aad-4741-809f-12345EXAMPLE@).
    Instance -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The blueprint ID (e.g., @os_amlinux_2016_03@).
    Instance -> Maybe Text
blueprintId :: Prelude.Maybe Prelude.Text,
    -- | The friendly name of the blueprint (e.g., @Amazon Linux@).
    Instance -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
    -- | The bundle for the instance (e.g., @micro_1_0@).
    Instance -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the instance was created (e.g., @1479734909.17@) in
    -- Unix time format.
    Instance -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The size of the vCPU and the amount of RAM for the instance.
    Instance -> Maybe InstanceHardware
hardware :: Prelude.Maybe InstanceHardware,
    -- | The IP address type of the instance.
    --
    -- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
    -- and IPv6.
    Instance -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
    -- | The IPv6 addresses of the instance.
    Instance -> Maybe [Text]
ipv6Addresses :: Prelude.Maybe [Prelude.Text],
    -- | A Boolean value indicating whether this instance has a static IP
    -- assigned to it.
    Instance -> Maybe Bool
isStaticIp :: Prelude.Maybe Prelude.Bool,
    -- | The region name and Availability Zone where the instance is located.
    Instance -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The metadata options for the Amazon Lightsail instance.
    Instance -> Maybe InstanceMetadataOptions
metadataOptions :: Prelude.Maybe InstanceMetadataOptions,
    -- | The name the user gave the instance (e.g., @Amazon_Linux-1GB-Ohio-1@).
    Instance -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Information about the public ports and monthly data transfer rates for
    -- the instance.
    Instance -> Maybe InstanceNetworking
networking :: Prelude.Maybe InstanceNetworking,
    -- | The private IP address of the instance.
    Instance -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The public IP address of the instance.
    Instance -> Maybe Text
publicIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The type of resource (usually @Instance@).
    Instance -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The name of the SSH key being used to connect to the instance (e.g.,
    -- @LightsailDefaultKeyPair@).
    Instance -> Maybe Text
sshKeyName :: Prelude.Maybe Prelude.Text,
    -- | The status code and the state (e.g., @running@) for the instance.
    Instance -> Maybe InstanceState
state :: Prelude.Maybe InstanceState,
    -- | The support code. Include this code in your email to support when you
    -- have questions about an instance or another resource in Lightsail. This
    -- code enables our support team to look up your Lightsail information more
    -- easily.
    Instance -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    Instance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The user name for connecting to the instance (e.g., @ec2-user@).
    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)

-- |
-- 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:
--
-- 'addOns', 'instance_addOns' - An array of objects representing the add-ons enabled on the instance.
--
-- 'arn', 'instance_arn' - The Amazon Resource Name (ARN) of the instance (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:Instance\/244ad76f-8aad-4741-809f-12345EXAMPLE@).
--
-- 'blueprintId', 'instance_blueprintId' - The blueprint ID (e.g., @os_amlinux_2016_03@).
--
-- 'blueprintName', 'instance_blueprintName' - The friendly name of the blueprint (e.g., @Amazon Linux@).
--
-- 'bundleId', 'instance_bundleId' - The bundle for the instance (e.g., @micro_1_0@).
--
-- 'createdAt', 'instance_createdAt' - The timestamp when the instance was created (e.g., @1479734909.17@) in
-- Unix time format.
--
-- 'hardware', 'instance_hardware' - The size of the vCPU and the amount of RAM for the instance.
--
-- 'ipAddressType', 'instance_ipAddressType' - The IP address type of the instance.
--
-- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
-- and IPv6.
--
-- 'ipv6Addresses', 'instance_ipv6Addresses' - The IPv6 addresses of the instance.
--
-- 'isStaticIp', 'instance_isStaticIp' - A Boolean value indicating whether this instance has a static IP
-- assigned to it.
--
-- 'location', 'instance_location' - The region name and Availability Zone where the instance is located.
--
-- 'metadataOptions', 'instance_metadataOptions' - The metadata options for the Amazon Lightsail instance.
--
-- 'name', 'instance_name' - The name the user gave the instance (e.g., @Amazon_Linux-1GB-Ohio-1@).
--
-- 'networking', 'instance_networking' - Information about the public ports and monthly data transfer rates for
-- the instance.
--
-- 'privateIpAddress', 'instance_privateIpAddress' - The private IP address of the instance.
--
-- 'publicIpAddress', 'instance_publicIpAddress' - The public IP address of the instance.
--
-- 'resourceType', 'instance_resourceType' - The type of resource (usually @Instance@).
--
-- 'sshKeyName', 'instance_sshKeyName' - The name of the SSH key being used to connect to the instance (e.g.,
-- @LightsailDefaultKeyPair@).
--
-- 'state', 'instance_state' - The status code and the state (e.g., @running@) for the instance.
--
-- 'supportCode', 'instance_supportCode' - The support code. Include this code in your email to support when you
-- have questions about an instance or another resource in Lightsail. This
-- code enables our support team to look up your Lightsail information more
-- easily.
--
-- 'tags', 'instance_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
--
-- 'username', 'instance_username' - The user name for connecting to the instance (e.g., @ec2-user@).
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
    }

-- | An array of objects representing the add-ons enabled on the instance.
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

-- | The Amazon Resource Name (ARN) of the instance (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:Instance\/244ad76f-8aad-4741-809f-12345EXAMPLE@).
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)

-- | The blueprint ID (e.g., @os_amlinux_2016_03@).
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)

-- | The friendly name of the blueprint (e.g., @Amazon Linux@).
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)

-- | The bundle for the instance (e.g., @micro_1_0@).
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)

-- | The timestamp when the instance was created (e.g., @1479734909.17@) in
-- Unix time format.
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 size of the vCPU and the amount of RAM for the instance.
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)

-- | The IP address type of the instance.
--
-- The possible values are @ipv4@ for IPv4 only, and @dualstack@ for IPv4
-- and IPv6.
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)

-- | The IPv6 addresses of the 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

-- | A Boolean value indicating whether this instance has a static IP
-- assigned to it.
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)

-- | The region name and Availability Zone where the instance is located.
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)

-- | The metadata options for the Amazon Lightsail 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)

-- | The name the user gave the instance (e.g., @Amazon_Linux-1GB-Ohio-1@).
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)

-- | Information about the public ports and monthly data transfer rates for
-- the 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)

-- | The private IP address of 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 IP address of 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 type of resource (usually @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)

-- | The name of the SSH key being used to connect to the instance (e.g.,
-- @LightsailDefaultKeyPair@).
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)

-- | The status code and the state (e.g., @running@) for the 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)

-- | The support code. Include this code in your email to support when you
-- have questions about an instance or another resource in Lightsail. This
-- code enables our support team to look up your Lightsail information more
-- easily.
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)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
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

-- | The user name for connecting to the instance (e.g., @ec2-user@).
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