{-# 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.QuickSight.Types.ServiceNowParameters 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 ServiceNowParameters = ServiceNowParameters'
{
ServiceNowParameters -> Text
siteBaseUrl :: Prelude.Text
}
deriving (ServiceNowParameters -> ServiceNowParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceNowParameters -> ServiceNowParameters -> Bool
$c/= :: ServiceNowParameters -> ServiceNowParameters -> Bool
== :: ServiceNowParameters -> ServiceNowParameters -> Bool
$c== :: ServiceNowParameters -> ServiceNowParameters -> Bool
Prelude.Eq, ReadPrec [ServiceNowParameters]
ReadPrec ServiceNowParameters
Int -> ReadS ServiceNowParameters
ReadS [ServiceNowParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceNowParameters]
$creadListPrec :: ReadPrec [ServiceNowParameters]
readPrec :: ReadPrec ServiceNowParameters
$creadPrec :: ReadPrec ServiceNowParameters
readList :: ReadS [ServiceNowParameters]
$creadList :: ReadS [ServiceNowParameters]
readsPrec :: Int -> ReadS ServiceNowParameters
$creadsPrec :: Int -> ReadS ServiceNowParameters
Prelude.Read, Int -> ServiceNowParameters -> ShowS
[ServiceNowParameters] -> ShowS
ServiceNowParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceNowParameters] -> ShowS
$cshowList :: [ServiceNowParameters] -> ShowS
show :: ServiceNowParameters -> String
$cshow :: ServiceNowParameters -> String
showsPrec :: Int -> ServiceNowParameters -> ShowS
$cshowsPrec :: Int -> ServiceNowParameters -> ShowS
Prelude.Show, forall x. Rep ServiceNowParameters x -> ServiceNowParameters
forall x. ServiceNowParameters -> Rep ServiceNowParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceNowParameters x -> ServiceNowParameters
$cfrom :: forall x. ServiceNowParameters -> Rep ServiceNowParameters x
Prelude.Generic)
newServiceNowParameters ::
Prelude.Text ->
ServiceNowParameters
newServiceNowParameters :: Text -> ServiceNowParameters
newServiceNowParameters Text
pSiteBaseUrl_ =
ServiceNowParameters' {$sel:siteBaseUrl:ServiceNowParameters' :: Text
siteBaseUrl = Text
pSiteBaseUrl_}
serviceNowParameters_siteBaseUrl :: Lens.Lens' ServiceNowParameters Prelude.Text
serviceNowParameters_siteBaseUrl :: Lens' ServiceNowParameters Text
serviceNowParameters_siteBaseUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceNowParameters' {Text
siteBaseUrl :: Text
$sel:siteBaseUrl:ServiceNowParameters' :: ServiceNowParameters -> Text
siteBaseUrl} -> Text
siteBaseUrl) (\s :: ServiceNowParameters
s@ServiceNowParameters' {} Text
a -> ServiceNowParameters
s {$sel:siteBaseUrl:ServiceNowParameters' :: Text
siteBaseUrl = Text
a} :: ServiceNowParameters)
instance Data.FromJSON ServiceNowParameters where
parseJSON :: Value -> Parser ServiceNowParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceNowParameters"
( \Object
x ->
Text -> ServiceNowParameters
ServiceNowParameters'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SiteBaseUrl")
)
instance Prelude.Hashable ServiceNowParameters where
hashWithSalt :: Int -> ServiceNowParameters -> Int
hashWithSalt Int
_salt ServiceNowParameters' {Text
siteBaseUrl :: Text
$sel:siteBaseUrl:ServiceNowParameters' :: ServiceNowParameters -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
siteBaseUrl
instance Prelude.NFData ServiceNowParameters where
rnf :: ServiceNowParameters -> ()
rnf ServiceNowParameters' {Text
siteBaseUrl :: Text
$sel:siteBaseUrl:ServiceNowParameters' :: ServiceNowParameters -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
siteBaseUrl
instance Data.ToJSON ServiceNowParameters where
toJSON :: ServiceNowParameters -> Value
toJSON ServiceNowParameters' {Text
siteBaseUrl :: Text
$sel:siteBaseUrl:ServiceNowParameters' :: ServiceNowParameters -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"SiteBaseUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
siteBaseUrl)]
)