{-# 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.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.HostedZoneLimitType
data HostedZoneLimit = HostedZoneLimit'
{
HostedZoneLimit -> HostedZoneLimitType
type' :: HostedZoneLimitType,
HostedZoneLimit -> Natural
value :: Prelude.Natural
}
deriving (HostedZoneLimit -> HostedZoneLimit -> Bool
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]
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
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. 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' {$sel:type':HostedZoneLimit' :: HostedZoneLimitType
type' = HostedZoneLimitType
pType_, $sel:value:HostedZoneLimit' :: Natural
value = Natural
pValue_}
hostedZoneLimit_type :: Lens.Lens' HostedZoneLimit HostedZoneLimitType
hostedZoneLimit_type :: Lens' HostedZoneLimit HostedZoneLimitType
hostedZoneLimit_type = 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 :: Lens' HostedZoneLimit Natural
hostedZoneLimit_value = 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 Data.FromXML HostedZoneLimit where
parseXML :: [Node] -> Either String HostedZoneLimit
parseXML [Node]
x =
HostedZoneLimitType -> Natural -> HostedZoneLimit
HostedZoneLimit'
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
"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
"Value")
instance Prelude.Hashable HostedZoneLimit where
hashWithSalt :: Int -> HostedZoneLimit -> Int
hashWithSalt Int
_salt HostedZoneLimit' {Natural
HostedZoneLimitType
value :: Natural
type' :: HostedZoneLimitType
$sel:value:HostedZoneLimit' :: HostedZoneLimit -> Natural
$sel:type':HostedZoneLimit' :: HostedZoneLimit -> HostedZoneLimitType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HostedZoneLimitType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
value
instance Prelude.NFData HostedZoneLimit where
rnf :: HostedZoneLimit -> ()
rnf HostedZoneLimit' {Natural
HostedZoneLimitType
value :: Natural
type' :: HostedZoneLimitType
$sel:value:HostedZoneLimit' :: HostedZoneLimit -> Natural
$sel:type':HostedZoneLimit' :: HostedZoneLimit -> HostedZoneLimitType
..} =
forall a. NFData a => a -> ()
Prelude.rnf HostedZoneLimitType
type' seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
value