module Stratosphere.VpcLattice.AuthPolicy (
AuthPolicy(..), mkAuthPolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AuthPolicy
=
AuthPolicy {AuthPolicy -> ()
haddock_workaround_ :: (),
AuthPolicy -> Object
policy :: JSON.Object,
AuthPolicy -> Value Text
resourceIdentifier :: (Value Prelude.Text)}
deriving stock (AuthPolicy -> AuthPolicy -> Bool
(AuthPolicy -> AuthPolicy -> Bool)
-> (AuthPolicy -> AuthPolicy -> Bool) -> Eq AuthPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthPolicy -> AuthPolicy -> Bool
== :: AuthPolicy -> AuthPolicy -> Bool
$c/= :: AuthPolicy -> AuthPolicy -> Bool
/= :: AuthPolicy -> AuthPolicy -> Bool
Prelude.Eq, Int -> AuthPolicy -> ShowS
[AuthPolicy] -> ShowS
AuthPolicy -> String
(Int -> AuthPolicy -> ShowS)
-> (AuthPolicy -> String)
-> ([AuthPolicy] -> ShowS)
-> Show AuthPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuthPolicy -> ShowS
showsPrec :: Int -> AuthPolicy -> ShowS
$cshow :: AuthPolicy -> String
show :: AuthPolicy -> String
$cshowList :: [AuthPolicy] -> ShowS
showList :: [AuthPolicy] -> ShowS
Prelude.Show)
mkAuthPolicy :: JSON.Object -> Value Prelude.Text -> AuthPolicy
mkAuthPolicy :: Object -> Value Text -> AuthPolicy
mkAuthPolicy Object
policy Value Text
resourceIdentifier
= AuthPolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (), policy :: Object
policy = Object
policy,
resourceIdentifier :: Value Text
resourceIdentifier = Value Text
resourceIdentifier}
instance ToResourceProperties AuthPolicy where
toResourceProperties :: AuthPolicy -> ResourceProperties
toResourceProperties AuthPolicy {()
Object
Value Text
haddock_workaround_ :: AuthPolicy -> ()
policy :: AuthPolicy -> Object
resourceIdentifier :: AuthPolicy -> Value Text
haddock_workaround_ :: ()
policy :: Object
resourceIdentifier :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::VpcLattice::AuthPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"Policy" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policy,
Key
"ResourceIdentifier" 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
resourceIdentifier]}
instance JSON.ToJSON AuthPolicy where
toJSON :: AuthPolicy -> Value
toJSON AuthPolicy {()
Object
Value Text
haddock_workaround_ :: AuthPolicy -> ()
policy :: AuthPolicy -> Object
resourceIdentifier :: AuthPolicy -> Value Text
haddock_workaround_ :: ()
policy :: Object
resourceIdentifier :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"Policy" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policy,
Key
"ResourceIdentifier" 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
resourceIdentifier]
instance Property "Policy" AuthPolicy where
type PropertyType "Policy" AuthPolicy = JSON.Object
set :: PropertyType "Policy" AuthPolicy -> AuthPolicy -> AuthPolicy
set PropertyType "Policy" AuthPolicy
newValue AuthPolicy {()
Object
Value Text
haddock_workaround_ :: AuthPolicy -> ()
policy :: AuthPolicy -> Object
resourceIdentifier :: AuthPolicy -> Value Text
haddock_workaround_ :: ()
policy :: Object
resourceIdentifier :: Value Text
..} = AuthPolicy {policy :: Object
policy = Object
PropertyType "Policy" AuthPolicy
newValue, ()
Value Text
haddock_workaround_ :: ()
resourceIdentifier :: Value Text
haddock_workaround_ :: ()
resourceIdentifier :: Value Text
..}
instance Property "ResourceIdentifier" AuthPolicy where
type PropertyType "ResourceIdentifier" AuthPolicy = Value Prelude.Text
set :: PropertyType "ResourceIdentifier" AuthPolicy
-> AuthPolicy -> AuthPolicy
set PropertyType "ResourceIdentifier" AuthPolicy
newValue AuthPolicy {()
Object
Value Text
haddock_workaround_ :: AuthPolicy -> ()
policy :: AuthPolicy -> Object
resourceIdentifier :: AuthPolicy -> Value Text
haddock_workaround_ :: ()
policy :: Object
resourceIdentifier :: Value Text
..}
= AuthPolicy {resourceIdentifier :: Value Text
resourceIdentifier = PropertyType "ResourceIdentifier" AuthPolicy
Value Text
newValue, ()
Object
haddock_workaround_ :: ()
policy :: Object
haddock_workaround_ :: ()
policy :: Object
..}