{-# 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.Ipv4PrefixSpecificationRequest 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 Ipv4PrefixSpecificationRequest = Ipv4PrefixSpecificationRequest'
{
Ipv4PrefixSpecificationRequest -> Maybe Text
ipv4Prefix :: Prelude.Maybe Prelude.Text
}
deriving (Ipv4PrefixSpecificationRequest
-> Ipv4PrefixSpecificationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ipv4PrefixSpecificationRequest
-> Ipv4PrefixSpecificationRequest -> Bool
$c/= :: Ipv4PrefixSpecificationRequest
-> Ipv4PrefixSpecificationRequest -> Bool
== :: Ipv4PrefixSpecificationRequest
-> Ipv4PrefixSpecificationRequest -> Bool
$c== :: Ipv4PrefixSpecificationRequest
-> Ipv4PrefixSpecificationRequest -> Bool
Prelude.Eq, ReadPrec [Ipv4PrefixSpecificationRequest]
ReadPrec Ipv4PrefixSpecificationRequest
Int -> ReadS Ipv4PrefixSpecificationRequest
ReadS [Ipv4PrefixSpecificationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ipv4PrefixSpecificationRequest]
$creadListPrec :: ReadPrec [Ipv4PrefixSpecificationRequest]
readPrec :: ReadPrec Ipv4PrefixSpecificationRequest
$creadPrec :: ReadPrec Ipv4PrefixSpecificationRequest
readList :: ReadS [Ipv4PrefixSpecificationRequest]
$creadList :: ReadS [Ipv4PrefixSpecificationRequest]
readsPrec :: Int -> ReadS Ipv4PrefixSpecificationRequest
$creadsPrec :: Int -> ReadS Ipv4PrefixSpecificationRequest
Prelude.Read, Int -> Ipv4PrefixSpecificationRequest -> ShowS
[Ipv4PrefixSpecificationRequest] -> ShowS
Ipv4PrefixSpecificationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ipv4PrefixSpecificationRequest] -> ShowS
$cshowList :: [Ipv4PrefixSpecificationRequest] -> ShowS
show :: Ipv4PrefixSpecificationRequest -> String
$cshow :: Ipv4PrefixSpecificationRequest -> String
showsPrec :: Int -> Ipv4PrefixSpecificationRequest -> ShowS
$cshowsPrec :: Int -> Ipv4PrefixSpecificationRequest -> ShowS
Prelude.Show, forall x.
Rep Ipv4PrefixSpecificationRequest x
-> Ipv4PrefixSpecificationRequest
forall x.
Ipv4PrefixSpecificationRequest
-> Rep Ipv4PrefixSpecificationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Ipv4PrefixSpecificationRequest x
-> Ipv4PrefixSpecificationRequest
$cfrom :: forall x.
Ipv4PrefixSpecificationRequest
-> Rep Ipv4PrefixSpecificationRequest x
Prelude.Generic)
newIpv4PrefixSpecificationRequest ::
Ipv4PrefixSpecificationRequest
newIpv4PrefixSpecificationRequest :: Ipv4PrefixSpecificationRequest
newIpv4PrefixSpecificationRequest =
Ipv4PrefixSpecificationRequest'
{ $sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Maybe Text
ipv4Prefix =
forall a. Maybe a
Prelude.Nothing
}
ipv4PrefixSpecificationRequest_ipv4Prefix :: Lens.Lens' Ipv4PrefixSpecificationRequest (Prelude.Maybe Prelude.Text)
ipv4PrefixSpecificationRequest_ipv4Prefix :: Lens' Ipv4PrefixSpecificationRequest (Maybe Text)
ipv4PrefixSpecificationRequest_ipv4Prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ipv4PrefixSpecificationRequest' {Maybe Text
ipv4Prefix :: Maybe Text
$sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Ipv4PrefixSpecificationRequest -> Maybe Text
ipv4Prefix} -> Maybe Text
ipv4Prefix) (\s :: Ipv4PrefixSpecificationRequest
s@Ipv4PrefixSpecificationRequest' {} Maybe Text
a -> Ipv4PrefixSpecificationRequest
s {$sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Maybe Text
ipv4Prefix = Maybe Text
a} :: Ipv4PrefixSpecificationRequest)
instance Data.FromXML Ipv4PrefixSpecificationRequest where
parseXML :: [Node] -> Either String Ipv4PrefixSpecificationRequest
parseXML [Node]
x =
Maybe Text -> Ipv4PrefixSpecificationRequest
Ipv4PrefixSpecificationRequest'
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
"Ipv4Prefix")
instance
Prelude.Hashable
Ipv4PrefixSpecificationRequest
where
hashWithSalt :: Int -> Ipv4PrefixSpecificationRequest -> Int
hashWithSalt
Int
_salt
Ipv4PrefixSpecificationRequest' {Maybe Text
ipv4Prefix :: Maybe Text
$sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Ipv4PrefixSpecificationRequest -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv4Prefix
instance
Prelude.NFData
Ipv4PrefixSpecificationRequest
where
rnf :: Ipv4PrefixSpecificationRequest -> ()
rnf Ipv4PrefixSpecificationRequest' {Maybe Text
ipv4Prefix :: Maybe Text
$sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Ipv4PrefixSpecificationRequest -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv4Prefix
instance Data.ToQuery Ipv4PrefixSpecificationRequest where
toQuery :: Ipv4PrefixSpecificationRequest -> QueryString
toQuery Ipv4PrefixSpecificationRequest' {Maybe Text
ipv4Prefix :: Maybe Text
$sel:ipv4Prefix:Ipv4PrefixSpecificationRequest' :: Ipv4PrefixSpecificationRequest -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Ipv4Prefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv4Prefix]