{-# 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.CustomRoutingEndpointDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomRoutingEndpointDescription = CustomRoutingEndpointDescription'
{
CustomRoutingEndpointDescription -> Maybe Text
endpointId :: Prelude.Maybe Prelude.Text
}
deriving (CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
(CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool)
-> (CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool)
-> Eq CustomRoutingEndpointDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
$c/= :: CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
== :: CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
$c== :: CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
Prelude.Eq, ReadPrec [CustomRoutingEndpointDescription]
ReadPrec CustomRoutingEndpointDescription
Int -> ReadS CustomRoutingEndpointDescription
ReadS [CustomRoutingEndpointDescription]
(Int -> ReadS CustomRoutingEndpointDescription)
-> ReadS [CustomRoutingEndpointDescription]
-> ReadPrec CustomRoutingEndpointDescription
-> ReadPrec [CustomRoutingEndpointDescription]
-> Read CustomRoutingEndpointDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomRoutingEndpointDescription]
$creadListPrec :: ReadPrec [CustomRoutingEndpointDescription]
readPrec :: ReadPrec CustomRoutingEndpointDescription
$creadPrec :: ReadPrec CustomRoutingEndpointDescription
readList :: ReadS [CustomRoutingEndpointDescription]
$creadList :: ReadS [CustomRoutingEndpointDescription]
readsPrec :: Int -> ReadS CustomRoutingEndpointDescription
$creadsPrec :: Int -> ReadS CustomRoutingEndpointDescription
Prelude.Read, Int -> CustomRoutingEndpointDescription -> ShowS
[CustomRoutingEndpointDescription] -> ShowS
CustomRoutingEndpointDescription -> String
(Int -> CustomRoutingEndpointDescription -> ShowS)
-> (CustomRoutingEndpointDescription -> String)
-> ([CustomRoutingEndpointDescription] -> ShowS)
-> Show CustomRoutingEndpointDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomRoutingEndpointDescription] -> ShowS
$cshowList :: [CustomRoutingEndpointDescription] -> ShowS
show :: CustomRoutingEndpointDescription -> String
$cshow :: CustomRoutingEndpointDescription -> String
showsPrec :: Int -> CustomRoutingEndpointDescription -> ShowS
$cshowsPrec :: Int -> CustomRoutingEndpointDescription -> ShowS
Prelude.Show, (forall x.
CustomRoutingEndpointDescription
-> Rep CustomRoutingEndpointDescription x)
-> (forall x.
Rep CustomRoutingEndpointDescription x
-> CustomRoutingEndpointDescription)
-> Generic CustomRoutingEndpointDescription
forall x.
Rep CustomRoutingEndpointDescription x
-> CustomRoutingEndpointDescription
forall x.
CustomRoutingEndpointDescription
-> Rep CustomRoutingEndpointDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomRoutingEndpointDescription x
-> CustomRoutingEndpointDescription
$cfrom :: forall x.
CustomRoutingEndpointDescription
-> Rep CustomRoutingEndpointDescription x
Prelude.Generic)
newCustomRoutingEndpointDescription ::
CustomRoutingEndpointDescription
newCustomRoutingEndpointDescription :: CustomRoutingEndpointDescription
newCustomRoutingEndpointDescription =
CustomRoutingEndpointDescription' :: Maybe Text -> CustomRoutingEndpointDescription
CustomRoutingEndpointDescription'
{ $sel:endpointId:CustomRoutingEndpointDescription' :: Maybe Text
endpointId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customRoutingEndpointDescription_endpointId :: Lens.Lens' CustomRoutingEndpointDescription (Prelude.Maybe Prelude.Text)
customRoutingEndpointDescription_endpointId :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingEndpointDescription
-> f CustomRoutingEndpointDescription
customRoutingEndpointDescription_endpointId = (CustomRoutingEndpointDescription -> Maybe Text)
-> (CustomRoutingEndpointDescription
-> Maybe Text -> CustomRoutingEndpointDescription)
-> Lens
CustomRoutingEndpointDescription
CustomRoutingEndpointDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingEndpointDescription' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointDescription' :: CustomRoutingEndpointDescription -> Maybe Text
endpointId} -> Maybe Text
endpointId) (\s :: CustomRoutingEndpointDescription
s@CustomRoutingEndpointDescription' {} Maybe Text
a -> CustomRoutingEndpointDescription
s {$sel:endpointId:CustomRoutingEndpointDescription' :: Maybe Text
endpointId = Maybe Text
a} :: CustomRoutingEndpointDescription)
instance
Core.FromJSON
CustomRoutingEndpointDescription
where
parseJSON :: Value -> Parser CustomRoutingEndpointDescription
parseJSON =
String
-> (Object -> Parser CustomRoutingEndpointDescription)
-> Value
-> Parser CustomRoutingEndpointDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomRoutingEndpointDescription"
( \Object
x ->
Maybe Text -> CustomRoutingEndpointDescription
CustomRoutingEndpointDescription'
(Maybe Text -> CustomRoutingEndpointDescription)
-> Parser (Maybe Text) -> Parser CustomRoutingEndpointDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointId")
)
instance
Prelude.Hashable
CustomRoutingEndpointDescription
instance
Prelude.NFData
CustomRoutingEndpointDescription