{-# 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.STS.Types.PolicyDescriptorType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyDescriptorType = PolicyDescriptorType'
{
PolicyDescriptorType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
}
deriving (PolicyDescriptorType -> PolicyDescriptorType -> Bool
(PolicyDescriptorType -> PolicyDescriptorType -> Bool)
-> (PolicyDescriptorType -> PolicyDescriptorType -> Bool)
-> Eq PolicyDescriptorType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyDescriptorType -> PolicyDescriptorType -> Bool
$c/= :: PolicyDescriptorType -> PolicyDescriptorType -> Bool
== :: PolicyDescriptorType -> PolicyDescriptorType -> Bool
$c== :: PolicyDescriptorType -> PolicyDescriptorType -> Bool
Prelude.Eq, ReadPrec [PolicyDescriptorType]
ReadPrec PolicyDescriptorType
Int -> ReadS PolicyDescriptorType
ReadS [PolicyDescriptorType]
(Int -> ReadS PolicyDescriptorType)
-> ReadS [PolicyDescriptorType]
-> ReadPrec PolicyDescriptorType
-> ReadPrec [PolicyDescriptorType]
-> Read PolicyDescriptorType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyDescriptorType]
$creadListPrec :: ReadPrec [PolicyDescriptorType]
readPrec :: ReadPrec PolicyDescriptorType
$creadPrec :: ReadPrec PolicyDescriptorType
readList :: ReadS [PolicyDescriptorType]
$creadList :: ReadS [PolicyDescriptorType]
readsPrec :: Int -> ReadS PolicyDescriptorType
$creadsPrec :: Int -> ReadS PolicyDescriptorType
Prelude.Read, Int -> PolicyDescriptorType -> ShowS
[PolicyDescriptorType] -> ShowS
PolicyDescriptorType -> String
(Int -> PolicyDescriptorType -> ShowS)
-> (PolicyDescriptorType -> String)
-> ([PolicyDescriptorType] -> ShowS)
-> Show PolicyDescriptorType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyDescriptorType] -> ShowS
$cshowList :: [PolicyDescriptorType] -> ShowS
show :: PolicyDescriptorType -> String
$cshow :: PolicyDescriptorType -> String
showsPrec :: Int -> PolicyDescriptorType -> ShowS
$cshowsPrec :: Int -> PolicyDescriptorType -> ShowS
Prelude.Show, (forall x. PolicyDescriptorType -> Rep PolicyDescriptorType x)
-> (forall x. Rep PolicyDescriptorType x -> PolicyDescriptorType)
-> Generic PolicyDescriptorType
forall x. Rep PolicyDescriptorType x -> PolicyDescriptorType
forall x. PolicyDescriptorType -> Rep PolicyDescriptorType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyDescriptorType x -> PolicyDescriptorType
$cfrom :: forall x. PolicyDescriptorType -> Rep PolicyDescriptorType x
Prelude.Generic)
newPolicyDescriptorType ::
PolicyDescriptorType
newPolicyDescriptorType :: PolicyDescriptorType
newPolicyDescriptorType =
PolicyDescriptorType' :: Maybe Text -> PolicyDescriptorType
PolicyDescriptorType' {$sel:arn:PolicyDescriptorType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing}
policyDescriptorType_arn :: Lens.Lens' PolicyDescriptorType (Prelude.Maybe Prelude.Text)
policyDescriptorType_arn :: (Maybe Text -> f (Maybe Text))
-> PolicyDescriptorType -> f PolicyDescriptorType
policyDescriptorType_arn = (PolicyDescriptorType -> Maybe Text)
-> (PolicyDescriptorType -> Maybe Text -> PolicyDescriptorType)
-> Lens
PolicyDescriptorType PolicyDescriptorType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyDescriptorType' {Maybe Text
arn :: Maybe Text
$sel:arn:PolicyDescriptorType' :: PolicyDescriptorType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: PolicyDescriptorType
s@PolicyDescriptorType' {} Maybe Text
a -> PolicyDescriptorType
s {$sel:arn:PolicyDescriptorType' :: Maybe Text
arn = Maybe Text
a} :: PolicyDescriptorType)
instance Prelude.Hashable PolicyDescriptorType
instance Prelude.NFData PolicyDescriptorType
instance Core.ToQuery PolicyDescriptorType where
toQuery :: PolicyDescriptorType -> QueryString
toQuery PolicyDescriptorType' {Maybe Text
arn :: Maybe Text
$sel:arn:PolicyDescriptorType' :: PolicyDescriptorType -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"arn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
arn]