{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CustomRoutingEndpointConfiguration = CustomRoutingEndpointConfiguration'
{
CustomRoutingEndpointConfiguration -> Maybe Text
endpointId :: Prelude.Maybe Prelude.Text
}
deriving (CustomRoutingEndpointConfiguration
-> CustomRoutingEndpointConfiguration -> Bool
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]
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
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.
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'
{ $sel:endpointId:CustomRoutingEndpointConfiguration' :: Maybe Text
endpointId =
forall a. Maybe a
Prelude.Nothing
}
customRoutingEndpointConfiguration_endpointId :: Lens.Lens' CustomRoutingEndpointConfiguration (Prelude.Maybe Prelude.Text)
customRoutingEndpointConfiguration_endpointId :: Lens' CustomRoutingEndpointConfiguration (Maybe Text)
customRoutingEndpointConfiguration_endpointId = 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
where
hashWithSalt :: Int -> CustomRoutingEndpointConfiguration -> Int
hashWithSalt
Int
_salt
CustomRoutingEndpointConfiguration' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointConfiguration' :: CustomRoutingEndpointConfiguration -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpointId
instance
Prelude.NFData
CustomRoutingEndpointConfiguration
where
rnf :: CustomRoutingEndpointConfiguration -> ()
rnf CustomRoutingEndpointConfiguration' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointConfiguration' :: CustomRoutingEndpointConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpointId
instance
Data.ToJSON
CustomRoutingEndpointConfiguration
where
toJSON :: CustomRoutingEndpointConfiguration -> Value
toJSON CustomRoutingEndpointConfiguration' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointConfiguration' :: CustomRoutingEndpointConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"EndpointId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
endpointId]
)