module Stratosphere.Redshift.EndpointAuthorization (
EndpointAuthorization(..), mkEndpointAuthorization
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EndpointAuthorization
=
EndpointAuthorization {EndpointAuthorization -> ()
haddock_workaround_ :: (),
EndpointAuthorization -> Value Text
account :: (Value Prelude.Text),
EndpointAuthorization -> Value Text
clusterIdentifier :: (Value Prelude.Text),
EndpointAuthorization -> Maybe (Value Bool)
force :: (Prelude.Maybe (Value Prelude.Bool)),
EndpointAuthorization -> Maybe (ValueList Text)
vpcIds :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (EndpointAuthorization -> EndpointAuthorization -> Bool
(EndpointAuthorization -> EndpointAuthorization -> Bool)
-> (EndpointAuthorization -> EndpointAuthorization -> Bool)
-> Eq EndpointAuthorization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EndpointAuthorization -> EndpointAuthorization -> Bool
== :: EndpointAuthorization -> EndpointAuthorization -> Bool
$c/= :: EndpointAuthorization -> EndpointAuthorization -> Bool
/= :: EndpointAuthorization -> EndpointAuthorization -> Bool
Prelude.Eq, Int -> EndpointAuthorization -> ShowS
[EndpointAuthorization] -> ShowS
EndpointAuthorization -> String
(Int -> EndpointAuthorization -> ShowS)
-> (EndpointAuthorization -> String)
-> ([EndpointAuthorization] -> ShowS)
-> Show EndpointAuthorization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EndpointAuthorization -> ShowS
showsPrec :: Int -> EndpointAuthorization -> ShowS
$cshow :: EndpointAuthorization -> String
show :: EndpointAuthorization -> String
$cshowList :: [EndpointAuthorization] -> ShowS
showList :: [EndpointAuthorization] -> ShowS
Prelude.Show)
mkEndpointAuthorization ::
Value Prelude.Text -> Value Prelude.Text -> EndpointAuthorization
mkEndpointAuthorization :: Value Text -> Value Text -> EndpointAuthorization
mkEndpointAuthorization Value Text
account Value Text
clusterIdentifier
= EndpointAuthorization
{haddock_workaround_ :: ()
haddock_workaround_ = (), account :: Value Text
account = Value Text
account,
clusterIdentifier :: Value Text
clusterIdentifier = Value Text
clusterIdentifier, force :: Maybe (Value Bool)
force = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
vpcIds :: Maybe (ValueList Text)
vpcIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EndpointAuthorization where
toResourceProperties :: EndpointAuthorization -> ResourceProperties
toResourceProperties EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Redshift::EndpointAuthorization",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Account" 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
account,
Key
"ClusterIdentifier" 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
clusterIdentifier]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Force" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
force,
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..=) Key
"VpcIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
vpcIds]))}
instance JSON.ToJSON EndpointAuthorization where
toJSON :: EndpointAuthorization -> Value
toJSON EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= [(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
"Account" 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
account,
Key
"ClusterIdentifier" 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
clusterIdentifier]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Force" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
force,
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..=) Key
"VpcIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
vpcIds])))
instance Property "Account" EndpointAuthorization where
type PropertyType "Account" EndpointAuthorization = Value Prelude.Text
set :: PropertyType "Account" EndpointAuthorization
-> EndpointAuthorization -> EndpointAuthorization
set PropertyType "Account" EndpointAuthorization
newValue EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= EndpointAuthorization {account :: Value Text
account = PropertyType "Account" EndpointAuthorization
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
instance Property "ClusterIdentifier" EndpointAuthorization where
type PropertyType "ClusterIdentifier" EndpointAuthorization = Value Prelude.Text
set :: PropertyType "ClusterIdentifier" EndpointAuthorization
-> EndpointAuthorization -> EndpointAuthorization
set PropertyType "ClusterIdentifier" EndpointAuthorization
newValue EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= EndpointAuthorization {clusterIdentifier :: Value Text
clusterIdentifier = PropertyType "ClusterIdentifier" EndpointAuthorization
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
account :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
instance Property "Force" EndpointAuthorization where
type PropertyType "Force" EndpointAuthorization = Value Prelude.Bool
set :: PropertyType "Force" EndpointAuthorization
-> EndpointAuthorization -> EndpointAuthorization
set PropertyType "Force" EndpointAuthorization
newValue EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= EndpointAuthorization {force :: Maybe (Value Bool)
force = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Force" EndpointAuthorization
Value Bool
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
vpcIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
vpcIds :: Maybe (ValueList Text)
..}
instance Property "VpcIds" EndpointAuthorization where
type PropertyType "VpcIds" EndpointAuthorization = ValueList Prelude.Text
set :: PropertyType "VpcIds" EndpointAuthorization
-> EndpointAuthorization -> EndpointAuthorization
set PropertyType "VpcIds" EndpointAuthorization
newValue EndpointAuthorization {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EndpointAuthorization -> ()
account :: EndpointAuthorization -> Value Text
clusterIdentifier :: EndpointAuthorization -> Value Text
force :: EndpointAuthorization -> Maybe (Value Bool)
vpcIds :: EndpointAuthorization -> Maybe (ValueList Text)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
vpcIds :: Maybe (ValueList Text)
..}
= EndpointAuthorization {vpcIds :: Maybe (ValueList Text)
vpcIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpcIds" EndpointAuthorization
ValueList Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
haddock_workaround_ :: ()
account :: Value Text
clusterIdentifier :: Value Text
force :: Maybe (Value Bool)
..}