module Stratosphere.Grafana.Workspace.IdpMetadataProperty (
        IdpMetadataProperty(..), mkIdpMetadataProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IdpMetadataProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-grafana-workspace-idpmetadata.html>
    IdpMetadataProperty {IdpMetadataProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-grafana-workspace-idpmetadata.html#cfn-grafana-workspace-idpmetadata-url>
                         IdpMetadataProperty -> Maybe (Value Text)
url :: (Prelude.Maybe (Value Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-grafana-workspace-idpmetadata.html#cfn-grafana-workspace-idpmetadata-xml>
                         IdpMetadataProperty -> Maybe (Value Text)
xml :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (IdpMetadataProperty -> IdpMetadataProperty -> Bool
(IdpMetadataProperty -> IdpMetadataProperty -> Bool)
-> (IdpMetadataProperty -> IdpMetadataProperty -> Bool)
-> Eq IdpMetadataProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IdpMetadataProperty -> IdpMetadataProperty -> Bool
== :: IdpMetadataProperty -> IdpMetadataProperty -> Bool
$c/= :: IdpMetadataProperty -> IdpMetadataProperty -> Bool
/= :: IdpMetadataProperty -> IdpMetadataProperty -> Bool
Prelude.Eq, Int -> IdpMetadataProperty -> ShowS
[IdpMetadataProperty] -> ShowS
IdpMetadataProperty -> String
(Int -> IdpMetadataProperty -> ShowS)
-> (IdpMetadataProperty -> String)
-> ([IdpMetadataProperty] -> ShowS)
-> Show IdpMetadataProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IdpMetadataProperty -> ShowS
showsPrec :: Int -> IdpMetadataProperty -> ShowS
$cshow :: IdpMetadataProperty -> String
show :: IdpMetadataProperty -> String
$cshowList :: [IdpMetadataProperty] -> ShowS
showList :: [IdpMetadataProperty] -> ShowS
Prelude.Show)
mkIdpMetadataProperty :: IdpMetadataProperty
mkIdpMetadataProperty :: IdpMetadataProperty
mkIdpMetadataProperty
  = IdpMetadataProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), url :: Maybe (Value Text)
url = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       xml :: Maybe (Value Text)
xml = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IdpMetadataProperty where
  toResourceProperties :: IdpMetadataProperty -> ResourceProperties
toResourceProperties IdpMetadataProperty {Maybe (Value Text)
()
haddock_workaround_ :: IdpMetadataProperty -> ()
url :: IdpMetadataProperty -> Maybe (Value Text)
xml :: IdpMetadataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
url :: Maybe (Value Text)
xml :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Grafana::Workspace.IdpMetadata",
         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 -> 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
"Url" (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)
url,
                            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
"Xml" (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)
xml])}
instance JSON.ToJSON IdpMetadataProperty where
  toJSON :: IdpMetadataProperty -> Value
toJSON IdpMetadataProperty {Maybe (Value Text)
()
haddock_workaround_ :: IdpMetadataProperty -> ()
url :: IdpMetadataProperty -> Maybe (Value Text)
xml :: IdpMetadataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
url :: Maybe (Value Text)
xml :: 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 -> 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
"Url" (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)
url,
               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
"Xml" (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)
xml]))
instance Property "Url" IdpMetadataProperty where
  type PropertyType "Url" IdpMetadataProperty = Value Prelude.Text
  set :: PropertyType "Url" IdpMetadataProperty
-> IdpMetadataProperty -> IdpMetadataProperty
set PropertyType "Url" IdpMetadataProperty
newValue IdpMetadataProperty {Maybe (Value Text)
()
haddock_workaround_ :: IdpMetadataProperty -> ()
url :: IdpMetadataProperty -> Maybe (Value Text)
xml :: IdpMetadataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
url :: Maybe (Value Text)
xml :: Maybe (Value Text)
..}
    = IdpMetadataProperty {url :: Maybe (Value Text)
url = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Url" IdpMetadataProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
xml :: Maybe (Value Text)
haddock_workaround_ :: ()
xml :: Maybe (Value Text)
..}
instance Property "Xml" IdpMetadataProperty where
  type PropertyType "Xml" IdpMetadataProperty = Value Prelude.Text
  set :: PropertyType "Xml" IdpMetadataProperty
-> IdpMetadataProperty -> IdpMetadataProperty
set PropertyType "Xml" IdpMetadataProperty
newValue IdpMetadataProperty {Maybe (Value Text)
()
haddock_workaround_ :: IdpMetadataProperty -> ()
url :: IdpMetadataProperty -> Maybe (Value Text)
xml :: IdpMetadataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
url :: Maybe (Value Text)
xml :: Maybe (Value Text)
..}
    = IdpMetadataProperty {xml :: Maybe (Value Text)
xml = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Xml" IdpMetadataProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
url :: Maybe (Value Text)
haddock_workaround_ :: ()
url :: Maybe (Value Text)
..}