{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Resolver.Types.IpAddressStatus
data IpAddressResponse = IpAddressResponse'
{
IpAddressResponse -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe IpAddressStatus
status :: Prelude.Maybe IpAddressStatus,
IpAddressResponse -> Maybe Text
modificationTime :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
ip :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
ipId :: Prelude.Maybe Prelude.Text,
IpAddressResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text
}
deriving (IpAddressResponse -> IpAddressResponse -> Bool
(IpAddressResponse -> IpAddressResponse -> Bool)
-> (IpAddressResponse -> IpAddressResponse -> Bool)
-> Eq IpAddressResponse
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]
(Int -> ReadS IpAddressResponse)
-> ReadS [IpAddressResponse]
-> ReadPrec IpAddressResponse
-> ReadPrec [IpAddressResponse]
-> Read 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
(Int -> IpAddressResponse -> ShowS)
-> (IpAddressResponse -> String)
-> ([IpAddressResponse] -> ShowS)
-> Show IpAddressResponse
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. IpAddressResponse -> Rep IpAddressResponse x)
-> (forall x. Rep IpAddressResponse x -> IpAddressResponse)
-> Generic IpAddressResponse
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' :: Maybe Text
-> Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse
IpAddressResponse'
{ $sel:creationTime:IpAddressResponse' :: Maybe Text
creationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:IpAddressResponse' :: Maybe IpAddressStatus
status = Maybe IpAddressStatus
forall a. Maybe a
Prelude.Nothing,
$sel:modificationTime:IpAddressResponse' :: Maybe Text
modificationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:IpAddressResponse' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ip:IpAddressResponse' :: Maybe Text
ip = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipId:IpAddressResponse' :: Maybe Text
ipId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:IpAddressResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
ipAddressResponse_creationTime :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_creationTime :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_creationTime = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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_status :: Lens.Lens' IpAddressResponse (Prelude.Maybe IpAddressStatus)
ipAddressResponse_status :: (Maybe IpAddressStatus -> f (Maybe IpAddressStatus))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_status = (IpAddressResponse -> Maybe IpAddressStatus)
-> (IpAddressResponse
-> Maybe IpAddressStatus -> IpAddressResponse)
-> Lens
IpAddressResponse
IpAddressResponse
(Maybe IpAddressStatus)
(Maybe IpAddressStatus)
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_modificationTime :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_modificationTime :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_modificationTime = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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_subnetId :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_subnetId :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_subnetId = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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)
ipAddressResponse_ip :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_ip :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_ip = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_ipId = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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_statusMessage :: Lens.Lens' IpAddressResponse (Prelude.Maybe Prelude.Text)
ipAddressResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> IpAddressResponse -> f IpAddressResponse
ipAddressResponse_statusMessage = (IpAddressResponse -> Maybe Text)
-> (IpAddressResponse -> Maybe Text -> IpAddressResponse)
-> Lens
IpAddressResponse IpAddressResponse (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON IpAddressResponse where
parseJSON :: Value -> Parser IpAddressResponse
parseJSON =
String
-> (Object -> Parser IpAddressResponse)
-> Value
-> Parser IpAddressResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IpAddressResponse"
( \Object
x ->
Maybe Text
-> Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse
IpAddressResponse'
(Maybe Text
-> Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe IpAddressStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse)
-> Parser (Maybe IpAddressStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpAddressStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IpAddressResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> IpAddressResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModificationTime")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> IpAddressResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> IpAddressResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetId")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> IpAddressResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> IpAddressResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Ip")
Parser (Maybe Text -> Maybe Text -> IpAddressResponse)
-> Parser (Maybe Text) -> Parser (Maybe Text -> IpAddressResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IpId")
Parser (Maybe Text -> IpAddressResponse)
-> Parser (Maybe Text) -> Parser IpAddressResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusMessage")
)
instance Prelude.Hashable IpAddressResponse
instance Prelude.NFData IpAddressResponse