{-# 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.EC2.Types.Ipv6Range where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data Ipv6Range = Ipv6Range'
{
Ipv6Range -> Maybe Text
cidrIpv6 :: Prelude.Maybe Prelude.Text,
Ipv6Range -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Ipv6Range -> Ipv6Range -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ipv6Range -> Ipv6Range -> Bool
$c/= :: Ipv6Range -> Ipv6Range -> Bool
== :: Ipv6Range -> Ipv6Range -> Bool
$c== :: Ipv6Range -> Ipv6Range -> Bool
Prelude.Eq, ReadPrec [Ipv6Range]
ReadPrec Ipv6Range
Int -> ReadS Ipv6Range
ReadS [Ipv6Range]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ipv6Range]
$creadListPrec :: ReadPrec [Ipv6Range]
readPrec :: ReadPrec Ipv6Range
$creadPrec :: ReadPrec Ipv6Range
readList :: ReadS [Ipv6Range]
$creadList :: ReadS [Ipv6Range]
readsPrec :: Int -> ReadS Ipv6Range
$creadsPrec :: Int -> ReadS Ipv6Range
Prelude.Read, Int -> Ipv6Range -> ShowS
[Ipv6Range] -> ShowS
Ipv6Range -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ipv6Range] -> ShowS
$cshowList :: [Ipv6Range] -> ShowS
show :: Ipv6Range -> String
$cshow :: Ipv6Range -> String
showsPrec :: Int -> Ipv6Range -> ShowS
$cshowsPrec :: Int -> Ipv6Range -> ShowS
Prelude.Show, forall x. Rep Ipv6Range x -> Ipv6Range
forall x. Ipv6Range -> Rep Ipv6Range x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ipv6Range x -> Ipv6Range
$cfrom :: forall x. Ipv6Range -> Rep Ipv6Range x
Prelude.Generic)
newIpv6Range ::
Ipv6Range
newIpv6Range :: Ipv6Range
newIpv6Range =
Ipv6Range'
{ $sel:cidrIpv6:Ipv6Range' :: Maybe Text
cidrIpv6 = forall a. Maybe a
Prelude.Nothing,
$sel:description:Ipv6Range' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing
}
ipv6Range_cidrIpv6 :: Lens.Lens' Ipv6Range (Prelude.Maybe Prelude.Text)
ipv6Range_cidrIpv6 :: Lens' Ipv6Range (Maybe Text)
ipv6Range_cidrIpv6 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ipv6Range' {Maybe Text
cidrIpv6 :: Maybe Text
$sel:cidrIpv6:Ipv6Range' :: Ipv6Range -> Maybe Text
cidrIpv6} -> Maybe Text
cidrIpv6) (\s :: Ipv6Range
s@Ipv6Range' {} Maybe Text
a -> Ipv6Range
s {$sel:cidrIpv6:Ipv6Range' :: Maybe Text
cidrIpv6 = Maybe Text
a} :: Ipv6Range)
ipv6Range_description :: Lens.Lens' Ipv6Range (Prelude.Maybe Prelude.Text)
ipv6Range_description :: Lens' Ipv6Range (Maybe Text)
ipv6Range_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ipv6Range' {Maybe Text
description :: Maybe Text
$sel:description:Ipv6Range' :: Ipv6Range -> Maybe Text
description} -> Maybe Text
description) (\s :: Ipv6Range
s@Ipv6Range' {} Maybe Text
a -> Ipv6Range
s {$sel:description:Ipv6Range' :: Maybe Text
description = Maybe Text
a} :: Ipv6Range)
instance Data.FromXML Ipv6Range where
parseXML :: [Node] -> Either String Ipv6Range
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Ipv6Range
Ipv6Range'
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
"cidrIpv6")
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
"description")
instance Prelude.Hashable Ipv6Range where
hashWithSalt :: Int -> Ipv6Range -> Int
hashWithSalt Int
_salt Ipv6Range' {Maybe Text
description :: Maybe Text
cidrIpv6 :: Maybe Text
$sel:description:Ipv6Range' :: Ipv6Range -> Maybe Text
$sel:cidrIpv6:Ipv6Range' :: Ipv6Range -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cidrIpv6
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
instance Prelude.NFData Ipv6Range where
rnf :: Ipv6Range -> ()
rnf Ipv6Range' {Maybe Text
description :: Maybe Text
cidrIpv6 :: Maybe Text
$sel:description:Ipv6Range' :: Ipv6Range -> Maybe Text
$sel:cidrIpv6:Ipv6Range' :: Ipv6Range -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cidrIpv6
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
instance Data.ToQuery Ipv6Range where
toQuery :: Ipv6Range -> QueryString
toQuery Ipv6Range' {Maybe Text
description :: Maybe Text
cidrIpv6 :: Maybe Text
$sel:description:Ipv6Range' :: Ipv6Range -> Maybe Text
$sel:cidrIpv6:Ipv6Range' :: Ipv6Range -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"CidrIpv6" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cidrIpv6,
ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description
]