module Stratosphere.ImageBuilder.DistributionConfiguration.ContainerDistributionConfigurationProperty (
        module Exports, ContainerDistributionConfigurationProperty(..),
        mkContainerDistributionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ImageBuilder.DistributionConfiguration.TargetContainerRepositoryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ContainerDistributionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-containerdistributionconfiguration.html>
    ContainerDistributionConfigurationProperty {ContainerDistributionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-containerdistributionconfiguration.html#cfn-imagebuilder-distributionconfiguration-containerdistributionconfiguration-containertags>
                                                ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
containerTags :: (Prelude.Maybe (ValueList Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-containerdistributionconfiguration.html#cfn-imagebuilder-distributionconfiguration-containerdistributionconfiguration-description>
                                                ContainerDistributionConfigurationProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-containerdistributionconfiguration.html#cfn-imagebuilder-distributionconfiguration-containerdistributionconfiguration-targetrepository>
                                                ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
targetRepository :: (Prelude.Maybe TargetContainerRepositoryProperty)}
  deriving stock (ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty -> Bool
(ContainerDistributionConfigurationProperty
 -> ContainerDistributionConfigurationProperty -> Bool)
-> (ContainerDistributionConfigurationProperty
    -> ContainerDistributionConfigurationProperty -> Bool)
-> Eq ContainerDistributionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty -> Bool
== :: ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty -> Bool
$c/= :: ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty -> Bool
/= :: ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty -> Bool
Prelude.Eq, Int -> ContainerDistributionConfigurationProperty -> ShowS
[ContainerDistributionConfigurationProperty] -> ShowS
ContainerDistributionConfigurationProperty -> String
(Int -> ContainerDistributionConfigurationProperty -> ShowS)
-> (ContainerDistributionConfigurationProperty -> String)
-> ([ContainerDistributionConfigurationProperty] -> ShowS)
-> Show ContainerDistributionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContainerDistributionConfigurationProperty -> ShowS
showsPrec :: Int -> ContainerDistributionConfigurationProperty -> ShowS
$cshow :: ContainerDistributionConfigurationProperty -> String
show :: ContainerDistributionConfigurationProperty -> String
$cshowList :: [ContainerDistributionConfigurationProperty] -> ShowS
showList :: [ContainerDistributionConfigurationProperty] -> ShowS
Prelude.Show)
mkContainerDistributionConfigurationProperty ::
  ContainerDistributionConfigurationProperty
mkContainerDistributionConfigurationProperty :: ContainerDistributionConfigurationProperty
mkContainerDistributionConfigurationProperty
  = ContainerDistributionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), containerTags :: Maybe (ValueList Text)
containerTags = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, targetRepository :: Maybe TargetContainerRepositoryProperty
targetRepository = Maybe TargetContainerRepositoryProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContainerDistributionConfigurationProperty where
  toResourceProperties :: ContainerDistributionConfigurationProperty -> ResourceProperties
toResourceProperties
    ContainerDistributionConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ContainerDistributionConfigurationProperty -> ()
containerTags :: ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
description :: ContainerDistributionConfigurationProperty -> Maybe (Value Text)
targetRepository :: ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ImageBuilder::DistributionConfiguration.ContainerDistributionConfiguration",
         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 -> 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
"ContainerTags" (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)
containerTags,
                            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
"Description" (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)
description,
                            Key -> TargetContainerRepositoryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetRepository" (TargetContainerRepositoryProperty -> (Key, Value))
-> Maybe TargetContainerRepositoryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetContainerRepositoryProperty
targetRepository])}
instance JSON.ToJSON ContainerDistributionConfigurationProperty where
  toJSON :: ContainerDistributionConfigurationProperty -> Value
toJSON ContainerDistributionConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ContainerDistributionConfigurationProperty -> ()
containerTags :: ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
description :: ContainerDistributionConfigurationProperty -> Maybe (Value Text)
targetRepository :: ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
    = [(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 -> 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
"ContainerTags" (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)
containerTags,
               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
"Description" (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)
description,
               Key -> TargetContainerRepositoryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetRepository" (TargetContainerRepositoryProperty -> (Key, Value))
-> Maybe TargetContainerRepositoryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetContainerRepositoryProperty
targetRepository]))
instance Property "ContainerTags" ContainerDistributionConfigurationProperty where
  type PropertyType "ContainerTags" ContainerDistributionConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "ContainerTags" ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
set PropertyType
  "ContainerTags" ContainerDistributionConfigurationProperty
newValue ContainerDistributionConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ContainerDistributionConfigurationProperty -> ()
containerTags :: ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
description :: ContainerDistributionConfigurationProperty -> Maybe (Value Text)
targetRepository :: ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
    = ContainerDistributionConfigurationProperty
        {containerTags :: Maybe (ValueList Text)
containerTags = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ContainerTags" ContainerDistributionConfigurationProperty
ValueList Text
newValue, Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
instance Property "Description" ContainerDistributionConfigurationProperty where
  type PropertyType "Description" ContainerDistributionConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "Description" ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
set PropertyType
  "Description" ContainerDistributionConfigurationProperty
newValue ContainerDistributionConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ContainerDistributionConfigurationProperty -> ()
containerTags :: ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
description :: ContainerDistributionConfigurationProperty -> Maybe (Value Text)
targetRepository :: ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
    = ContainerDistributionConfigurationProperty
        {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "Description" ContainerDistributionConfigurationProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
instance Property "TargetRepository" ContainerDistributionConfigurationProperty where
  type PropertyType "TargetRepository" ContainerDistributionConfigurationProperty = TargetContainerRepositoryProperty
  set :: PropertyType
  "TargetRepository" ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
-> ContainerDistributionConfigurationProperty
set PropertyType
  "TargetRepository" ContainerDistributionConfigurationProperty
newValue ContainerDistributionConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe TargetContainerRepositoryProperty
()
haddock_workaround_ :: ContainerDistributionConfigurationProperty -> ()
containerTags :: ContainerDistributionConfigurationProperty
-> Maybe (ValueList Text)
description :: ContainerDistributionConfigurationProperty -> Maybe (Value Text)
targetRepository :: ContainerDistributionConfigurationProperty
-> Maybe TargetContainerRepositoryProperty
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
targetRepository :: Maybe TargetContainerRepositoryProperty
..}
    = ContainerDistributionConfigurationProperty
        {targetRepository :: Maybe TargetContainerRepositoryProperty
targetRepository = TargetContainerRepositoryProperty
-> Maybe TargetContainerRepositoryProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TargetRepository" ContainerDistributionConfigurationProperty
TargetContainerRepositoryProperty
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
haddock_workaround_ :: ()
containerTags :: Maybe (ValueList Text)
description :: Maybe (Value Text)
..}