{-# 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.StaticIp 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.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import qualified Amazonka.Prelude as Prelude
data StaticIp = StaticIp'
{
StaticIp -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
StaticIp -> Maybe Text
attachedTo :: Prelude.Maybe Prelude.Text,
StaticIp -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
StaticIp -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
StaticIp -> Maybe Bool
isAttached :: Prelude.Maybe Prelude.Bool,
StaticIp -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
StaticIp -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
StaticIp -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
StaticIp -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text
}
deriving (StaticIp -> StaticIp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StaticIp -> StaticIp -> Bool
$c/= :: StaticIp -> StaticIp -> Bool
== :: StaticIp -> StaticIp -> Bool
$c== :: StaticIp -> StaticIp -> Bool
Prelude.Eq, ReadPrec [StaticIp]
ReadPrec StaticIp
Int -> ReadS StaticIp
ReadS [StaticIp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StaticIp]
$creadListPrec :: ReadPrec [StaticIp]
readPrec :: ReadPrec StaticIp
$creadPrec :: ReadPrec StaticIp
readList :: ReadS [StaticIp]
$creadList :: ReadS [StaticIp]
readsPrec :: Int -> ReadS StaticIp
$creadsPrec :: Int -> ReadS StaticIp
Prelude.Read, Int -> StaticIp -> ShowS
[StaticIp] -> ShowS
StaticIp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StaticIp] -> ShowS
$cshowList :: [StaticIp] -> ShowS
show :: StaticIp -> String
$cshow :: StaticIp -> String
showsPrec :: Int -> StaticIp -> ShowS
$cshowsPrec :: Int -> StaticIp -> ShowS
Prelude.Show, forall x. Rep StaticIp x -> StaticIp
forall x. StaticIp -> Rep StaticIp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StaticIp x -> StaticIp
$cfrom :: forall x. StaticIp -> Rep StaticIp x
Prelude.Generic)
newStaticIp ::
StaticIp
newStaticIp :: StaticIp
newStaticIp =
StaticIp'
{ $sel:arn:StaticIp' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:attachedTo:StaticIp' :: Maybe Text
attachedTo = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:StaticIp' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:ipAddress:StaticIp' :: Maybe Text
ipAddress = forall a. Maybe a
Prelude.Nothing,
$sel:isAttached:StaticIp' :: Maybe Bool
isAttached = forall a. Maybe a
Prelude.Nothing,
$sel:location:StaticIp' :: Maybe ResourceLocation
location = forall a. Maybe a
Prelude.Nothing,
$sel:name:StaticIp' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:StaticIp' :: Maybe ResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:StaticIp' :: Maybe Text
supportCode = forall a. Maybe a
Prelude.Nothing
}
staticIp_arn :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Text)
staticIp_arn :: Lens' StaticIp (Maybe Text)
staticIp_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Text
arn :: Maybe Text
$sel:arn:StaticIp' :: StaticIp -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StaticIp
s@StaticIp' {} Maybe Text
a -> StaticIp
s {$sel:arn:StaticIp' :: Maybe Text
arn = Maybe Text
a} :: StaticIp)
staticIp_attachedTo :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Text)
staticIp_attachedTo :: Lens' StaticIp (Maybe Text)
staticIp_attachedTo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Text
attachedTo :: Maybe Text
$sel:attachedTo:StaticIp' :: StaticIp -> Maybe Text
attachedTo} -> Maybe Text
attachedTo) (\s :: StaticIp
s@StaticIp' {} Maybe Text
a -> StaticIp
s {$sel:attachedTo:StaticIp' :: Maybe Text
attachedTo = Maybe Text
a} :: StaticIp)
staticIp_createdAt :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.UTCTime)
staticIp_createdAt :: Lens' StaticIp (Maybe UTCTime)
staticIp_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:StaticIp' :: StaticIp -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: StaticIp
s@StaticIp' {} Maybe POSIX
a -> StaticIp
s {$sel:createdAt:StaticIp' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: StaticIp) 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
staticIp_ipAddress :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Text)
staticIp_ipAddress :: Lens' StaticIp (Maybe Text)
staticIp_ipAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:StaticIp' :: StaticIp -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: StaticIp
s@StaticIp' {} Maybe Text
a -> StaticIp
s {$sel:ipAddress:StaticIp' :: Maybe Text
ipAddress = Maybe Text
a} :: StaticIp)
staticIp_isAttached :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Bool)
staticIp_isAttached :: Lens' StaticIp (Maybe Bool)
staticIp_isAttached = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Bool
isAttached :: Maybe Bool
$sel:isAttached:StaticIp' :: StaticIp -> Maybe Bool
isAttached} -> Maybe Bool
isAttached) (\s :: StaticIp
s@StaticIp' {} Maybe Bool
a -> StaticIp
s {$sel:isAttached:StaticIp' :: Maybe Bool
isAttached = Maybe Bool
a} :: StaticIp)
staticIp_location :: Lens.Lens' StaticIp (Prelude.Maybe ResourceLocation)
staticIp_location :: Lens' StaticIp (Maybe ResourceLocation)
staticIp_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:StaticIp' :: StaticIp -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: StaticIp
s@StaticIp' {} Maybe ResourceLocation
a -> StaticIp
s {$sel:location:StaticIp' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: StaticIp)
staticIp_name :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Text)
staticIp_name :: Lens' StaticIp (Maybe Text)
staticIp_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Text
name :: Maybe Text
$sel:name:StaticIp' :: StaticIp -> Maybe Text
name} -> Maybe Text
name) (\s :: StaticIp
s@StaticIp' {} Maybe Text
a -> StaticIp
s {$sel:name:StaticIp' :: Maybe Text
name = Maybe Text
a} :: StaticIp)
staticIp_resourceType :: Lens.Lens' StaticIp (Prelude.Maybe ResourceType)
staticIp_resourceType :: Lens' StaticIp (Maybe ResourceType)
staticIp_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:StaticIp' :: StaticIp -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: StaticIp
s@StaticIp' {} Maybe ResourceType
a -> StaticIp
s {$sel:resourceType:StaticIp' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: StaticIp)
staticIp_supportCode :: Lens.Lens' StaticIp (Prelude.Maybe Prelude.Text)
staticIp_supportCode :: Lens' StaticIp (Maybe Text)
staticIp_supportCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StaticIp' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:StaticIp' :: StaticIp -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: StaticIp
s@StaticIp' {} Maybe Text
a -> StaticIp
s {$sel:supportCode:StaticIp' :: Maybe Text
supportCode = Maybe Text
a} :: StaticIp)
instance Data.FromJSON StaticIp where
parseJSON :: Value -> Parser StaticIp
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StaticIp"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> StaticIp
StaticIp'
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
"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
"attachedTo")
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
"ipAddress")
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
"isAttached")
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
"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
"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
"supportCode")
)
instance Prelude.Hashable StaticIp where
hashWithSalt :: Int -> StaticIp -> Int
hashWithSalt Int
_salt StaticIp' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe ResourceLocation
Maybe ResourceType
supportCode :: Maybe Text
resourceType :: Maybe ResourceType
name :: Maybe Text
location :: Maybe ResourceLocation
isAttached :: Maybe Bool
ipAddress :: Maybe Text
createdAt :: Maybe POSIX
attachedTo :: Maybe Text
arn :: Maybe Text
$sel:supportCode:StaticIp' :: StaticIp -> Maybe Text
$sel:resourceType:StaticIp' :: StaticIp -> Maybe ResourceType
$sel:name:StaticIp' :: StaticIp -> Maybe Text
$sel:location:StaticIp' :: StaticIp -> Maybe ResourceLocation
$sel:isAttached:StaticIp' :: StaticIp -> Maybe Bool
$sel:ipAddress:StaticIp' :: StaticIp -> Maybe Text
$sel:createdAt:StaticIp' :: StaticIp -> Maybe POSIX
$sel:attachedTo:StaticIp' :: StaticIp -> Maybe Text
$sel:arn:StaticIp' :: StaticIp -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
attachedTo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isAttached
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceLocation
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceType
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportCode
instance Prelude.NFData StaticIp where
rnf :: StaticIp -> ()
rnf StaticIp' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe ResourceLocation
Maybe ResourceType
supportCode :: Maybe Text
resourceType :: Maybe ResourceType
name :: Maybe Text
location :: Maybe ResourceLocation
isAttached :: Maybe Bool
ipAddress :: Maybe Text
createdAt :: Maybe POSIX
attachedTo :: Maybe Text
arn :: Maybe Text
$sel:supportCode:StaticIp' :: StaticIp -> Maybe Text
$sel:resourceType:StaticIp' :: StaticIp -> Maybe ResourceType
$sel:name:StaticIp' :: StaticIp -> Maybe Text
$sel:location:StaticIp' :: StaticIp -> Maybe ResourceLocation
$sel:isAttached:StaticIp' :: StaticIp -> Maybe Bool
$sel:ipAddress:StaticIp' :: StaticIp -> Maybe Text
$sel:createdAt:StaticIp' :: StaticIp -> Maybe POSIX
$sel:attachedTo:StaticIp' :: StaticIp -> Maybe Text
$sel:arn:StaticIp' :: StaticIp -> Maybe Text
..} =
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
attachedTo
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
ipAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isAttached
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 Text
name
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
supportCode