{-# 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.OpsWorks.Types.ElasticIp 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
data ElasticIp = ElasticIp'
{
ElasticIp -> Maybe Text
domain :: Prelude.Maybe Prelude.Text,
ElasticIp -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
ElasticIp -> Maybe Text
ip :: Prelude.Maybe Prelude.Text,
ElasticIp -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ElasticIp -> Maybe Text
region :: Prelude.Maybe Prelude.Text
}
deriving (ElasticIp -> ElasticIp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticIp -> ElasticIp -> Bool
$c/= :: ElasticIp -> ElasticIp -> Bool
== :: ElasticIp -> ElasticIp -> Bool
$c== :: ElasticIp -> ElasticIp -> Bool
Prelude.Eq, ReadPrec [ElasticIp]
ReadPrec ElasticIp
Int -> ReadS ElasticIp
ReadS [ElasticIp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticIp]
$creadListPrec :: ReadPrec [ElasticIp]
readPrec :: ReadPrec ElasticIp
$creadPrec :: ReadPrec ElasticIp
readList :: ReadS [ElasticIp]
$creadList :: ReadS [ElasticIp]
readsPrec :: Int -> ReadS ElasticIp
$creadsPrec :: Int -> ReadS ElasticIp
Prelude.Read, Int -> ElasticIp -> ShowS
[ElasticIp] -> ShowS
ElasticIp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticIp] -> ShowS
$cshowList :: [ElasticIp] -> ShowS
show :: ElasticIp -> String
$cshow :: ElasticIp -> String
showsPrec :: Int -> ElasticIp -> ShowS
$cshowsPrec :: Int -> ElasticIp -> ShowS
Prelude.Show, forall x. Rep ElasticIp x -> ElasticIp
forall x. ElasticIp -> Rep ElasticIp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ElasticIp x -> ElasticIp
$cfrom :: forall x. ElasticIp -> Rep ElasticIp x
Prelude.Generic)
newElasticIp ::
ElasticIp
newElasticIp :: ElasticIp
newElasticIp =
ElasticIp'
{ $sel:domain:ElasticIp' :: Maybe Text
domain = forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:ElasticIp' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing,
$sel:ip:ElasticIp' :: Maybe Text
ip = forall a. Maybe a
Prelude.Nothing,
$sel:name:ElasticIp' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:region:ElasticIp' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing
}
elasticIp_domain :: Lens.Lens' ElasticIp (Prelude.Maybe Prelude.Text)
elasticIp_domain :: Lens' ElasticIp (Maybe Text)
elasticIp_domain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticIp' {Maybe Text
domain :: Maybe Text
$sel:domain:ElasticIp' :: ElasticIp -> Maybe Text
domain} -> Maybe Text
domain) (\s :: ElasticIp
s@ElasticIp' {} Maybe Text
a -> ElasticIp
s {$sel:domain:ElasticIp' :: Maybe Text
domain = Maybe Text
a} :: ElasticIp)
elasticIp_instanceId :: Lens.Lens' ElasticIp (Prelude.Maybe Prelude.Text)
elasticIp_instanceId :: Lens' ElasticIp (Maybe Text)
elasticIp_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticIp' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:ElasticIp' :: ElasticIp -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: ElasticIp
s@ElasticIp' {} Maybe Text
a -> ElasticIp
s {$sel:instanceId:ElasticIp' :: Maybe Text
instanceId = Maybe Text
a} :: ElasticIp)
elasticIp_ip :: Lens.Lens' ElasticIp (Prelude.Maybe Prelude.Text)
elasticIp_ip :: Lens' ElasticIp (Maybe Text)
elasticIp_ip = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticIp' {Maybe Text
ip :: Maybe Text
$sel:ip:ElasticIp' :: ElasticIp -> Maybe Text
ip} -> Maybe Text
ip) (\s :: ElasticIp
s@ElasticIp' {} Maybe Text
a -> ElasticIp
s {$sel:ip:ElasticIp' :: Maybe Text
ip = Maybe Text
a} :: ElasticIp)
elasticIp_name :: Lens.Lens' ElasticIp (Prelude.Maybe Prelude.Text)
elasticIp_name :: Lens' ElasticIp (Maybe Text)
elasticIp_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticIp' {Maybe Text
name :: Maybe Text
$sel:name:ElasticIp' :: ElasticIp -> Maybe Text
name} -> Maybe Text
name) (\s :: ElasticIp
s@ElasticIp' {} Maybe Text
a -> ElasticIp
s {$sel:name:ElasticIp' :: Maybe Text
name = Maybe Text
a} :: ElasticIp)
elasticIp_region :: Lens.Lens' ElasticIp (Prelude.Maybe Prelude.Text)
elasticIp_region :: Lens' ElasticIp (Maybe Text)
elasticIp_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticIp' {Maybe Text
region :: Maybe Text
$sel:region:ElasticIp' :: ElasticIp -> Maybe Text
region} -> Maybe Text
region) (\s :: ElasticIp
s@ElasticIp' {} Maybe Text
a -> ElasticIp
s {$sel:region:ElasticIp' :: Maybe Text
region = Maybe Text
a} :: ElasticIp)
instance Data.FromJSON ElasticIp where
parseJSON :: Value -> Parser ElasticIp
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ElasticIp"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ElasticIp
ElasticIp'
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
"Domain")
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
"Ip")
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
"Region")
)
instance Prelude.Hashable ElasticIp where
hashWithSalt :: Int -> ElasticIp -> Int
hashWithSalt Int
_salt ElasticIp' {Maybe Text
region :: Maybe Text
name :: Maybe Text
ip :: Maybe Text
instanceId :: Maybe Text
domain :: Maybe Text
$sel:region:ElasticIp' :: ElasticIp -> Maybe Text
$sel:name:ElasticIp' :: ElasticIp -> Maybe Text
$sel:ip:ElasticIp' :: ElasticIp -> Maybe Text
$sel:instanceId:ElasticIp' :: ElasticIp -> Maybe Text
$sel:domain:ElasticIp' :: ElasticIp -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domain
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ip
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
instance Prelude.NFData ElasticIp where
rnf :: ElasticIp -> ()
rnf ElasticIp' {Maybe Text
region :: Maybe Text
name :: Maybe Text
ip :: Maybe Text
instanceId :: Maybe Text
domain :: Maybe Text
$sel:region:ElasticIp' :: ElasticIp -> Maybe Text
$sel:name:ElasticIp' :: ElasticIp -> Maybe Text
$sel:ip:ElasticIp' :: ElasticIp -> Maybe Text
$sel:instanceId:ElasticIp' :: ElasticIp -> Maybe Text
$sel:domain:ElasticIp' :: ElasticIp -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domain
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
ip
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 Text
region