{-# 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.Route53Resolver.Types.IpAddressResponse 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.Route53Resolver.Types.IpAddressStatus
data IpAddressResponse = IpAddressResponse'
{
IpAddressResponse -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
ip :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
ipId :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
modificationTime :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe IpAddressStatus
status :: Prelude.Maybe IpAddressStatus,
IpAddressResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
}
deriving (IpAddressResponse -> IpAddressResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IpAddressResponse -> IpAddressResponse -> Bool
$c/= :: IpAddressResponse -> IpAddressResponse -> Bool
== :: IpAddressResponse -> IpAddressResponse -> Bool
$c== :: IpAddressResponse -> IpAddressResponse -> Bool
Prelude.Eq, ReadPrec [IpAddressResponse]
ReadPrec IpAddressResponse
Int -> ReadS IpAddressResponse
ReadS [IpAddressResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IpAddressResponse]
$creadListPrec :: ReadPrec [IpAddressResponse]
readPrec :: ReadPrec IpAddressResponse
$creadPrec :: ReadPrec IpAddressResponse
readList :: ReadS [IpAddressResponse]
$creadList :: ReadS [IpAddressResponse]
readsPrec :: Int -> ReadS IpAddressResponse
$creadsPrec :: Int -> ReadS IpAddressResponse
Prelude.Read, Int -> IpAddressResponse -> ShowS
[IpAddressResponse] -> ShowS
IpAddressResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IpAddressResponse] -> ShowS
$cshowList :: [IpAddressResponse] -> ShowS
show :: IpAddressResponse -> String
$cshow :: IpAddressResponse -> String
showsPrec :: Int -> IpAddressResponse -> ShowS
$cshowsPrec :: Int -> IpAddressResponse -> ShowS
Prelude.Show, forall x. Rep IpAddressResponse x -> IpAddressResponse
forall x. IpAddressResponse -> Rep IpAddressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IpAddressResponse x -> IpAddressResponse
$cfrom :: forall x. IpAddressResponse -> Rep IpAddressResponse x
Prelude.Generic)
newIpAddressResponse ::
IpAddressResponse
newIpAddressResponse :: IpAddressResponse
newIpAddressResponse =
IpAddressResponse'
{ $sel:creationTime:IpAddressResponse' :: Maybe Text
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:ip:IpAddressResponse' :: Maybe Text
ip = forall a. Maybe a
Prelude.Nothing,
$sel:ipId:IpAddressResponse' :: Maybe Text
ipId = forall a. Maybe a
Prelude.Nothing,
$sel:modificationTime:IpAddressResponse' :: Maybe Text
modificationTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:IpAddressResponse' :: Maybe IpAddressStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:IpAddressResponse' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:IpAddressResponse' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing
}
ipAddressResponse_creationTime :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_creationTime :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
creationTime :: Maybe Text
$sel:creationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
creationTime} -> Maybe Text
creationTime) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:creationTime:IpAddressResponse' :: Maybe Text
creationTime = Maybe Text
a} :: IpAddressResponse)
ipAddressResponse_ip :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_ip :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_ip = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
ip :: Maybe Text
$sel:ip:IpAddressResponse' :: IpAddressResponse -> Maybe Text
ip} -> Maybe Text
ip) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:ip:IpAddressResponse' :: Maybe Text
ip = Maybe Text
a} :: IpAddressResponse)
ipAddressResponse_ipId :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_ipId :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_ipId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
ipId :: Maybe Text
$sel:ipId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
ipId} -> Maybe Text
ipId) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:ipId:IpAddressResponse' :: Maybe Text
ipId = Maybe Text
a} :: IpAddressResponse)
ipAddressResponse_modificationTime :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_modificationTime :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_modificationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
modificationTime :: Maybe Text
$sel:modificationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
modificationTime} -> Maybe Text
modificationTime) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:modificationTime:IpAddressResponse' :: Maybe Text
modificationTime = Maybe Text
a} :: IpAddressResponse)
ipAddressResponse_status :: Lens.Lens' IpAddressResponse (Prelude.Maybe IpAddressStatus)
ipAddressResponse_status :: Lens' IpAddressResponse (Maybe IpAddressStatus)
ipAddressResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe IpAddressStatus
status :: Maybe IpAddressStatus
$sel:status:IpAddressResponse' :: IpAddressResponse -> Maybe IpAddressStatus
status} -> Maybe IpAddressStatus
status) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe IpAddressStatus
a -> IpAddressResponse
s {$sel:status:IpAddressResponse' :: Maybe IpAddressStatus
status = Maybe IpAddressStatus
a} :: IpAddressResponse)
ipAddressResponse_statusMessage :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_statusMessage :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:IpAddressResponse' :: IpAddressResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:statusMessage:IpAddressResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: IpAddressResponse)
ipAddressResponse_subnetId :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_subnetId :: Lens' IpAddressResponse (Maybe Text)
ipAddressResponse_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressResponse' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: IpAddressResponse
s@IpAddressResponse' {} Maybe Text
a -> IpAddressResponse
s {$sel:subnetId:IpAddressResponse' :: Maybe Text
subnetId = Maybe Text
a} :: IpAddressResponse)
instance Data.FromJSON IpAddressResponse where
parseJSON :: Value -> Parser IpAddressResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IpAddressResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> IpAddressResponse
IpAddressResponse'
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
"CreationTime")
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
"IpId")
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
"ModificationTime")
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
"Status")
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
"StatusMessage")
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
"SubnetId")
)
instance Prelude.Hashable IpAddressResponse where
hashWithSalt :: Int -> IpAddressResponse -> Int
hashWithSalt Int
_salt IpAddressResponse' {Maybe Text
Maybe IpAddressStatus
subnetId :: Maybe Text
statusMessage :: Maybe Text
status :: Maybe IpAddressStatus
modificationTime :: Maybe Text
ipId :: Maybe Text
ip :: Maybe Text
creationTime :: Maybe Text
$sel:subnetId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:statusMessage:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:status:IpAddressResponse' :: IpAddressResponse -> Maybe IpAddressStatus
$sel:modificationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:ipId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:ip:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:creationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ip
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modificationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
instance Prelude.NFData IpAddressResponse where
rnf :: IpAddressResponse -> ()
rnf IpAddressResponse' {Maybe Text
Maybe IpAddressStatus
subnetId :: Maybe Text
statusMessage :: Maybe Text
status :: Maybe IpAddressStatus
modificationTime :: Maybe Text
ipId :: Maybe Text
ip :: Maybe Text
creationTime :: Maybe Text
$sel:subnetId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:statusMessage:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:status:IpAddressResponse' :: IpAddressResponse -> Maybe IpAddressStatus
$sel:modificationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:ipId:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:ip:IpAddressResponse' :: IpAddressResponse -> Maybe Text
$sel:creationTime:IpAddressResponse' :: IpAddressResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationTime
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
ipId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modificationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpAddressStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId