{-# 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.GlobalAccelerator.Types.CustomRoutingEndpointConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomRoutingEndpointConfiguration = CustomRoutingEndpointConfiguration'
{
CustomRoutingEndpointConfiguration -> Maybe Text
endpointId :: Prelude.Maybe Prelude.Text
}
deriving (CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
(CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool)
-> (CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool)
-> Eq CustomRoutingEndpointConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
$c/= :: CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
== :: CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
$c== :: CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
Prelude.Eq, ReadPrec [CustomRoutingEndpointConfiguration]
ReadPrec CustomRoutingEndpointConfiguration
Int -> ReadS CustomRoutingEndpointConfiguration
ReadS [CustomRoutingEndpointConfiguration]
(Int -> ReadS CustomRoutingEndpointConfiguration)
-> ReadS [CustomRoutingEndpointConfiguration]
-> ReadPrec CustomRoutingEndpointConfiguration
-> ReadPrec [CustomRoutingEndpointConfiguration]
-> Read CustomRoutingEndpointConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomRoutingEndpointConfiguration]
$creadListPrec :: ReadPrec [CustomRoutingEndpointConfiguration]
readPrec :: ReadPrec CustomRoutingEndpointConfiguration
$creadPrec :: ReadPrec CustomRoutingEndpointConfiguration
readList :: ReadS [CustomRoutingEndpointConfiguration]
$creadList :: ReadS [CustomRoutingEndpointConfiguration]
readsPrec :: Int -> ReadS CustomRoutingEndpointConfiguration
$creadsPrec :: Int -> ReadS CustomRoutingEndpointConfiguration
Prelude.Read, Int -> CustomRoutingEndpointConfiguration -> ShowS
[CustomRoutingEndpointConfiguration] -> ShowS
CustomRoutingEndpointConfiguration -> String
(Int -> CustomRoutingEndpointConfiguration -> ShowS)
-> (CustomRoutingEndpointConfiguration -> String)
-> ([CustomRoutingEndpointConfiguration] -> ShowS)
-> Show CustomRoutingEndpointConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomRoutingEndpointConfiguration] -> ShowS
$cshowList :: [CustomRoutingEndpointConfiguration] -> ShowS
show :: CustomRoutingEndpointConfiguration -> String
$cshow :: CustomRoutingEndpointConfiguration -> String
showsPrec :: Int -> CustomRoutingEndpointConfiguration -> ShowS
$cshowsPrec :: Int -> CustomRoutingEndpointConfiguration -> ShowS
Prelude.Show, (forall x.
CustomRoutingEndpointConfiguration
-> Rep CustomRoutingEndpointConfiguration x)
-> (forall x.
Rep CustomRoutingEndpointConfiguration x
-> CustomRoutingEndpointConfiguration)
-> Generic CustomRoutingEndpointConfiguration
forall x.
Rep CustomRoutingEndpointConfiguration x
-> CustomRoutingEndpointConfiguration
forall x.
CustomRoutingEndpointConfiguration
-> Rep CustomRoutingEndpointConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomRoutingEndpointConfiguration x
-> CustomRoutingEndpointConfiguration
$cfrom :: forall x.
CustomRoutingEndpointConfiguration
-> Rep CustomRoutingEndpointConfiguration x
Prelude.Generic)
newCustomRoutingEndpointConfiguration ::
CustomRoutingEndpointConfiguration
newCustomRoutingEndpointConfiguration :: CustomRoutingEndpointConfiguration
newCustomRoutingEndpointConfiguration =
CustomRoutingEndpointConfiguration' :: Maybe Text -> CustomRoutingEndpointConfiguration
CustomRoutingEndpointConfiguration'
{ $sel:endpointId:CustomRoutingEndpointConfiguration' :: Maybe Text
endpointId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customRoutingEndpointConfiguration_endpointId :: Lens.Lens' CustomRoutingEndpointConfiguration (Prelude.Maybe Prelude.Text)
customRoutingEndpointConfiguration_endpointId :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingEndpointConfiguration
-> f CustomRoutingEndpointConfiguration
customRoutingEndpointConfiguration_endpointId = (CustomRoutingEndpointConfiguration -> Maybe Text)
-> (CustomRoutingEndpointConfiguration
-> Maybe Text -> CustomRoutingEndpointConfiguration)
-> Lens
CustomRoutingEndpointConfiguration
CustomRoutingEndpointConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingEndpointConfiguration' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointConfiguration' :: CustomRoutingEndpointConfiguration -> Maybe Text
endpointId} -> Maybe Text
endpointId) (\s :: CustomRoutingEndpointConfiguration
s@CustomRoutingEndpointConfiguration' {} Maybe Text
a -> CustomRoutingEndpointConfiguration
s {$sel:endpointId:CustomRoutingEndpointConfiguration' :: Maybe Text
endpointId = Maybe Text
a} :: CustomRoutingEndpointConfiguration)
instance
Prelude.Hashable
CustomRoutingEndpointConfiguration
instance
Prelude.NFData
CustomRoutingEndpointConfiguration
instance
Core.ToJSON
CustomRoutingEndpointConfiguration
where
toJSON :: CustomRoutingEndpointConfiguration -> Value
toJSON CustomRoutingEndpointConfiguration' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointConfiguration' :: CustomRoutingEndpointConfiguration -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"EndpointId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
endpointId]
)