module Stratosphere.ECR.Repository.LifecyclePolicyProperty (
LifecyclePolicyProperty(..), mkLifecyclePolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LifecyclePolicyProperty
=
LifecyclePolicyProperty {LifecyclePolicyProperty -> ()
haddock_workaround_ :: (),
LifecyclePolicyProperty -> Maybe (Value Text)
lifecyclePolicyText :: (Prelude.Maybe (Value Prelude.Text)),
LifecyclePolicyProperty -> Maybe (Value Text)
registryId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
(LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool)
-> (LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool)
-> Eq LifecyclePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
== :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
$c/= :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
/= :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
Prelude.Eq, Int -> LifecyclePolicyProperty -> ShowS
[LifecyclePolicyProperty] -> ShowS
LifecyclePolicyProperty -> String
(Int -> LifecyclePolicyProperty -> ShowS)
-> (LifecyclePolicyProperty -> String)
-> ([LifecyclePolicyProperty] -> ShowS)
-> Show LifecyclePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LifecyclePolicyProperty -> ShowS
showsPrec :: Int -> LifecyclePolicyProperty -> ShowS
$cshow :: LifecyclePolicyProperty -> String
show :: LifecyclePolicyProperty -> String
$cshowList :: [LifecyclePolicyProperty] -> ShowS
showList :: [LifecyclePolicyProperty] -> ShowS
Prelude.Show)
mkLifecyclePolicyProperty :: LifecyclePolicyProperty
mkLifecyclePolicyProperty :: LifecyclePolicyProperty
mkLifecyclePolicyProperty
= LifecyclePolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), lifecyclePolicyText :: Maybe (Value Text)
lifecyclePolicyText = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
registryId :: Maybe (Value Text)
registryId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecyclePolicyProperty where
toResourceProperties :: LifecyclePolicyProperty -> ResourceProperties
toResourceProperties LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
lifecyclePolicyText :: LifecyclePolicyProperty -> Maybe (Value Text)
registryId :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
registryId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ECR::Repository.LifecyclePolicy",
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
"LifecyclePolicyText" (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)
lifecyclePolicyText,
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
"RegistryId" (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)
registryId])}
instance JSON.ToJSON LifecyclePolicyProperty where
toJSON :: LifecyclePolicyProperty -> Value
toJSON LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
lifecyclePolicyText :: LifecyclePolicyProperty -> Maybe (Value Text)
registryId :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
registryId :: 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
"LifecyclePolicyText" (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)
lifecyclePolicyText,
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
"RegistryId" (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)
registryId]))
instance Property "LifecyclePolicyText" LifecyclePolicyProperty where
type PropertyType "LifecyclePolicyText" LifecyclePolicyProperty = Value Prelude.Text
set :: PropertyType "LifecyclePolicyText" LifecyclePolicyProperty
-> LifecyclePolicyProperty -> LifecyclePolicyProperty
set PropertyType "LifecyclePolicyText" LifecyclePolicyProperty
newValue LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
lifecyclePolicyText :: LifecyclePolicyProperty -> Maybe (Value Text)
registryId :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
registryId :: Maybe (Value Text)
..}
= LifecyclePolicyProperty
{lifecyclePolicyText :: Maybe (Value Text)
lifecyclePolicyText = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LifecyclePolicyText" LifecyclePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
registryId :: Maybe (Value Text)
haddock_workaround_ :: ()
registryId :: Maybe (Value Text)
..}
instance Property "RegistryId" LifecyclePolicyProperty where
type PropertyType "RegistryId" LifecyclePolicyProperty = Value Prelude.Text
set :: PropertyType "RegistryId" LifecyclePolicyProperty
-> LifecyclePolicyProperty -> LifecyclePolicyProperty
set PropertyType "RegistryId" LifecyclePolicyProperty
newValue LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
lifecyclePolicyText :: LifecyclePolicyProperty -> Maybe (Value Text)
registryId :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
registryId :: Maybe (Value Text)
..}
= LifecyclePolicyProperty {registryId :: Maybe (Value Text)
registryId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RegistryId" LifecyclePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
haddock_workaround_ :: ()
lifecyclePolicyText :: Maybe (Value Text)
..}