module Stratosphere.OpsWorks.Stack.SourceProperty (
        SourceProperty(..), mkSourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html>
    SourceProperty {SourceProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-password>
                    SourceProperty -> Maybe (Value Text)
password :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-revision>
                    SourceProperty -> Maybe (Value Text)
revision :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-sshkey>
                    SourceProperty -> Maybe (Value Text)
sshKey :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-type>
                    SourceProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-url>
                    SourceProperty -> Maybe (Value Text)
url :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html#cfn-opsworks-custcookbooksource-username>
                    SourceProperty -> Maybe (Value Text)
username :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SourceProperty -> SourceProperty -> Bool
(SourceProperty -> SourceProperty -> Bool)
-> (SourceProperty -> SourceProperty -> Bool) -> Eq SourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceProperty -> SourceProperty -> Bool
== :: SourceProperty -> SourceProperty -> Bool
$c/= :: SourceProperty -> SourceProperty -> Bool
/= :: SourceProperty -> SourceProperty -> Bool
Prelude.Eq, Int -> SourceProperty -> ShowS
[SourceProperty] -> ShowS
SourceProperty -> String
(Int -> SourceProperty -> ShowS)
-> (SourceProperty -> String)
-> ([SourceProperty] -> ShowS)
-> Show SourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceProperty -> ShowS
showsPrec :: Int -> SourceProperty -> ShowS
$cshow :: SourceProperty -> String
show :: SourceProperty -> String
$cshowList :: [SourceProperty] -> ShowS
showList :: [SourceProperty] -> ShowS
Prelude.Show)
mkSourceProperty :: SourceProperty
mkSourceProperty :: SourceProperty
mkSourceProperty
  = SourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), password :: Maybe (Value Text)
password = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       revision :: Maybe (Value Text)
revision = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sshKey :: Maybe (Value Text)
sshKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, url :: Maybe (Value Text)
url = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       username :: Maybe (Value Text)
username = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceProperty where
  toResourceProperties :: SourceProperty -> ResourceProperties
toResourceProperties SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpsWorks::Stack.Source",
         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
"Password" (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)
password,
                            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
"Revision" (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)
revision,
                            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
"SshKey" (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)
sshKey,
                            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
"Type" (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)
type',
                            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
"Username" (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)
username])}
instance JSON.ToJSON SourceProperty where
  toJSON :: SourceProperty -> Value
toJSON SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: 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
"Password" (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)
password,
               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
"Revision" (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)
revision,
               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
"SshKey" (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)
sshKey,
               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
"Type" (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)
type',
               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
"Username" (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)
username]))
instance Property "Password" SourceProperty where
  type PropertyType "Password" SourceProperty = Value Prelude.Text
  set :: PropertyType "Password" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "Password" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {password :: Maybe (Value Text)
password = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Password" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Revision" SourceProperty where
  type PropertyType "Revision" SourceProperty = Value Prelude.Text
  set :: PropertyType "Revision" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "Revision" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {revision :: Maybe (Value Text)
revision = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Revision" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "SshKey" SourceProperty where
  type PropertyType "SshKey" SourceProperty = Value Prelude.Text
  set :: PropertyType "SshKey" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "SshKey" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {sshKey :: Maybe (Value Text)
sshKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SshKey" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Type" SourceProperty where
  type PropertyType "Type" SourceProperty = Value Prelude.Text
  set :: PropertyType "Type" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "Type" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Url" SourceProperty where
  type PropertyType "Url" SourceProperty = Value Prelude.Text
  set :: PropertyType "Url" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "Url" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {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" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Username" SourceProperty where
  type PropertyType "Username" SourceProperty = Value Prelude.Text
  set :: PropertyType "Username" SourceProperty
-> SourceProperty -> SourceProperty
set PropertyType "Username" SourceProperty
newValue SourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceProperty -> ()
password :: SourceProperty -> Maybe (Value Text)
revision :: SourceProperty -> Maybe (Value Text)
sshKey :: SourceProperty -> Maybe (Value Text)
type' :: SourceProperty -> Maybe (Value Text)
url :: SourceProperty -> Maybe (Value Text)
username :: SourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = SourceProperty {username :: Maybe (Value Text)
username = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Username" SourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
revision :: Maybe (Value Text)
sshKey :: Maybe (Value Text)
type' :: Maybe (Value Text)
url :: Maybe (Value Text)
..}