{-# 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.HostedZoneLimit where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
import Amazonka.Route53.Types.HostedZoneLimitType
data HostedZoneLimit = HostedZoneLimit'
{
HostedZoneLimit -> HostedZoneLimitType
type' :: HostedZoneLimitType,
HostedZoneLimit -> Natural
value :: Prelude.Natural
}
deriving (HostedZoneLimit -> HostedZoneLimit -> Bool
(HostedZoneLimit -> HostedZoneLimit -> Bool)
-> (HostedZoneLimit -> HostedZoneLimit -> Bool)
-> Eq HostedZoneLimit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HostedZoneLimit -> HostedZoneLimit -> Bool
$c/= :: HostedZoneLimit -> HostedZoneLimit -> Bool
== :: HostedZoneLimit -> HostedZoneLimit -> Bool
$c== :: HostedZoneLimit -> HostedZoneLimit -> Bool
Prelude.Eq, ReadPrec [HostedZoneLimit]
ReadPrec HostedZoneLimit
Int -> ReadS HostedZoneLimit
ReadS [HostedZoneLimit]
(Int -> ReadS HostedZoneLimit)
-> ReadS [HostedZoneLimit]
-> ReadPrec HostedZoneLimit
-> ReadPrec [HostedZoneLimit]
-> Read HostedZoneLimit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HostedZoneLimit]
$creadListPrec :: ReadPrec [HostedZoneLimit]
readPrec :: ReadPrec HostedZoneLimit
$creadPrec :: ReadPrec HostedZoneLimit
readList :: ReadS [HostedZoneLimit]
$creadList :: ReadS [HostedZoneLimit]
readsPrec :: Int -> ReadS HostedZoneLimit
$creadsPrec :: Int -> ReadS HostedZoneLimit
Prelude.Read, Int -> HostedZoneLimit -> ShowS
[HostedZoneLimit] -> ShowS
HostedZoneLimit -> String
(Int -> HostedZoneLimit -> ShowS)
-> (HostedZoneLimit -> String)
-> ([HostedZoneLimit] -> ShowS)
-> Show HostedZoneLimit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HostedZoneLimit] -> ShowS
$cshowList :: [HostedZoneLimit] -> ShowS
show :: HostedZoneLimit -> String
$cshow :: HostedZoneLimit -> String
showsPrec :: Int -> HostedZoneLimit -> ShowS
$cshowsPrec :: Int -> HostedZoneLimit -> ShowS
Prelude.Show, (forall x. HostedZoneLimit -> Rep HostedZoneLimit x)
-> (forall x. Rep HostedZoneLimit x -> HostedZoneLimit)
-> Generic HostedZoneLimit
forall x. Rep HostedZoneLimit x -> HostedZoneLimit
forall x. HostedZoneLimit -> Rep HostedZoneLimit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HostedZoneLimit x -> HostedZoneLimit
$cfrom :: forall x. HostedZoneLimit -> Rep HostedZoneLimit x
Prelude.Generic)
newHostedZoneLimit ::
HostedZoneLimitType ->
Prelude.Natural ->
HostedZoneLimit
newHostedZoneLimit :: HostedZoneLimitType -> Natural -> HostedZoneLimit
newHostedZoneLimit HostedZoneLimitType
pType_ Natural
pValue_ =
HostedZoneLimit' :: HostedZoneLimitType -> Natural -> HostedZoneLimit
HostedZoneLimit' {$sel:type':HostedZoneLimit' :: HostedZoneLimitType
type' = HostedZoneLimitType
pType_, $sel:value:HostedZoneLimit' :: Natural
value = Natural
pValue_}
hostedZoneLimit_type :: Lens.Lens' HostedZoneLimit HostedZoneLimitType
hostedZoneLimit_type :: (HostedZoneLimitType -> f HostedZoneLimitType)
-> HostedZoneLimit -> f HostedZoneLimit
hostedZoneLimit_type = (HostedZoneLimit -> HostedZoneLimitType)
-> (HostedZoneLimit -> HostedZoneLimitType -> HostedZoneLimit)
-> Lens
HostedZoneLimit
HostedZoneLimit
HostedZoneLimitType
HostedZoneLimitType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedZoneLimit' {HostedZoneLimitType
type' :: HostedZoneLimitType
$sel:type':HostedZoneLimit' :: HostedZoneLimit -> HostedZoneLimitType
type'} -> HostedZoneLimitType
type') (\s :: HostedZoneLimit
s@HostedZoneLimit' {} HostedZoneLimitType
a -> HostedZoneLimit
s {$sel:type':HostedZoneLimit' :: HostedZoneLimitType
type' = HostedZoneLimitType
a} :: HostedZoneLimit)
hostedZoneLimit_value :: Lens.Lens' HostedZoneLimit Prelude.Natural
hostedZoneLimit_value :: (Natural -> f Natural) -> HostedZoneLimit -> f HostedZoneLimit
hostedZoneLimit_value = (HostedZoneLimit -> Natural)
-> (HostedZoneLimit -> Natural -> HostedZoneLimit)
-> Lens HostedZoneLimit HostedZoneLimit Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedZoneLimit' {Natural
value :: Natural
$sel:value:HostedZoneLimit' :: HostedZoneLimit -> Natural
value} -> Natural
value) (\s :: HostedZoneLimit
s@HostedZoneLimit' {} Natural
a -> HostedZoneLimit
s {$sel:value:HostedZoneLimit' :: Natural
value = Natural
a} :: HostedZoneLimit)
instance Core.FromXML HostedZoneLimit where
parseXML :: [Node] -> Either String HostedZoneLimit
parseXML [Node]
x =
HostedZoneLimitType -> Natural -> HostedZoneLimit
HostedZoneLimit'
(HostedZoneLimitType -> Natural -> HostedZoneLimit)
-> Either String HostedZoneLimitType
-> Either String (Natural -> HostedZoneLimit)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String HostedZoneLimitType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Type") Either String (Natural -> HostedZoneLimit)
-> Either String Natural -> Either String HostedZoneLimit
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Natural
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Value")
instance Prelude.Hashable HostedZoneLimit
instance Prelude.NFData HostedZoneLimit