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