{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CustomRoutingEndpointDescription = CustomRoutingEndpointDescription'
{
CustomRoutingEndpointDescription -> Maybe Text
endpointId :: Prelude.Maybe Prelude.Text
}
deriving (CustomRoutingEndpointDescription
-> CustomRoutingEndpointDescription -> Bool
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]
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
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.
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'
{ $sel:endpointId:CustomRoutingEndpointDescription' :: Maybe Text
endpointId =
forall a. Maybe a
Prelude.Nothing
}
customRoutingEndpointDescription_endpointId :: Lens.Lens' CustomRoutingEndpointDescription (Prelude.Maybe Prelude.Text)
customRoutingEndpointDescription_endpointId :: Lens' CustomRoutingEndpointDescription (Maybe Text)
customRoutingEndpointDescription_endpointId = 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
Data.FromJSON
CustomRoutingEndpointDescription
where
parseJSON :: Value -> Parser CustomRoutingEndpointDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomRoutingEndpointDescription"
( \Object
x ->
Maybe Text -> CustomRoutingEndpointDescription
CustomRoutingEndpointDescription'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndpointId")
)
instance
Prelude.Hashable
CustomRoutingEndpointDescription
where
hashWithSalt :: Int -> CustomRoutingEndpointDescription -> Int
hashWithSalt
Int
_salt
CustomRoutingEndpointDescription' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointDescription' :: CustomRoutingEndpointDescription -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpointId
instance
Prelude.NFData
CustomRoutingEndpointDescription
where
rnf :: CustomRoutingEndpointDescription -> ()
rnf CustomRoutingEndpointDescription' {Maybe Text
endpointId :: Maybe Text
$sel:endpointId:CustomRoutingEndpointDescription' :: CustomRoutingEndpointDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpointId