module Stratosphere.QBusiness.Plugin.PluginAuthConfigurationProperty (
        module Exports, PluginAuthConfigurationProperty(..),
        mkPluginAuthConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.Plugin.BasicAuthConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.QBusiness.Plugin.OAuth2ClientCredentialConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data PluginAuthConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-pluginauthconfiguration.html>
    PluginAuthConfigurationProperty {PluginAuthConfigurationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-pluginauthconfiguration.html#cfn-qbusiness-plugin-pluginauthconfiguration-basicauthconfiguration>
                                     PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
basicAuthConfiguration :: (Prelude.Maybe BasicAuthConfigurationProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-pluginauthconfiguration.html#cfn-qbusiness-plugin-pluginauthconfiguration-noauthconfiguration>
                                     PluginAuthConfigurationProperty -> Maybe Object
noAuthConfiguration :: (Prelude.Maybe JSON.Object),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-pluginauthconfiguration.html#cfn-qbusiness-plugin-pluginauthconfiguration-oauth2clientcredentialconfiguration>
                                     PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
oAuth2ClientCredentialConfiguration :: (Prelude.Maybe OAuth2ClientCredentialConfigurationProperty)}
  deriving stock (PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty -> Bool
(PluginAuthConfigurationProperty
 -> PluginAuthConfigurationProperty -> Bool)
-> (PluginAuthConfigurationProperty
    -> PluginAuthConfigurationProperty -> Bool)
-> Eq PluginAuthConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty -> Bool
== :: PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty -> Bool
$c/= :: PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty -> Bool
/= :: PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty -> Bool
Prelude.Eq, Int -> PluginAuthConfigurationProperty -> ShowS
[PluginAuthConfigurationProperty] -> ShowS
PluginAuthConfigurationProperty -> String
(Int -> PluginAuthConfigurationProperty -> ShowS)
-> (PluginAuthConfigurationProperty -> String)
-> ([PluginAuthConfigurationProperty] -> ShowS)
-> Show PluginAuthConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PluginAuthConfigurationProperty -> ShowS
showsPrec :: Int -> PluginAuthConfigurationProperty -> ShowS
$cshow :: PluginAuthConfigurationProperty -> String
show :: PluginAuthConfigurationProperty -> String
$cshowList :: [PluginAuthConfigurationProperty] -> ShowS
showList :: [PluginAuthConfigurationProperty] -> ShowS
Prelude.Show)
mkPluginAuthConfigurationProperty ::
  PluginAuthConfigurationProperty
mkPluginAuthConfigurationProperty :: PluginAuthConfigurationProperty
mkPluginAuthConfigurationProperty
  = PluginAuthConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
basicAuthConfiguration = Maybe BasicAuthConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       noAuthConfiguration :: Maybe Object
noAuthConfiguration = Maybe Object
forall a. Maybe a
Prelude.Nothing,
       oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
oAuth2ClientCredentialConfiguration = Maybe OAuth2ClientCredentialConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PluginAuthConfigurationProperty where
  toResourceProperties :: PluginAuthConfigurationProperty -> ResourceProperties
toResourceProperties PluginAuthConfigurationProperty {Maybe Object
Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: PluginAuthConfigurationProperty -> ()
basicAuthConfiguration :: PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: PluginAuthConfigurationProperty -> Maybe Object
oAuth2ClientCredentialConfiguration :: PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::Plugin.PluginAuthConfiguration",
         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 -> BasicAuthConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BasicAuthConfiguration"
                              (BasicAuthConfigurationProperty -> (Key, Value))
-> Maybe BasicAuthConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BasicAuthConfigurationProperty
basicAuthConfiguration,
                            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
"NoAuthConfiguration" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
noAuthConfiguration,
                            Key -> OAuth2ClientCredentialConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OAuth2ClientCredentialConfiguration"
                              (OAuth2ClientCredentialConfigurationProperty -> (Key, Value))
-> Maybe OAuth2ClientCredentialConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OAuth2ClientCredentialConfigurationProperty
oAuth2ClientCredentialConfiguration])}
instance JSON.ToJSON PluginAuthConfigurationProperty where
  toJSON :: PluginAuthConfigurationProperty -> Value
