module Stratosphere.QBusiness.DataAccessor (
        module Exports, DataAccessor(..), mkDataAccessor
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.DataAccessor.ActionConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.QBusiness.DataAccessor.DataAccessorAuthenticationDetailProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data DataAccessor
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html>
    DataAccessor {DataAccessor -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-actionconfigurations>
                  DataAccessor -> [ActionConfigurationProperty]
actionConfigurations :: [ActionConfigurationProperty],
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-applicationid>
                  DataAccessor -> Value Text
applicationId :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-authenticationdetail>
                  DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
authenticationDetail :: (Prelude.Maybe DataAccessorAuthenticationDetailProperty),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-displayname>
                  DataAccessor -> Value Text
displayName :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-principal>
                  DataAccessor -> Value Text
principal :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-dataaccessor.html#cfn-qbusiness-dataaccessor-tags>
                  DataAccessor -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (DataAccessor -> DataAccessor -> Bool
(DataAccessor -> DataAccessor -> Bool)
-> (DataAccessor -> DataAccessor -> Bool) -> Eq DataAccessor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataAccessor -> DataAccessor -> Bool
== :: DataAccessor -> DataAccessor -> Bool
$c/= :: DataAccessor -> DataAccessor -> Bool
/= :: DataAccessor -> DataAccessor -> Bool
Prelude.Eq, Int -> DataAccessor -> ShowS
[DataAccessor] -> ShowS
DataAccessor -> String
(Int -> DataAccessor -> ShowS)
-> (DataAccessor -> String)
-> ([DataAccessor] -> ShowS)
-> Show DataAccessor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataAccessor -> ShowS
showsPrec :: Int -> DataAccessor -> ShowS
$cshow :: DataAccessor -> String
show :: DataAccessor -> String
$cshowList :: [DataAccessor] -> ShowS
showList :: [DataAccessor] -> ShowS
Prelude.Show)
mkDataAccessor ::
  [ActionConfigurationProperty]
  -> Value Prelude.Text
     -> Value Prelude.Text -> Value Prelude.Text -> DataAccessor
mkDataAccessor :: [ActionConfigurationProperty]
-> Value Text -> Value Text -> Value Text -> DataAccessor
mkDataAccessor
  [ActionConfigurationProperty]
actionConfigurations
  Value Text
applicationId
  Value Text
displayName
  Value Text
principal
  = DataAccessor
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       actionConfigurations :: [ActionConfigurationProperty]
actionConfigurations = [ActionConfigurationProperty]
actionConfigurations,
       applicationId :: Value Text
applicationId = Value Text
applicationId, displayName :: Value Text
displayName = Value Text
displayName,
       principal :: Value Text
principal = Value Text
principal, authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
authenticationDetail = Maybe DataAccessorAuthenticationDetailProperty
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataAccessor where
  toResourceProperties :: DataAccessor -> ResourceProperties
toResourceProperties DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::DataAccessor",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"ActionConfigurations" Key -> [ActionConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ActionConfigurationProperty]
actionConfigurations,
                            Key
"ApplicationId" 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..= Value Text
applicationId,
                            Key
"DisplayName" 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..= Value Text
displayName, Key
"Principal" 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..= Value Text
principal]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DataAccessorAuthenticationDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuthenticationDetail" (DataAccessorAuthenticationDetailProperty -> (Key, Value))
-> Maybe DataAccessorAuthenticationDetailProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataAccessorAuthenticationDetailProperty
authenticationDetail,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON DataAccessor where
  toJSON :: DataAccessor -> Value
toJSON DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"ActionConfigurations" Key -> [ActionConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ActionConfigurationProperty]
actionConfigurations,
               Key
"ApplicationId" 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..= Value Text
applicationId,
               Key
"DisplayName" 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..= Value Text
displayName, Key
"Principal" 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..= Value Text
principal]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DataAccessorAuthenticationDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuthenticationDetail" (DataAccessorAuthenticationDetailProperty -> (Key, Value))
-> Maybe DataAccessorAuthenticationDetailProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataAccessorAuthenticationDetailProperty
authenticationDetail,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ActionConfigurations" DataAccessor where
  type PropertyType "ActionConfigurations" DataAccessor = [ActionConfigurationProperty]
  set :: PropertyType "ActionConfigurations" DataAccessor
-> DataAccessor -> DataAccessor
set PropertyType "ActionConfigurations" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {actionConfigurations :: [ActionConfigurationProperty]
actionConfigurations = [ActionConfigurationProperty]
PropertyType "ActionConfigurations" DataAccessor
newValue, Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ApplicationId" DataAccessor where
  type PropertyType "ApplicationId" DataAccessor = Value Prelude.Text
  set :: PropertyType "ApplicationId" DataAccessor
-> DataAccessor -> DataAccessor
set PropertyType "ApplicationId" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" DataAccessor
Value Text
newValue, [ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
instance Property "AuthenticationDetail" DataAccessor where
  type PropertyType "AuthenticationDetail" DataAccessor = DataAccessorAuthenticationDetailProperty
  set :: PropertyType "AuthenticationDetail" DataAccessor
-> DataAccessor -> DataAccessor
set PropertyType "AuthenticationDetail" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
authenticationDetail = DataAccessorAuthenticationDetailProperty
-> Maybe DataAccessorAuthenticationDetailProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AuthenticationDetail" DataAccessor
DataAccessorAuthenticationDetailProperty
newValue, [ActionConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
instance Property "DisplayName" DataAccessor where
  type PropertyType "DisplayName" DataAccessor = Value Prelude.Text
  set :: PropertyType "DisplayName" DataAccessor
-> DataAccessor -> DataAccessor
set PropertyType "DisplayName" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {displayName :: Value Text
displayName = PropertyType "DisplayName" DataAccessor
Value Text
newValue, [ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
principal :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
principal :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Principal" DataAccessor where
  type PropertyType "Principal" DataAccessor = Value Prelude.Text
  set :: PropertyType "Principal" DataAccessor
-> DataAccessor -> DataAccessor
set PropertyType "Principal" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {principal :: Value Text
principal = PropertyType "Principal" DataAccessor
Value Text
newValue, [ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" DataAccessor where
  type PropertyType "Tags" DataAccessor = [Tag]
  set :: PropertyType "Tags" DataAccessor -> DataAccessor -> DataAccessor
set PropertyType "Tags" DataAccessor
newValue DataAccessor {[ActionConfigurationProperty]
Maybe [Tag]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: DataAccessor -> ()
actionConfigurations :: DataAccessor -> [ActionConfigurationProperty]
applicationId :: DataAccessor -> Value Text
authenticationDetail :: DataAccessor -> Maybe DataAccessorAuthenticationDetailProperty
displayName :: DataAccessor -> Value Text
principal :: DataAccessor -> Value Text
tags :: DataAccessor -> Maybe [Tag]
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
tags :: Maybe [Tag]
..}
    = DataAccessor {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" DataAccessor
newValue, [ActionConfigurationProperty]
Maybe DataAccessorAuthenticationDetailProperty
()
Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
haddock_workaround_ :: ()
actionConfigurations :: [ActionConfigurationProperty]
applicationId :: Value Text
authenticationDetail :: Maybe DataAccessorAuthenticationDetailProperty
displayName :: Value Text
principal :: Value Text
..}