module Stratosphere.DataZone.Connection.RedshiftStoragePropertiesProperty (
RedshiftStoragePropertiesProperty(..),
mkRedshiftStoragePropertiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RedshiftStoragePropertiesProperty
=
RedshiftStoragePropertiesProperty {RedshiftStoragePropertiesProperty -> ()
haddock_workaround_ :: (),
RedshiftStoragePropertiesProperty -> Maybe (Value Text)
clusterName :: (Prelude.Maybe (Value Prelude.Text)),
RedshiftStoragePropertiesProperty -> Maybe (Value Text)
workgroupName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool
(RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool)
-> (RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool)
-> Eq RedshiftStoragePropertiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool
== :: RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool
$c/= :: RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool
/= :: RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty -> Bool
Prelude.Eq, Int -> RedshiftStoragePropertiesProperty -> ShowS
[RedshiftStoragePropertiesProperty] -> ShowS
RedshiftStoragePropertiesProperty -> String
(Int -> RedshiftStoragePropertiesProperty -> ShowS)
-> (RedshiftStoragePropertiesProperty -> String)
-> ([RedshiftStoragePropertiesProperty] -> ShowS)
-> Show RedshiftStoragePropertiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RedshiftStoragePropertiesProperty -> ShowS
showsPrec :: Int -> RedshiftStoragePropertiesProperty -> ShowS
$cshow :: RedshiftStoragePropertiesProperty -> String
show :: RedshiftStoragePropertiesProperty -> String
$cshowList :: [RedshiftStoragePropertiesProperty] -> ShowS
showList :: [RedshiftStoragePropertiesProperty] -> ShowS
Prelude.Show)
mkRedshiftStoragePropertiesProperty ::
RedshiftStoragePropertiesProperty
mkRedshiftStoragePropertiesProperty :: RedshiftStoragePropertiesProperty
mkRedshiftStoragePropertiesProperty
= RedshiftStoragePropertiesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), clusterName :: Maybe (Value Text)
clusterName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
workgroupName :: Maybe (Value Text)
workgroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RedshiftStoragePropertiesProperty where
toResourceProperties :: RedshiftStoragePropertiesProperty -> ResourceProperties
toResourceProperties RedshiftStoragePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: RedshiftStoragePropertiesProperty -> ()
clusterName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
workgroupName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
workgroupName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataZone::Connection.RedshiftStorageProperties",
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
"ClusterName" (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)
clusterName,
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
"WorkgroupName" (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)
workgroupName])}
instance JSON.ToJSON RedshiftStoragePropertiesProperty where
toJSON :: RedshiftStoragePropertiesProperty -> Value
toJSON RedshiftStoragePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: RedshiftStoragePropertiesProperty -> ()
clusterName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
workgroupName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
workgroupName :: 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
"ClusterName" (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)
clusterName,
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
"WorkgroupName" (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)
workgroupName]))
instance Property "ClusterName" RedshiftStoragePropertiesProperty where
type PropertyType "ClusterName" RedshiftStoragePropertiesProperty = Value Prelude.Text
set :: PropertyType "ClusterName" RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty
set PropertyType "ClusterName" RedshiftStoragePropertiesProperty
newValue RedshiftStoragePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: RedshiftStoragePropertiesProperty -> ()
clusterName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
workgroupName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
workgroupName :: Maybe (Value Text)
..}
= RedshiftStoragePropertiesProperty
{clusterName :: Maybe (Value Text)
clusterName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClusterName" RedshiftStoragePropertiesProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
workgroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
workgroupName :: Maybe (Value Text)
..}
instance Property "WorkgroupName" RedshiftStoragePropertiesProperty where
type PropertyType "WorkgroupName" RedshiftStoragePropertiesProperty = Value Prelude.Text
set :: PropertyType "WorkgroupName" RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty
-> RedshiftStoragePropertiesProperty
set PropertyType "WorkgroupName" RedshiftStoragePropertiesProperty
newValue RedshiftStoragePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: RedshiftStoragePropertiesProperty -> ()
clusterName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
workgroupName :: RedshiftStoragePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
workgroupName :: Maybe (Value Text)
..}
= RedshiftStoragePropertiesProperty
{workgroupName :: Maybe (Value Text)
workgroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WorkgroupName" RedshiftStoragePropertiesProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
..}