{-# 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.Route53.Types.CidrCollection 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.Route53.Internal
data CidrCollection = CidrCollection'
{
CidrCollection -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CidrCollection -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CidrCollection -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CidrCollection -> Maybe Natural
version :: Prelude.Maybe Prelude.Natural
}
deriving (CidrCollection -> CidrCollection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CidrCollection -> CidrCollection -> Bool
$c/= :: CidrCollection -> CidrCollection -> Bool
== :: CidrCollection -> CidrCollection -> Bool
$c== :: CidrCollection -> CidrCollection -> Bool
Prelude.Eq, ReadPrec [CidrCollection]
ReadPrec CidrCollection
Int -> ReadS CidrCollection
ReadS [CidrCollection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CidrCollection]
$creadListPrec :: ReadPrec [CidrCollection]
readPrec :: ReadPrec CidrCollection
$creadPrec :: ReadPrec CidrCollection
readList :: ReadS [CidrCollection]
$creadList :: ReadS [CidrCollection]
readsPrec :: Int -> ReadS CidrCollection
$creadsPrec :: Int -> ReadS CidrCollection
Prelude.Read, Int -> CidrCollection -> ShowS
[CidrCollection] -> ShowS
CidrCollection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CidrCollection] -> ShowS
$cshowList :: [CidrCollection] -> ShowS
show :: CidrCollection -> String
$cshow :: CidrCollection -> String
showsPrec :: Int -> CidrCollection -> ShowS
$cshowsPrec :: Int -> CidrCollection -> ShowS
Prelude.Show, forall x. Rep CidrCollection x -> CidrCollection
forall x. CidrCollection -> Rep CidrCollection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CidrCollection x -> CidrCollection
$cfrom :: forall x. CidrCollection -> Rep CidrCollection x
Prelude.Generic)
newCidrCollection ::
CidrCollection
newCidrCollection :: CidrCollection
newCidrCollection =
CidrCollection'
{ $sel:arn:CidrCollection' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:id:CidrCollection' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:CidrCollection' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:version:CidrCollection' :: Maybe Natural
version = forall a. Maybe a
Prelude.Nothing
}
cidrCollection_arn :: Lens.Lens' CidrCollection (Prelude.Maybe Prelude.Text)
cidrCollection_arn :: Lens' CidrCollection (Maybe Text)
cidrCollection_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CidrCollection' {Maybe Text
arn :: Maybe Text
$sel:arn:CidrCollection' :: CidrCollection -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CidrCollection
s@CidrCollection' {} Maybe Text
a -> CidrCollection
s {$sel:arn:CidrCollection' :: Maybe Text
arn = Maybe Text
a} :: CidrCollection)
cidrCollection_id :: Lens.Lens' CidrCollection (Prelude.Maybe Prelude.Text)
cidrCollection_id :: Lens' CidrCollection (Maybe Text)
cidrCollection_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CidrCollection' {Maybe Text
id :: Maybe Text
$sel:id:CidrCollection' :: CidrCollection -> Maybe Text
id} -> Maybe Text
id) (\s :: CidrCollection
s@CidrCollection' {} Maybe Text
a -> CidrCollection
s {$sel:id:CidrCollection' :: Maybe Text
id = Maybe Text
a} :: CidrCollection)
cidrCollection_name :: Lens.Lens' CidrCollection (Prelude.Maybe Prelude.Text)
cidrCollection_name :: Lens' CidrCollection (Maybe Text)
cidrCollection_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CidrCollection' {Maybe Text
name :: Maybe Text
$sel:name:CidrCollection' :: CidrCollection -> Maybe Text
name} -> Maybe Text
name) (\s :: CidrCollection
s@CidrCollection' {} Maybe Text
a -> CidrCollection
s {$sel:name:CidrCollection' :: Maybe Text
name = Maybe Text
a} :: CidrCollection)
cidrCollection_version :: Lens.Lens' CidrCollection (Prelude.Maybe Prelude.Natural)
cidrCollection_version :: Lens' CidrCollection (Maybe Natural)
cidrCollection_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CidrCollection' {Maybe Natural
version :: Maybe Natural
$sel:version:CidrCollection' :: CidrCollection -> Maybe Natural
version} -> Maybe Natural
version) (\s :: CidrCollection
s@CidrCollection' {} Maybe Natural
a -> CidrCollection
s {$sel:version:CidrCollection' :: Maybe Natural
version = Maybe Natural
a} :: CidrCollection)
instance Data.FromXML CidrCollection where
parseXML :: [Node] -> Either String CidrCollection
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> CidrCollection
CidrCollection'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Version")
instance Prelude.Hashable CidrCollection where
hashWithSalt :: Int -> CidrCollection -> Int
hashWithSalt Int
_salt CidrCollection' {Maybe Natural
Maybe Text
version :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:version:CidrCollection' :: CidrCollection -> Maybe Natural
$sel:name:CidrCollection' :: CidrCollection -> Maybe Text
$sel:id:CidrCollection' :: CidrCollection -> Maybe Text
$sel:arn:CidrCollection' :: CidrCollection -> 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
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
version
instance Prelude.NFData CidrCollection where
rnf :: CidrCollection -> ()
rnf CidrCollection' {Maybe Natural
Maybe Text
version :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:version:CidrCollection' :: CidrCollection -> Maybe Natural
$sel:name:CidrCollection' :: CidrCollection -> Maybe Text
$sel:id:CidrCollection' :: CidrCollection -> Maybe Text
$sel:arn:CidrCollection' :: CidrCollection -> 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
id
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 Natural
version