{-# 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.TrafficPolicySummary 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
import Amazonka.Route53.Types.RRType
data TrafficPolicySummary = TrafficPolicySummary'
{
TrafficPolicySummary -> Text
id :: Prelude.Text,
TrafficPolicySummary -> Text
name :: Prelude.Text,
TrafficPolicySummary -> RRType
type' :: RRType,
TrafficPolicySummary -> Natural
latestVersion :: Prelude.Natural,
TrafficPolicySummary -> Natural
trafficPolicyCount :: Prelude.Natural
}
deriving (TrafficPolicySummary -> TrafficPolicySummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrafficPolicySummary -> TrafficPolicySummary -> Bool
$c/= :: TrafficPolicySummary -> TrafficPolicySummary -> Bool
== :: TrafficPolicySummary -> TrafficPolicySummary -> Bool
$c== :: TrafficPolicySummary -> TrafficPolicySummary -> Bool
Prelude.Eq, ReadPrec [TrafficPolicySummary]
ReadPrec TrafficPolicySummary
Int -> ReadS TrafficPolicySummary
ReadS [TrafficPolicySummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrafficPolicySummary]
$creadListPrec :: ReadPrec [TrafficPolicySummary]
readPrec :: ReadPrec TrafficPolicySummary
$creadPrec :: ReadPrec TrafficPolicySummary
readList :: ReadS [TrafficPolicySummary]
$creadList :: ReadS [TrafficPolicySummary]
readsPrec :: Int -> ReadS TrafficPolicySummary
$creadsPrec :: Int -> ReadS TrafficPolicySummary
Prelude.Read, Int -> TrafficPolicySummary -> ShowS
[TrafficPolicySummary] -> ShowS
TrafficPolicySummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrafficPolicySummary] -> ShowS
$cshowList :: [TrafficPolicySummary] -> ShowS
show :: TrafficPolicySummary -> String
$cshow :: TrafficPolicySummary -> String
showsPrec :: Int -> TrafficPolicySummary -> ShowS
$cshowsPrec :: Int -> TrafficPolicySummary -> ShowS
Prelude.Show, forall x. Rep TrafficPolicySummary x -> TrafficPolicySummary
forall x. TrafficPolicySummary -> Rep TrafficPolicySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrafficPolicySummary x -> TrafficPolicySummary
$cfrom :: forall x. TrafficPolicySummary -> Rep TrafficPolicySummary x
Prelude.Generic)
newTrafficPolicySummary ::
Prelude.Text ->
Prelude.Text ->
RRType ->
Prelude.Natural ->
Prelude.Natural ->
TrafficPolicySummary
newTrafficPolicySummary :: Text
-> Text -> RRType -> Natural -> Natural -> TrafficPolicySummary
newTrafficPolicySummary
Text
pId_
Text
pName_
RRType
pType_
Natural
pLatestVersion_
Natural
pTrafficPolicyCount_ =
TrafficPolicySummary'
{ $sel:id:TrafficPolicySummary' :: Text
id = Text
pId_,
$sel:name:TrafficPolicySummary' :: Text
name = Text
pName_,
$sel:type':TrafficPolicySummary' :: RRType
type' = RRType
pType_,
$sel:latestVersion:TrafficPolicySummary' :: Natural
latestVersion = Natural
pLatestVersion_,
$sel:trafficPolicyCount:TrafficPolicySummary' :: Natural
trafficPolicyCount = Natural
pTrafficPolicyCount_
}
trafficPolicySummary_id :: Lens.Lens' TrafficPolicySummary Prelude.Text
trafficPolicySummary_id :: Lens' TrafficPolicySummary Text
trafficPolicySummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficPolicySummary' {Text
id :: Text
$sel:id:TrafficPolicySummary' :: TrafficPolicySummary -> Text
id} -> Text
id) (\s :: TrafficPolicySummary
s@TrafficPolicySummary' {} Text
a -> TrafficPolicySummary
s {$sel:id:TrafficPolicySummary' :: Text
id = Text
a} :: TrafficPolicySummary)
trafficPolicySummary_name :: Lens.Lens' TrafficPolicySummary Prelude.Text
trafficPolicySummary_name :: Lens' TrafficPolicySummary Text
trafficPolicySummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficPolicySummary' {Text
name :: Text
$sel:name:TrafficPolicySummary' :: TrafficPolicySummary -> Text
name} -> Text
name) (\s :: TrafficPolicySummary
s@TrafficPolicySummary' {} Text
a -> TrafficPolicySummary
s {$sel:name:TrafficPolicySummary' :: Text
name = Text
a} :: TrafficPolicySummary)
trafficPolicySummary_type :: Lens.Lens' TrafficPolicySummary RRType
trafficPolicySummary_type :: Lens' TrafficPolicySummary RRType
trafficPolicySummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficPolicySummary' {RRType
type' :: RRType
$sel:type':TrafficPolicySummary' :: TrafficPolicySummary -> RRType
type'} -> RRType
type') (\s :: TrafficPolicySummary
s@TrafficPolicySummary' {} RRType
a -> TrafficPolicySummary
s {$sel:type':TrafficPolicySummary' :: RRType
type' = RRType
a} :: TrafficPolicySummary)
trafficPolicySummary_latestVersion :: Lens.Lens' TrafficPolicySummary Prelude.Natural
trafficPolicySummary_latestVersion :: Lens' TrafficPolicySummary Natural
trafficPolicySummary_latestVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficPolicySummary' {Natural
latestVersion :: Natural
$sel:latestVersion:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
latestVersion} -> Natural
latestVersion) (\s :: TrafficPolicySummary
s@TrafficPolicySummary' {} Natural
a -> TrafficPolicySummary
s {$sel:latestVersion:TrafficPolicySummary' :: Natural
latestVersion = Natural
a} :: TrafficPolicySummary)
trafficPolicySummary_trafficPolicyCount :: Lens.Lens' TrafficPolicySummary Prelude.Natural
trafficPolicySummary_trafficPolicyCount :: Lens' TrafficPolicySummary Natural
trafficPolicySummary_trafficPolicyCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficPolicySummary' {Natural
trafficPolicyCount :: Natural
$sel:trafficPolicyCount:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
trafficPolicyCount} -> Natural
trafficPolicyCount) (\s :: TrafficPolicySummary
s@TrafficPolicySummary' {} Natural
a -> TrafficPolicySummary
s {$sel:trafficPolicyCount:TrafficPolicySummary' :: Natural
trafficPolicyCount = Natural
a} :: TrafficPolicySummary)
instance Data.FromXML TrafficPolicySummary where
parseXML :: [Node] -> Either String TrafficPolicySummary
parseXML [Node]
x =
Text
-> Text -> RRType -> Natural -> Natural -> TrafficPolicySummary
TrafficPolicySummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String 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 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 a
Data..@ Text
"Type")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"LatestVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"TrafficPolicyCount")
instance Prelude.Hashable TrafficPolicySummary where
hashWithSalt :: Int -> TrafficPolicySummary -> Int
hashWithSalt Int
_salt TrafficPolicySummary' {Natural
Text
RRType
trafficPolicyCount :: Natural
latestVersion :: Natural
type' :: RRType
name :: Text
id :: Text
$sel:trafficPolicyCount:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
$sel:latestVersion:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
$sel:type':TrafficPolicySummary' :: TrafficPolicySummary -> RRType
$sel:name:TrafficPolicySummary' :: TrafficPolicySummary -> Text
$sel:id:TrafficPolicySummary' :: TrafficPolicySummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RRType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
latestVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
trafficPolicyCount
instance Prelude.NFData TrafficPolicySummary where
rnf :: TrafficPolicySummary -> ()
rnf TrafficPolicySummary' {Natural
Text
RRType
trafficPolicyCount :: Natural
latestVersion :: Natural
type' :: RRType
name :: Text
id :: Text
$sel:trafficPolicyCount:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
$sel:latestVersion:TrafficPolicySummary' :: TrafficPolicySummary -> Natural
$sel:type':TrafficPolicySummary' :: TrafficPolicySummary -> RRType
$sel:name:TrafficPolicySummary' :: TrafficPolicySummary -> Text
$sel:id:TrafficPolicySummary' :: TrafficPolicySummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RRType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
latestVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
trafficPolicyCount