{-# 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.Kendra.Types.ExperienceEndpoint where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kendra.Types.EndpointType
import qualified Amazonka.Prelude as Prelude
data ExperienceEndpoint = ExperienceEndpoint'
{
ExperienceEndpoint -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
ExperienceEndpoint -> Maybe EndpointType
endpointType :: Prelude.Maybe EndpointType
}
deriving (ExperienceEndpoint -> ExperienceEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExperienceEndpoint -> ExperienceEndpoint -> Bool
$c/= :: ExperienceEndpoint -> ExperienceEndpoint -> Bool
== :: ExperienceEndpoint -> ExperienceEndpoint -> Bool
$c== :: ExperienceEndpoint -> ExperienceEndpoint -> Bool
Prelude.Eq, ReadPrec [ExperienceEndpoint]
ReadPrec ExperienceEndpoint
Int -> ReadS ExperienceEndpoint
ReadS [ExperienceEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExperienceEndpoint]
$creadListPrec :: ReadPrec [ExperienceEndpoint]
readPrec :: ReadPrec ExperienceEndpoint
$creadPrec :: ReadPrec ExperienceEndpoint
readList :: ReadS [ExperienceEndpoint]
$creadList :: ReadS [ExperienceEndpoint]
readsPrec :: Int -> ReadS ExperienceEndpoint
$creadsPrec :: Int -> ReadS ExperienceEndpoint
Prelude.Read, Int -> ExperienceEndpoint -> ShowS
[ExperienceEndpoint] -> ShowS
ExperienceEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExperienceEndpoint] -> ShowS
$cshowList :: [ExperienceEndpoint] -> ShowS
show :: ExperienceEndpoint -> String
$cshow :: ExperienceEndpoint -> String
showsPrec :: Int -> ExperienceEndpoint -> ShowS
$cshowsPrec :: Int -> ExperienceEndpoint -> ShowS
Prelude.Show, forall x. Rep ExperienceEndpoint x -> ExperienceEndpoint
forall x. ExperienceEndpoint -> Rep ExperienceEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExperienceEndpoint x -> ExperienceEndpoint
$cfrom :: forall x. ExperienceEndpoint -> Rep ExperienceEndpoint x
Prelude.Generic)
newExperienceEndpoint ::
ExperienceEndpoint
newExperienceEndpoint :: ExperienceEndpoint
newExperienceEndpoint =
ExperienceEndpoint'
{ $sel:endpoint:ExperienceEndpoint' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
$sel:endpointType:ExperienceEndpoint' :: Maybe EndpointType
endpointType = forall a. Maybe a
Prelude.Nothing
}
experienceEndpoint_endpoint :: Lens.Lens' ExperienceEndpoint (Prelude.Maybe Prelude.Text)
experienceEndpoint_endpoint :: Lens' ExperienceEndpoint (Maybe Text)
experienceEndpoint_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperienceEndpoint' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: ExperienceEndpoint
s@ExperienceEndpoint' {} Maybe Text
a -> ExperienceEndpoint
s {$sel:endpoint:ExperienceEndpoint' :: Maybe Text
endpoint = Maybe Text
a} :: ExperienceEndpoint)
experienceEndpoint_endpointType :: Lens.Lens' ExperienceEndpoint (Prelude.Maybe EndpointType)
experienceEndpoint_endpointType :: Lens' ExperienceEndpoint (Maybe EndpointType)
experienceEndpoint_endpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperienceEndpoint' {Maybe EndpointType
endpointType :: Maybe EndpointType
$sel:endpointType:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe EndpointType
endpointType} -> Maybe EndpointType
endpointType) (\s :: ExperienceEndpoint
s@ExperienceEndpoint' {} Maybe EndpointType
a -> ExperienceEndpoint
s {$sel:endpointType:ExperienceEndpoint' :: Maybe EndpointType
endpointType = Maybe EndpointType
a} :: ExperienceEndpoint)
instance Data.FromJSON ExperienceEndpoint where
parseJSON :: Value -> Parser ExperienceEndpoint
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExperienceEndpoint"
( \Object
x ->
Maybe Text -> Maybe EndpointType -> ExperienceEndpoint
ExperienceEndpoint'
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
"Endpoint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndpointType")
)
instance Prelude.Hashable ExperienceEndpoint where
hashWithSalt :: Int -> ExperienceEndpoint -> Int
hashWithSalt Int
_salt ExperienceEndpoint' {Maybe Text
Maybe EndpointType
endpointType :: Maybe EndpointType
endpoint :: Maybe Text
$sel:endpointType:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe EndpointType
$sel:endpoint:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointType
endpointType
instance Prelude.NFData ExperienceEndpoint where
rnf :: ExperienceEndpoint -> ()
rnf ExperienceEndpoint' {Maybe Text
Maybe EndpointType
endpointType :: Maybe EndpointType
endpoint :: Maybe Text
$sel:endpointType:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe EndpointType
$sel:endpoint:ExperienceEndpoint' :: ExperienceEndpoint -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointType
endpointType