module Stratosphere.CodeArtifact.PackageGroup.RestrictionsProperty (
module Exports, RestrictionsProperty(..), mkRestrictionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeArtifact.PackageGroup.RestrictionTypeProperty as Exports
import Stratosphere.ResourceProperties
data RestrictionsProperty
=
RestrictionsProperty {RestrictionsProperty -> ()
haddock_workaround_ :: (),
RestrictionsProperty -> Maybe RestrictionTypeProperty
externalUpstream :: (Prelude.Maybe RestrictionTypeProperty),
RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: (Prelude.Maybe RestrictionTypeProperty),
RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: (Prelude.Maybe RestrictionTypeProperty)}
deriving stock (RestrictionsProperty -> RestrictionsProperty -> Bool
(RestrictionsProperty -> RestrictionsProperty -> Bool)
-> (RestrictionsProperty -> RestrictionsProperty -> Bool)
-> Eq RestrictionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RestrictionsProperty -> RestrictionsProperty -> Bool
== :: RestrictionsProperty -> RestrictionsProperty -> Bool
$c/= :: RestrictionsProperty -> RestrictionsProperty -> Bool
/= :: RestrictionsProperty -> RestrictionsProperty -> Bool
Prelude.Eq, Int -> RestrictionsProperty -> ShowS
[RestrictionsProperty] -> ShowS
RestrictionsProperty -> String
(Int -> RestrictionsProperty -> ShowS)
-> (RestrictionsProperty -> String)
-> ([RestrictionsProperty] -> ShowS)
-> Show RestrictionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RestrictionsProperty -> ShowS
showsPrec :: Int -> RestrictionsProperty -> ShowS
$cshow :: RestrictionsProperty -> String
show :: RestrictionsProperty -> String
$cshowList :: [RestrictionsProperty] -> ShowS
showList :: [RestrictionsProperty] -> ShowS
Prelude.Show)
mkRestrictionsProperty :: RestrictionsProperty
mkRestrictionsProperty :: RestrictionsProperty
mkRestrictionsProperty
= RestrictionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), externalUpstream :: Maybe RestrictionTypeProperty
externalUpstream = Maybe RestrictionTypeProperty
forall a. Maybe a
Prelude.Nothing,
internalUpstream :: Maybe RestrictionTypeProperty
internalUpstream = Maybe RestrictionTypeProperty
forall a. Maybe a
Prelude.Nothing, publish :: Maybe RestrictionTypeProperty
publish = Maybe RestrictionTypeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RestrictionsProperty where
toResourceProperties :: RestrictionsProperty -> ResourceProperties
toResourceProperties RestrictionsProperty {Maybe RestrictionTypeProperty
()
haddock_workaround_ :: RestrictionsProperty -> ()
externalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: RestrictionsProperty -> Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeArtifact::PackageGroup.Restrictions",
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 -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ExternalUpstream" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
externalUpstream,
Key -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InternalUpstream" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
internalUpstream,
Key -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Publish" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
publish])}
instance JSON.ToJSON RestrictionsProperty where
toJSON :: RestrictionsProperty -> Value
toJSON RestrictionsProperty {Maybe RestrictionTypeProperty
()
haddock_workaround_ :: RestrictionsProperty -> ()
externalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: RestrictionsProperty -> Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
= [(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 -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ExternalUpstream" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
externalUpstream,
Key -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InternalUpstream" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
internalUpstream,
Key -> RestrictionTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Publish" (RestrictionTypeProperty -> (Key, Value))
-> Maybe RestrictionTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RestrictionTypeProperty
publish]))
instance Property "ExternalUpstream" RestrictionsProperty where
type PropertyType "ExternalUpstream" RestrictionsProperty = RestrictionTypeProperty
set :: PropertyType "ExternalUpstream" RestrictionsProperty
-> RestrictionsProperty -> RestrictionsProperty
set PropertyType "ExternalUpstream" RestrictionsProperty
newValue RestrictionsProperty {Maybe RestrictionTypeProperty
()
haddock_workaround_ :: RestrictionsProperty -> ()
externalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: RestrictionsProperty -> Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
= RestrictionsProperty
{externalUpstream :: Maybe RestrictionTypeProperty
externalUpstream = RestrictionTypeProperty -> Maybe RestrictionTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExternalUpstream" RestrictionsProperty
RestrictionTypeProperty
newValue, Maybe RestrictionTypeProperty
()
haddock_workaround_ :: ()
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
instance Property "InternalUpstream" RestrictionsProperty where
type PropertyType "InternalUpstream" RestrictionsProperty = RestrictionTypeProperty
set :: PropertyType "InternalUpstream" RestrictionsProperty
-> RestrictionsProperty -> RestrictionsProperty
set PropertyType "InternalUpstream" RestrictionsProperty
newValue RestrictionsProperty {Maybe RestrictionTypeProperty
()
haddock_workaround_ :: RestrictionsProperty -> ()
externalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: RestrictionsProperty -> Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
= RestrictionsProperty
{internalUpstream :: Maybe RestrictionTypeProperty
internalUpstream = RestrictionTypeProperty -> Maybe RestrictionTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InternalUpstream" RestrictionsProperty
RestrictionTypeProperty
newValue, Maybe RestrictionTypeProperty
()
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
instance Property "Publish" RestrictionsProperty where
type PropertyType "Publish" RestrictionsProperty = RestrictionTypeProperty
set :: PropertyType "Publish" RestrictionsProperty
-> RestrictionsProperty -> RestrictionsProperty
set PropertyType "Publish" RestrictionsProperty
newValue RestrictionsProperty {Maybe RestrictionTypeProperty
()
haddock_workaround_ :: RestrictionsProperty -> ()
externalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
internalUpstream :: RestrictionsProperty -> Maybe RestrictionTypeProperty
publish :: RestrictionsProperty -> Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
publish :: Maybe RestrictionTypeProperty
..}
= RestrictionsProperty {publish :: Maybe RestrictionTypeProperty
publish = RestrictionTypeProperty -> Maybe RestrictionTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Publish" RestrictionsProperty
RestrictionTypeProperty
newValue, Maybe RestrictionTypeProperty
()
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
haddock_workaround_ :: ()
externalUpstream :: Maybe RestrictionTypeProperty
internalUpstream :: Maybe RestrictionTypeProperty
..}