toJSON PluginAuthConfigurationProperty {Maybe Object
Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: PluginAuthConfigurationProperty -> ()
basicAuthConfiguration :: PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: PluginAuthConfigurationProperty -> Maybe Object
oAuth2ClientCredentialConfiguration :: PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
    = [(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 -> BasicAuthConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BasicAuthConfiguration"
                 (BasicAuthConfigurationProperty -> (Key, Value))
-> Maybe BasicAuthConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BasicAuthConfigurationProperty
basicAuthConfiguration,
               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
"NoAuthConfiguration" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
noAuthConfiguration,
               Key -> OAuth2ClientCredentialConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OAuth2ClientCredentialConfiguration"
                 (OAuth2ClientCredentialConfigurationProperty -> (Key, Value))
-> Maybe OAuth2ClientCredentialConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OAuth2ClientCredentialConfigurationProperty
oAuth2ClientCredentialConfiguration]))
instance Property "BasicAuthConfiguration" PluginAuthConfigurationProperty where
  type PropertyType "BasicAuthConfiguration" PluginAuthConfigurationProperty = BasicAuthConfigurationProperty
  set :: PropertyType
  "BasicAuthConfiguration" PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
set PropertyType
  "BasicAuthConfiguration" PluginAuthConfigurationProperty
newValue PluginAuthConfigurationProperty {Maybe Object
Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: PluginAuthConfigurationProperty -> ()
basicAuthConfiguration :: PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: PluginAuthConfigurationProperty -> Maybe Object
oAuth2ClientCredentialConfiguration :: PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
    = PluginAuthConfigurationProperty
        {basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
basicAuthConfiguration = BasicAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "BasicAuthConfiguration" PluginAuthConfigurationProperty
BasicAuthConfigurationProperty
newValue, Maybe Object
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: ()
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
instance Property "NoAuthConfiguration" PluginAuthConfigurationProperty where
  type PropertyType "NoAuthConfiguration" PluginAuthConfigurationProperty = JSON.Object
  set :: PropertyType "NoAuthConfiguration" PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
set PropertyType "NoAuthConfiguration" PluginAuthConfigurationProperty
newValue PluginAuthConfigurationProperty {Maybe Object
Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: PluginAuthConfigurationProperty -> ()
basicAuthConfiguration :: PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: PluginAuthConfigurationProperty -> Maybe Object
oAuth2ClientCredentialConfiguration :: PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
    = PluginAuthConfigurationProperty
        {noAuthConfiguration :: Maybe Object
noAuthConfiguration = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "NoAuthConfiguration" PluginAuthConfigurationProperty
newValue, Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
instance Property "OAuth2ClientCredentialConfiguration" PluginAuthConfigurationProperty where
  type PropertyType "OAuth2ClientCredentialConfiguration" PluginAuthConfigurationProperty = OAuth2ClientCredentialConfigurationProperty
  set :: PropertyType
  "OAuth2ClientCredentialConfiguration"
  PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
-> PluginAuthConfigurationProperty
set PropertyType
  "OAuth2ClientCredentialConfiguration"
  PluginAuthConfigurationProperty
newValue PluginAuthConfigurationProperty {Maybe Object
Maybe BasicAuthConfigurationProperty
Maybe OAuth2ClientCredentialConfigurationProperty
()
haddock_workaround_ :: PluginAuthConfigurationProperty -> ()
basicAuthConfiguration :: PluginAuthConfigurationProperty
-> Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: PluginAuthConfigurationProperty -> Maybe Object
oAuth2ClientCredentialConfiguration :: PluginAuthConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
..}
    = PluginAuthConfigurationProperty
        {oAuth2ClientCredentialConfiguration :: Maybe OAuth2ClientCredentialConfigurationProperty
oAuth2ClientCredentialConfiguration = OAuth2ClientCredentialConfigurationProperty
-> Maybe OAuth2ClientCredentialConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "OAuth2ClientCredentialConfiguration"
  PluginAuthConfigurationProperty
OAuth2ClientCredentialConfigurationProperty
newValue, Maybe Object
Maybe BasicAuthConfigurationProperty
()
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
haddock_workaround_ :: ()
basicAuthConfiguration :: Maybe BasicAuthConfigurationProperty
noAuthConfiguration :: Maybe Object
..}