module Stratosphere.WorkSpacesWeb.TrustStore (
        TrustStore(..), mkTrustStore
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data TrustStore
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesweb-truststore.html>
    TrustStore {TrustStore -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesweb-truststore.html#cfn-workspacesweb-truststore-certificatelist>
                TrustStore -> ValueList Text
certificateList :: (ValueList Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesweb-truststore.html#cfn-workspacesweb-truststore-tags>
                TrustStore -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (TrustStore -> TrustStore -> Bool
(TrustStore -> TrustStore -> Bool)
-> (TrustStore -> TrustStore -> Bool) -> Eq TrustStore
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrustStore -> TrustStore -> Bool
== :: TrustStore -> TrustStore -> Bool
$c/= :: TrustStore -> TrustStore -> Bool
/= :: TrustStore -> TrustStore -> Bool
Prelude.Eq, Int -> TrustStore -> ShowS
[TrustStore] -> ShowS
TrustStore -> String
(Int -> TrustStore -> ShowS)
-> (TrustStore -> String)
-> ([TrustStore] -> ShowS)
-> Show TrustStore
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrustStore -> ShowS
showsPrec :: Int -> TrustStore -> ShowS
$cshow :: TrustStore -> String
show :: TrustStore -> String
$cshowList :: [TrustStore] -> ShowS
showList :: [TrustStore] -> ShowS
Prelude.Show)
mkTrustStore :: ValueList Prelude.Text -> TrustStore
mkTrustStore :: ValueList Text -> TrustStore
mkTrustStore ValueList Text
certificateList
  = TrustStore
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateList :: ValueList Text
certificateList = ValueList Text
certificateList,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrustStore where
  toResourceProperties :: TrustStore -> ResourceProperties
toResourceProperties TrustStore {Maybe [Tag]
()
ValueList Text
haddock_workaround_ :: TrustStore -> ()
certificateList :: TrustStore -> ValueList Text
tags :: TrustStore -> Maybe [Tag]
haddock_workaround_ :: ()
certificateList :: ValueList Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkSpacesWeb::TrustStore",
         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
"CertificateList" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
certificateList]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 TrustStore where
  toJSON :: TrustStore -> Value
toJSON TrustStore {Maybe [Tag]
()
ValueList Text
haddock_workaround_ :: TrustStore -> ()
certificateList :: TrustStore -> ValueList Text
tags :: TrustStore -> Maybe [Tag]
haddock_workaround_ :: ()
certificateList :: ValueList 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
"CertificateList" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
certificateList]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 "CertificateList" TrustStore where
  type PropertyType "CertificateList" TrustStore = ValueList Prelude.Text
  set :: PropertyType "CertificateList" TrustStore
-> TrustStore -> TrustStore
set PropertyType "CertificateList" TrustStore
newValue TrustStore {Maybe [Tag]
()
ValueList Text
haddock_workaround_ :: TrustStore -> ()
certificateList :: TrustStore -> ValueList Text
tags :: TrustStore -> Maybe [Tag]
haddock_workaround_ :: ()
certificateList :: ValueList Text
tags :: Maybe [Tag]
..}
    = TrustStore {certificateList :: ValueList Text
certificateList = PropertyType "CertificateList" TrustStore
ValueList Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" TrustStore where
  type PropertyType "Tags" TrustStore = [Tag]
  set :: PropertyType "Tags" TrustStore -> TrustStore -> TrustStore
set PropertyType "Tags" TrustStore
newValue TrustStore {Maybe [Tag]
()
ValueList Text
haddock_workaround_ :: TrustStore -> ()
certificateList :: TrustStore -> ValueList Text
tags :: TrustStore -> Maybe [Tag]
haddock_workaround_ :: ()
certificateList :: ValueList Text
tags :: Maybe [Tag]
..}
    = TrustStore {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" TrustStore
newValue, ()
ValueList Text
haddock_workaround_ :: ()
certificateList :: ValueList Text
haddock_workaround_ :: ()
certificateList :: ValueList Text
..}