module Stratosphere.ECR.RegistryPolicy (
        RegistryPolicy(..), mkRegistryPolicy
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data RegistryPolicy
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-registrypolicy.html>
    RegistryPolicy {RegistryPolicy -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-registrypolicy.html#cfn-ecr-registrypolicy-policytext>
                    RegistryPolicy -> Object
policyText :: JSON.Object}
  deriving stock (RegistryPolicy -> RegistryPolicy -> Bool
(RegistryPolicy -> RegistryPolicy -> Bool)
-> (RegistryPolicy -> RegistryPolicy -> Bool) -> Eq RegistryPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegistryPolicy -> RegistryPolicy -> Bool
== :: RegistryPolicy -> RegistryPolicy -> Bool
$c/= :: RegistryPolicy -> RegistryPolicy -> Bool
/= :: RegistryPolicy -> RegistryPolicy -> Bool
Prelude.Eq, Int -> RegistryPolicy -> ShowS
[RegistryPolicy] -> ShowS
RegistryPolicy -> String
(Int -> RegistryPolicy -> ShowS)
-> (RegistryPolicy -> String)
-> ([RegistryPolicy] -> ShowS)
-> Show RegistryPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegistryPolicy -> ShowS
showsPrec :: Int -> RegistryPolicy -> ShowS
$cshow :: RegistryPolicy -> String
show :: RegistryPolicy -> String
$cshowList :: [RegistryPolicy] -> ShowS
showList :: [RegistryPolicy] -> ShowS
Prelude.Show)
mkRegistryPolicy :: JSON.Object -> RegistryPolicy
mkRegistryPolicy :: Object -> RegistryPolicy
mkRegistryPolicy Object
policyText
  = RegistryPolicy
      {haddock_workaround_ :: ()
haddock_workaround_ = (), policyText :: Object
policyText = Object
policyText}
instance ToResourceProperties RegistryPolicy where
  toResourceProperties :: RegistryPolicy -> ResourceProperties
toResourceProperties RegistryPolicy {()
Object
haddock_workaround_ :: RegistryPolicy -> ()
policyText :: RegistryPolicy -> Object
haddock_workaround_ :: ()
policyText :: Object
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECR::RegistryPolicy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"PolicyText" 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
policyText]}
instance JSON.ToJSON RegistryPolicy where
  toJSON :: RegistryPolicy -> Value
toJSON RegistryPolicy {()
Object
haddock_workaround_ :: RegistryPolicy -> ()
policyText :: RegistryPolicy -> Object
haddock_workaround_ :: ()
policyText :: Object
..}
    = [(Key, Value)] -> Value
JSON.object [Key
"PolicyText" 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
policyText]
instance Property "PolicyText" RegistryPolicy where
  type PropertyType "PolicyText" RegistryPolicy = JSON.Object
  set :: PropertyType "PolicyText" RegistryPolicy
-> RegistryPolicy -> RegistryPolicy
set PropertyType "PolicyText" RegistryPolicy
newValue RegistryPolicy {()
Object
haddock_workaround_ :: RegistryPolicy -> ()
policyText :: RegistryPolicy -> Object
haddock_workaround_ :: ()
policyText :: Object
..}
    = RegistryPolicy {policyText :: Object
policyText = Object
PropertyType "PolicyText" RegistryPolicy
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}