{-# 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.IpAddressUpdate 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 IpAddressUpdate = IpAddressUpdate'
{
IpAddressUpdate -> Maybe Text
ip :: Prelude.Maybe Prelude.Text,
IpAddressUpdate -> Maybe Text
ipId :: Prelude.Maybe Prelude.Text,
IpAddressUpdate -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
}
deriving (IpAddressUpdate -> IpAddressUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IpAddressUpdate -> IpAddressUpdate -> Bool
$c/= :: IpAddressUpdate -> IpAddressUpdate -> Bool
== :: IpAddressUpdate -> IpAddressUpdate -> Bool
$c== :: IpAddressUpdate -> IpAddressUpdate -> Bool
Prelude.Eq, ReadPrec [IpAddressUpdate]
ReadPrec IpAddressUpdate
Int -> ReadS IpAddressUpdate
ReadS [IpAddressUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IpAddressUpdate]
$creadListPrec :: ReadPrec [IpAddressUpdate]
readPrec :: ReadPrec IpAddressUpdate
$creadPrec :: ReadPrec IpAddressUpdate
readList :: ReadS [IpAddressUpdate]
$creadList :: ReadS [IpAddressUpdate]
readsPrec :: Int -> ReadS IpAddressUpdate
$creadsPrec :: Int -> ReadS IpAddressUpdate
Prelude.Read, Int -> IpAddressUpdate -> ShowS
[IpAddressUpdate] -> ShowS
IpAddressUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IpAddressUpdate] -> ShowS
$cshowList :: [IpAddressUpdate] -> ShowS
show :: IpAddressUpdate -> String
$cshow :: IpAddressUpdate -> String
showsPrec :: Int -> IpAddressUpdate -> ShowS
$cshowsPrec :: Int -> IpAddressUpdate -> ShowS
Prelude.Show, forall x. Rep IpAddressUpdate x -> IpAddressUpdate
forall x. IpAddressUpdate -> Rep IpAddressUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IpAddressUpdate x -> IpAddressUpdate
$cfrom :: forall x. IpAddressUpdate -> Rep IpAddressUpdate x
Prelude.Generic)
newIpAddressUpdate ::
IpAddressUpdate
newIpAddressUpdate :: IpAddressUpdate
newIpAddressUpdate =
IpAddressUpdate'
{ $sel:ip:IpAddressUpdate' :: Maybe Text
ip = forall a. Maybe a
Prelude.Nothing,
$sel:ipId:IpAddressUpdate' :: Maybe Text
ipId = forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:IpAddressUpdate' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing
}
ipAddressUpdate_ip :: Lens.Lens' IpAddressUpdate (Prelude.Maybe Prelude.Text)
ipAddressUpdate_ip :: Lens' IpAddressUpdate (Maybe Text)
ipAddressUpdate_ip = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressUpdate' {Maybe Text
ip :: Maybe Text
$sel:ip:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
ip} -> Maybe Text
ip) (\s :: IpAddressUpdate
s@IpAddressUpdate' {} Maybe Text
a -> IpAddressUpdate
s {$sel:ip:IpAddressUpdate' :: Maybe Text
ip = Maybe Text
a} :: IpAddressUpdate)
ipAddressUpdate_ipId :: Lens.Lens' IpAddressUpdate (Prelude.Maybe Prelude.Text)
ipAddressUpdate_ipId :: Lens' IpAddressUpdate (Maybe Text)
ipAddressUpdate_ipId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressUpdate' {Maybe Text
ipId :: Maybe Text
$sel:ipId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
ipId} -> Maybe Text
ipId) (\s :: IpAddressUpdate
s@IpAddressUpdate' {} Maybe Text
a -> IpAddressUpdate
s {$sel:ipId:IpAddressUpdate' :: Maybe Text
ipId = Maybe Text
a} :: IpAddressUpdate)
ipAddressUpdate_subnetId :: Lens.Lens' IpAddressUpdate (Prelude.Maybe Prelude.Text)
ipAddressUpdate_subnetId :: Lens' IpAddressUpdate (Maybe Text)
ipAddressUpdate_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpAddressUpdate' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: IpAddressUpdate
s@IpAddressUpdate' {} Maybe Text
a -> IpAddressUpdate
s {$sel:subnetId:IpAddressUpdate' :: Maybe Text
subnetId = Maybe Text
a} :: IpAddressUpdate)
instance Prelude.Hashable IpAddressUpdate where
hashWithSalt :: Int -> IpAddressUpdate -> Int
hashWithSalt Int
_salt IpAddressUpdate' {Maybe Text
subnetId :: Maybe Text
ipId :: Maybe Text
ip :: Maybe Text
$sel:subnetId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ipId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ip:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
..} =
Int
_salt
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
subnetId
instance Prelude.NFData IpAddressUpdate where
rnf :: IpAddressUpdate -> ()
rnf IpAddressUpdate' {Maybe Text
subnetId :: Maybe Text
ipId :: Maybe Text
ip :: Maybe Text
$sel:subnetId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ipId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ip:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
..} =
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
subnetId
instance Data.ToJSON IpAddressUpdate where
toJSON :: IpAddressUpdate -> Value
toJSON IpAddressUpdate' {Maybe Text
subnetId :: Maybe Text
ipId :: Maybe Text
ip :: Maybe Text
$sel:subnetId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ipId:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
$sel:ip:IpAddressUpdate' :: IpAddressUpdate -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Ip" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ip,
(Key
"IpId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ipId,
(Key
"SubnetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subnetId
]
)