module Stratosphere.Lightsail.Container.EcrImagePullerRoleProperty (
        EcrImagePullerRoleProperty(..), mkEcrImagePullerRoleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EcrImagePullerRoleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.html>
    EcrImagePullerRoleProperty {EcrImagePullerRoleProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.html#cfn-lightsail-container-ecrimagepullerrole-isactive>
                                EcrImagePullerRoleProperty -> Maybe (Value Bool)
isActive :: (Prelude.Maybe (Value Prelude.Bool)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.html#cfn-lightsail-container-ecrimagepullerrole-principalarn>
                                EcrImagePullerRoleProperty -> Maybe (Value Text)
principalArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool
(EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool)
-> (EcrImagePullerRoleProperty
    -> EcrImagePullerRoleProperty -> Bool)
-> Eq EcrImagePullerRoleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool
== :: EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool
$c/= :: EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool
/= :: EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty -> Bool
Prelude.Eq, Int -> EcrImagePullerRoleProperty -> ShowS
[EcrImagePullerRoleProperty] -> ShowS
EcrImagePullerRoleProperty -> String
(Int -> EcrImagePullerRoleProperty -> ShowS)
-> (EcrImagePullerRoleProperty -> String)
-> ([EcrImagePullerRoleProperty] -> ShowS)
-> Show EcrImagePullerRoleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EcrImagePullerRoleProperty -> ShowS
showsPrec :: Int -> EcrImagePullerRoleProperty -> ShowS
$cshow :: EcrImagePullerRoleProperty -> String
show :: EcrImagePullerRoleProperty -> String
$cshowList :: [EcrImagePullerRoleProperty] -> ShowS
showList :: [EcrImagePullerRoleProperty] -> ShowS
Prelude.Show)
mkEcrImagePullerRoleProperty :: EcrImagePullerRoleProperty
mkEcrImagePullerRoleProperty :: EcrImagePullerRoleProperty
mkEcrImagePullerRoleProperty
  = EcrImagePullerRoleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), isActive :: Maybe (Value Bool)
isActive = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       principalArn :: Maybe (Value Text)
principalArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EcrImagePullerRoleProperty where
  toResourceProperties :: EcrImagePullerRoleProperty -> ResourceProperties
toResourceProperties EcrImagePullerRoleProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EcrImagePullerRoleProperty -> ()
isActive :: EcrImagePullerRoleProperty -> Maybe (Value Bool)
principalArn :: EcrImagePullerRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
principalArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Container.EcrImagePullerRole",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsActive" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isActive,
                            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
"PrincipalArn" (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)
principalArn])}
instance JSON.ToJSON EcrImagePullerRoleProperty where
  toJSON :: EcrImagePullerRoleProperty -> Value
toJSON EcrImagePullerRoleProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EcrImagePullerRoleProperty -> ()
isActive :: EcrImagePullerRoleProperty -> Maybe (Value Bool)
principalArn :: EcrImagePullerRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
principalArn :: 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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsActive" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isActive,
               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
"PrincipalArn" (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)
principalArn]))
instance Property "IsActive" EcrImagePullerRoleProperty where
  type PropertyType "IsActive" EcrImagePullerRoleProperty = Value Prelude.Bool
  set :: PropertyType "IsActive" EcrImagePullerRoleProperty
-> EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty
set PropertyType "IsActive" EcrImagePullerRoleProperty
newValue EcrImagePullerRoleProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EcrImagePullerRoleProperty -> ()
isActive :: EcrImagePullerRoleProperty -> Maybe (Value Bool)
principalArn :: EcrImagePullerRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
principalArn :: Maybe (Value Text)
..}
    = EcrImagePullerRoleProperty {isActive :: Maybe (Value Bool)
isActive = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IsActive" EcrImagePullerRoleProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
principalArn :: Maybe (Value Text)
haddock_workaround_ :: ()
principalArn :: Maybe (Value Text)
..}
instance Property "PrincipalArn" EcrImagePullerRoleProperty where
  type PropertyType "PrincipalArn" EcrImagePullerRoleProperty = Value Prelude.Text
  set :: PropertyType "PrincipalArn" EcrImagePullerRoleProperty
-> EcrImagePullerRoleProperty -> EcrImagePullerRoleProperty
set PropertyType "PrincipalArn" EcrImagePullerRoleProperty
newValue EcrImagePullerRoleProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EcrImagePullerRoleProperty -> ()
isActive :: EcrImagePullerRoleProperty -> Maybe (Value Bool)
principalArn :: EcrImagePullerRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
principalArn :: Maybe (Value Text)
..}
    = EcrImagePullerRoleProperty
        {principalArn :: Maybe (Value Text)
principalArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrincipalArn" EcrImagePullerRoleProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
haddock_workaround_ :: ()
isActive :: Maybe (Value Bool)
..}