module Stratosphere.CodeArtifact.PackageGroup.RestrictionTypeProperty (
RestrictionTypeProperty(..), mkRestrictionTypeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RestrictionTypeProperty
=
RestrictionTypeProperty {RestrictionTypeProperty -> ()
haddock_workaround_ :: (),
RestrictionTypeProperty -> Maybe (ValueList Text)
repositories :: (Prelude.Maybe (ValueList Prelude.Text)),
RestrictionTypeProperty -> Value Text
restrictionMode :: (Value Prelude.Text)}
deriving stock (RestrictionTypeProperty -> RestrictionTypeProperty -> Bool
(RestrictionTypeProperty -> RestrictionTypeProperty -> Bool)
-> (RestrictionTypeProperty -> RestrictionTypeProperty -> Bool)
-> Eq RestrictionTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RestrictionTypeProperty -> RestrictionTypeProperty -> Bool
== :: RestrictionTypeProperty -> RestrictionTypeProperty -> Bool
$c/= :: RestrictionTypeProperty -> RestrictionTypeProperty -> Bool
/= :: RestrictionTypeProperty -> RestrictionTypeProperty -> Bool
Prelude.Eq, Int -> RestrictionTypeProperty -> ShowS
[RestrictionTypeProperty] -> ShowS
RestrictionTypeProperty -> String
(Int -> RestrictionTypeProperty -> ShowS)
-> (RestrictionTypeProperty -> String)
-> ([RestrictionTypeProperty] -> ShowS)
-> Show RestrictionTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RestrictionTypeProperty -> ShowS
showsPrec :: Int -> RestrictionTypeProperty -> ShowS
$cshow :: RestrictionTypeProperty -> String
show :: RestrictionTypeProperty -> String
$cshowList :: [RestrictionTypeProperty] -> ShowS
showList :: [RestrictionTypeProperty] -> ShowS
Prelude.Show)
mkRestrictionTypeProperty ::
Value Prelude.Text -> RestrictionTypeProperty
mkRestrictionTypeProperty :: Value Text -> RestrictionTypeProperty
mkRestrictionTypeProperty Value Text
restrictionMode
= RestrictionTypeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), restrictionMode :: Value Text
restrictionMode = Value Text
restrictionMode,
repositories :: Maybe (ValueList Text)
repositories = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RestrictionTypeProperty where
toResourceProperties :: RestrictionTypeProperty -> ResourceProperties
toResourceProperties RestrictionTypeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: RestrictionTypeProperty -> ()
repositories :: RestrictionTypeProperty -> Maybe (ValueList Text)
restrictionMode :: RestrictionTypeProperty -> Value Text
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
restrictionMode :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeArtifact::PackageGroup.RestrictionType",
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
"RestrictionMode" 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
restrictionMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Repositories" (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)
repositories]))}
instance JSON.ToJSON RestrictionTypeProperty where
toJSON :: RestrictionTypeProperty -> Value
toJSON RestrictionTypeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: RestrictionTypeProperty -> ()
repositories :: RestrictionTypeProperty -> Maybe (ValueList Text)
restrictionMode :: RestrictionTypeProperty -> Value Text
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
restrictionMode :: Value 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
"RestrictionMode" 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
restrictionMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"Repositories" (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)
repositories])))
instance Property "Repositories" RestrictionTypeProperty where
type PropertyType "Repositories" RestrictionTypeProperty = ValueList Prelude.Text
set :: PropertyType "Repositories" RestrictionTypeProperty
-> RestrictionTypeProperty -> RestrictionTypeProperty
set PropertyType "Repositories" RestrictionTypeProperty
newValue RestrictionTypeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: RestrictionTypeProperty -> ()
repositories :: RestrictionTypeProperty -> Maybe (ValueList Text)
restrictionMode :: RestrictionTypeProperty -> Value Text
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
restrictionMode :: Value Text
..}
= RestrictionTypeProperty
{repositories :: Maybe (ValueList Text)
repositories = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Repositories" RestrictionTypeProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
restrictionMode :: Value Text
haddock_workaround_ :: ()
restrictionMode :: Value Text
..}
instance Property "RestrictionMode" RestrictionTypeProperty where
type PropertyType "RestrictionMode" RestrictionTypeProperty = Value Prelude.Text
set :: PropertyType "RestrictionMode" RestrictionTypeProperty
-> RestrictionTypeProperty -> RestrictionTypeProperty
set PropertyType "RestrictionMode" RestrictionTypeProperty
newValue RestrictionTypeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: RestrictionTypeProperty -> ()
repositories :: RestrictionTypeProperty -> Maybe (ValueList Text)
restrictionMode :: RestrictionTypeProperty -> Value Text
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
restrictionMode :: Value Text
..}
= RestrictionTypeProperty {restrictionMode :: Value Text
restrictionMode = PropertyType "RestrictionMode" RestrictionTypeProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
haddock_workaround_ :: ()
repositories :: Maybe (ValueList Text)
..}