{-# 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.CollectionSummary 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 CollectionSummary = CollectionSummary'
{
CollectionSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CollectionSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CollectionSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CollectionSummary -> Maybe Natural
version :: Prelude.Maybe Prelude.Natural
}
deriving (CollectionSummary -> CollectionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectionSummary -> CollectionSummary -> Bool
$c/= :: CollectionSummary -> CollectionSummary -> Bool
== :: CollectionSummary -> CollectionSummary -> Bool
$c== :: CollectionSummary -> CollectionSummary -> Bool
Prelude.Eq, ReadPrec [CollectionSummary]
ReadPrec CollectionSummary
Int -> ReadS CollectionSummary
ReadS [CollectionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CollectionSummary]
$creadListPrec :: ReadPrec [CollectionSummary]
readPrec :: ReadPrec CollectionSummary
$creadPrec :: ReadPrec CollectionSummary
readList :: ReadS [CollectionSummary]
$creadList :: ReadS [CollectionSummary]
readsPrec :: Int -> ReadS CollectionSummary
$creadsPrec :: Int -> ReadS CollectionSummary
Prelude.Read, Int -> CollectionSummary -> ShowS
[CollectionSummary] -> ShowS
CollectionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CollectionSummary] -> ShowS
$cshowList :: [CollectionSummary] -> ShowS
show :: CollectionSummary -> String
$cshow :: CollectionSummary -> String
showsPrec :: Int -> CollectionSummary -> ShowS
$cshowsPrec :: Int -> CollectionSummary -> ShowS
Prelude.Show, forall x. Rep CollectionSummary x -> CollectionSummary
forall x. CollectionSummary -> Rep CollectionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CollectionSummary x -> CollectionSummary
$cfrom :: forall x. CollectionSummary -> Rep CollectionSummary x
Prelude.Generic)
newCollectionSummary ::
CollectionSummary
newCollectionSummary :: CollectionSummary
newCollectionSummary =
CollectionSummary'
{ $sel:arn:CollectionSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:id:CollectionSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:CollectionSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:version:CollectionSummary' :: Maybe Natural
version = forall a. Maybe a
Prelude.Nothing
}
collectionSummary_arn :: Lens.Lens' CollectionSummary (Prelude.Maybe Prelude.Text)
collectionSummary_arn :: Lens' CollectionSummary (Maybe Text)
collectionSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectionSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:CollectionSummary' :: CollectionSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CollectionSummary
s@CollectionSummary' {} Maybe Text
a -> CollectionSummary
s {$sel:arn:CollectionSummary' :: Maybe Text
arn = Maybe Text
a} :: CollectionSummary)
collectionSummary_id :: Lens.Lens' CollectionSummary (Prelude.Maybe Prelude.Text)
collectionSummary_id :: Lens' CollectionSummary (Maybe Text)
collectionSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectionSummary' {Maybe Text
id :: Maybe Text
$sel:id:CollectionSummary' :: CollectionSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: CollectionSummary
s@CollectionSummary' {} Maybe Text
a -> CollectionSummary
s {$sel:id:CollectionSummary' :: Maybe Text
id = Maybe Text
a} :: CollectionSummary)
collectionSummary_name :: Lens.Lens' CollectionSummary (Prelude.Maybe Prelude.Text)
collectionSummary_name :: Lens' CollectionSummary (Maybe Text)
collectionSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectionSummary' {Maybe Text
name :: Maybe Text
$sel:name:CollectionSummary' :: CollectionSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: CollectionSummary
s@CollectionSummary' {} Maybe Text
a -> CollectionSummary
s {$sel:name:CollectionSummary' :: Maybe Text
name = Maybe Text
a} :: CollectionSummary)
collectionSummary_version :: Lens.Lens' CollectionSummary (Prelude.Maybe Prelude.Natural)
collectionSummary_version :: Lens' CollectionSummary (Maybe Natural)
collectionSummary_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectionSummary' {Maybe Natural
version :: Maybe Natural
$sel:version:CollectionSummary' :: CollectionSummary -> Maybe Natural
version} -> Maybe Natural
version) (\s :: CollectionSummary
s@CollectionSummary' {} Maybe Natural
a -> CollectionSummary
s {$sel:version:CollectionSummary' :: Maybe Natural
version = Maybe Natural
a} :: CollectionSummary)
instance Data.FromXML CollectionSummary where
parseXML :: [Node] -> Either String CollectionSummary
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> CollectionSummary
CollectionSummary'
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 CollectionSummary where
hashWithSalt :: Int -> CollectionSummary -> Int
hashWithSalt Int
_salt CollectionSummary' {Maybe Natural
Maybe Text
version :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:version:CollectionSummary' :: CollectionSummary -> Maybe Natural
$sel:name:CollectionSummary' :: CollectionSummary -> Maybe Text
$sel:id:CollectionSummary' :: CollectionSummary -> Maybe Text
$sel:arn:CollectionSummary' :: CollectionSummary -> 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 CollectionSummary where
rnf :: CollectionSummary -> ()
rnf CollectionSummary' {Maybe Natural
Maybe Text
version :: Maybe Natural
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:version:CollectionSummary' :: CollectionSummary -> Maybe Natural
$sel:name:CollectionSummary' :: CollectionSummary -> Maybe Text
$sel:id:CollectionSummary' :: CollectionSummary -> Maybe Text
$sel:arn:CollectionSummary' :: CollectionSummary -> 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