{-# 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.CloudFront.Types.QueryArgProfile 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 QueryArgProfile = QueryArgProfile'
{
QueryArgProfile -> Text
queryArg :: Prelude.Text,
QueryArgProfile -> Text
profileId :: Prelude.Text
}
deriving (QueryArgProfile -> QueryArgProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryArgProfile -> QueryArgProfile -> Bool
$c/= :: QueryArgProfile -> QueryArgProfile -> Bool
== :: QueryArgProfile -> QueryArgProfile -> Bool
$c== :: QueryArgProfile -> QueryArgProfile -> Bool
Prelude.Eq, ReadPrec [QueryArgProfile]
ReadPrec QueryArgProfile
Int -> ReadS QueryArgProfile
ReadS [QueryArgProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueryArgProfile]
$creadListPrec :: ReadPrec [QueryArgProfile]
readPrec :: ReadPrec QueryArgProfile
$creadPrec :: ReadPrec QueryArgProfile
readList :: ReadS [QueryArgProfile]
$creadList :: ReadS [QueryArgProfile]
readsPrec :: Int -> ReadS QueryArgProfile
$creadsPrec :: Int -> ReadS QueryArgProfile
Prelude.Read, Int -> QueryArgProfile -> ShowS
[QueryArgProfile] -> ShowS
QueryArgProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryArgProfile] -> ShowS
$cshowList :: [QueryArgProfile] -> ShowS
show :: QueryArgProfile -> String
$cshow :: QueryArgProfile -> String
showsPrec :: Int -> QueryArgProfile -> ShowS
$cshowsPrec :: Int -> QueryArgProfile -> ShowS
Prelude.Show, forall x. Rep QueryArgProfile x -> QueryArgProfile
forall x. QueryArgProfile -> Rep QueryArgProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QueryArgProfile x -> QueryArgProfile
$cfrom :: forall x. QueryArgProfile -> Rep QueryArgProfile x
Prelude.Generic)
newQueryArgProfile ::
Prelude.Text ->
Prelude.Text ->
QueryArgProfile
newQueryArgProfile :: Text -> Text -> QueryArgProfile
newQueryArgProfile Text
pQueryArg_ Text
pProfileId_ =
QueryArgProfile'
{ $sel:queryArg:QueryArgProfile' :: Text
queryArg = Text
pQueryArg_,
$sel:profileId:QueryArgProfile' :: Text
profileId = Text
pProfileId_
}
queryArgProfile_queryArg :: Lens.Lens' QueryArgProfile Prelude.Text
queryArgProfile_queryArg :: Lens' QueryArgProfile Text
queryArgProfile_queryArg = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryArgProfile' {Text
queryArg :: Text
$sel:queryArg:QueryArgProfile' :: QueryArgProfile -> Text
queryArg} -> Text
queryArg) (\s :: QueryArgProfile
s@QueryArgProfile' {} Text
a -> QueryArgProfile
s {$sel:queryArg:QueryArgProfile' :: Text
queryArg = Text
a} :: QueryArgProfile)
queryArgProfile_profileId :: Lens.Lens' QueryArgProfile Prelude.Text
queryArgProfile_profileId :: Lens' QueryArgProfile Text
queryArgProfile_profileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryArgProfile' {Text
profileId :: Text
$sel:profileId:QueryArgProfile' :: QueryArgProfile -> Text
profileId} -> Text
profileId) (\s :: QueryArgProfile
s@QueryArgProfile' {} Text
a -> QueryArgProfile
s {$sel:profileId:QueryArgProfile' :: Text
profileId = Text
a} :: QueryArgProfile)
instance Data.FromXML QueryArgProfile where
parseXML :: [Node] -> Either String QueryArgProfile
parseXML [Node]
x =
Text -> Text -> QueryArgProfile
QueryArgProfile'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"QueryArg")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"ProfileId")
instance Prelude.Hashable QueryArgProfile where
hashWithSalt :: Int -> QueryArgProfile -> Int
hashWithSalt Int
_salt QueryArgProfile' {Text
profileId :: Text
queryArg :: Text
$sel:profileId:QueryArgProfile' :: QueryArgProfile -> Text
$sel:queryArg:QueryArgProfile' :: QueryArgProfile -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queryArg
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
profileId
instance Prelude.NFData QueryArgProfile where
rnf :: QueryArgProfile -> ()
rnf QueryArgProfile' {Text
profileId :: Text
queryArg :: Text
$sel:profileId:QueryArgProfile' :: QueryArgProfile -> Text
$sel:queryArg:QueryArgProfile' :: QueryArgProfile -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
queryArg
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
profileId
instance Data.ToXML QueryArgProfile where
toXML :: QueryArgProfile -> XML
toXML QueryArgProfile' {Text
profileId :: Text
queryArg :: Text
$sel:profileId:QueryArgProfile' :: QueryArgProfile -> Text
$sel:queryArg:QueryArgProfile' :: QueryArgProfile -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"QueryArg" forall a. ToXML a => Name -> a -> XML
Data.@= Text
queryArg,
Name
"ProfileId" forall a. ToXML a => Name -> a -> XML
Data.@= Text
profileId
]