module Stratosphere.SES.MailManagerRelay.RelayAuthenticationProperty (
        RelayAuthenticationProperty(..), mkRelayAuthenticationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelayAuthenticationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-mailmanagerrelay-relayauthentication.html>
    RelayAuthenticationProperty {RelayAuthenticationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-mailmanagerrelay-relayauthentication.html#cfn-ses-mailmanagerrelay-relayauthentication-noauthentication>
                                 RelayAuthenticationProperty -> Maybe Object
noAuthentication :: (Prelude.Maybe JSON.Object),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-mailmanagerrelay-relayauthentication.html#cfn-ses-mailmanagerrelay-relayauthentication-secretarn>
                                 RelayAuthenticationProperty -> Maybe (Value Text)
secretArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RelayAuthenticationProperty -> RelayAuthenticationProperty -> Bool
(RelayAuthenticationProperty
 -> RelayAuthenticationProperty -> Bool)
-> (RelayAuthenticationProperty
    -> RelayAuthenticationProperty -> Bool)
-> Eq RelayAuthenticationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelayAuthenticationProperty -> RelayAuthenticationProperty -> Bool
== :: RelayAuthenticationProperty -> RelayAuthenticationProperty -> Bool
$c/= :: RelayAuthenticationProperty -> RelayAuthenticationProperty -> Bool
/= :: RelayAuthenticationProperty -> RelayAuthenticationProperty -> Bool
Prelude.Eq, Int -> RelayAuthenticationProperty -> ShowS
[RelayAuthenticationProperty] -> ShowS
RelayAuthenticationProperty -> String
(Int -> RelayAuthenticationProperty -> ShowS)
-> (RelayAuthenticationProperty -> String)
-> ([RelayAuthenticationProperty] -> ShowS)
-> Show RelayAuthenticationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelayAuthenticationProperty -> ShowS
showsPrec :: Int -> RelayAuthenticationProperty -> ShowS
$cshow :: RelayAuthenticationProperty -> String
show :: RelayAuthenticationProperty -> String
$cshowList :: [RelayAuthenticationProperty] -> ShowS
showList :: [RelayAuthenticationProperty] -> ShowS
Prelude.Show)
mkRelayAuthenticationProperty :: RelayAuthenticationProperty
mkRelayAuthenticationProperty :: RelayAuthenticationProperty
mkRelayAuthenticationProperty
  = RelayAuthenticationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), noAuthentication :: Maybe Object
noAuthentication = Maybe Object
forall a. Maybe a
Prelude.Nothing,
       secretArn :: Maybe (Value Text)
secretArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelayAuthenticationProperty where
  toResourceProperties :: RelayAuthenticationProperty -> ResourceProperties
toResourceProperties RelayAuthenticationProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: RelayAuthenticationProperty -> ()
noAuthentication :: RelayAuthenticationProperty -> Maybe Object
secretArn :: RelayAuthenticationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
secretArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::MailManagerRelay.RelayAuthentication",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NoAuthentication" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
noAuthentication,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
secretArn])}
instance JSON.ToJSON RelayAuthenticationProperty where
  toJSON :: RelayAuthenticationProperty -> Value
toJSON RelayAuthenticationProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: RelayAuthenticationProperty -> ()
noAuthentication :: RelayAuthenticationProperty -> Maybe Object
secretArn :: RelayAuthenticationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
secretArn :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NoAuthentication" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
noAuthentication,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
secretArn]))
instance Property "NoAuthentication" RelayAuthenticationProperty where
  type PropertyType "NoAuthentication" RelayAuthenticationProperty = JSON.Object
  set :: PropertyType "NoAuthentication" RelayAuthenticationProperty
-> RelayAuthenticationProperty -> RelayAuthenticationProperty
set PropertyType "NoAuthentication" RelayAuthenticationProperty
newValue RelayAuthenticationProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: RelayAuthenticationProperty -> ()
noAuthentication :: RelayAuthenticationProperty -> Maybe Object
secretArn :: RelayAuthenticationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
secretArn :: Maybe (Value Text)
..}
    = RelayAuthenticationProperty
        {noAuthentication :: Maybe Object
noAuthentication = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "NoAuthentication" RelayAuthenticationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
haddock_workaround_ :: ()
secretArn :: Maybe (Value Text)
..}
instance Property "SecretArn" RelayAuthenticationProperty where
  type PropertyType "SecretArn" RelayAuthenticationProperty = Value Prelude.Text
  set :: PropertyType "SecretArn" RelayAuthenticationProperty
-> RelayAuthenticationProperty -> RelayAuthenticationProperty
set PropertyType "SecretArn" RelayAuthenticationProperty
newValue RelayAuthenticationProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: RelayAuthenticationProperty -> ()
noAuthentication :: RelayAuthenticationProperty -> Maybe Object
secretArn :: RelayAuthenticationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
secretArn :: Maybe (Value Text)
..}
    = RelayAuthenticationProperty
        {secretArn :: Maybe (Value Text)
secretArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecretArn" RelayAuthenticationProperty
Value Text
newValue, Maybe Object
()
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
haddock_workaround_ :: ()
noAuthentication :: Maybe Object
..}