module Stratosphere.ImageBuilder.DistributionConfiguration.TargetContainerRepositoryProperty (
        TargetContainerRepositoryProperty(..),
        mkTargetContainerRepositoryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetContainerRepositoryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-targetcontainerrepository.html>
    TargetContainerRepositoryProperty {TargetContainerRepositoryProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-targetcontainerrepository.html#cfn-imagebuilder-distributionconfiguration-targetcontainerrepository-repositoryname>
                                       TargetContainerRepositoryProperty -> Maybe (Value Text)
repositoryName :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-distributionconfiguration-targetcontainerrepository.html#cfn-imagebuilder-distributionconfiguration-targetcontainerrepository-service>
                                       TargetContainerRepositoryProperty -> Maybe (Value Text)
service :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty -> Bool
(TargetContainerRepositoryProperty
 -> TargetContainerRepositoryProperty -> Bool)
-> (TargetContainerRepositoryProperty
    -> TargetContainerRepositoryProperty -> Bool)
-> Eq TargetContainerRepositoryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty -> Bool
== :: TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty -> Bool
$c/= :: TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty -> Bool
/= :: TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty -> Bool
Prelude.Eq, Int -> TargetContainerRepositoryProperty -> ShowS
[TargetContainerRepositoryProperty] -> ShowS
TargetContainerRepositoryProperty -> String
(Int -> TargetContainerRepositoryProperty -> ShowS)
-> (TargetContainerRepositoryProperty -> String)
-> ([TargetContainerRepositoryProperty] -> ShowS)
-> Show TargetContainerRepositoryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetContainerRepositoryProperty -> ShowS
showsPrec :: Int -> TargetContainerRepositoryProperty -> ShowS
$cshow :: TargetContainerRepositoryProperty -> String
show :: TargetContainerRepositoryProperty -> String
$cshowList :: [TargetContainerRepositoryProperty] -> ShowS
showList :: [TargetContainerRepositoryProperty] -> ShowS
Prelude.Show)
mkTargetContainerRepositoryProperty ::
  TargetContainerRepositoryProperty
mkTargetContainerRepositoryProperty :: TargetContainerRepositoryProperty
mkTargetContainerRepositoryProperty
  = TargetContainerRepositoryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), repositoryName :: Maybe (Value Text)
repositoryName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       service :: Maybe (Value Text)
service = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetContainerRepositoryProperty where
  toResourceProperties :: TargetContainerRepositoryProperty -> ResourceProperties
toResourceProperties TargetContainerRepositoryProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetContainerRepositoryProperty -> ()
repositoryName :: TargetContainerRepositoryProperty -> Maybe (Value Text)
service :: TargetContainerRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
service :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ImageBuilder::DistributionConfiguration.TargetContainerRepository",
         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
"RepositoryName" (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)
repositoryName,
                            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
"Service" (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)
service])}
instance JSON.ToJSON TargetContainerRepositoryProperty where
  toJSON :: TargetContainerRepositoryProperty -> Value
toJSON TargetContainerRepositoryProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetContainerRepositoryProperty -> ()
repositoryName :: TargetContainerRepositoryProperty -> Maybe (Value Text)
service :: TargetContainerRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
service :: 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
"RepositoryName" (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)
repositoryName,
               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
"Service" (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)
service]))
instance Property "RepositoryName" TargetContainerRepositoryProperty where
  type PropertyType "RepositoryName" TargetContainerRepositoryProperty = Value Prelude.Text
  set :: PropertyType "RepositoryName" TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty
set PropertyType "RepositoryName" TargetContainerRepositoryProperty
newValue TargetContainerRepositoryProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetContainerRepositoryProperty -> ()
repositoryName :: TargetContainerRepositoryProperty -> Maybe (Value Text)
service :: TargetContainerRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
service :: Maybe (Value Text)
..}
    = TargetContainerRepositoryProperty
        {repositoryName :: Maybe (Value Text)
repositoryName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RepositoryName" TargetContainerRepositoryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
service :: Maybe (Value Text)
haddock_workaround_ :: ()
service :: Maybe (Value Text)
..}
instance Property "Service" TargetContainerRepositoryProperty where
  type PropertyType "Service" TargetContainerRepositoryProperty = Value Prelude.Text
  set :: PropertyType "Service" TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty
-> TargetContainerRepositoryProperty
set PropertyType "Service" TargetContainerRepositoryProperty
newValue TargetContainerRepositoryProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetContainerRepositoryProperty -> ()
repositoryName :: TargetContainerRepositoryProperty -> Maybe (Value Text)
service :: TargetContainerRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
service :: Maybe (Value Text)
..}
    = TargetContainerRepositoryProperty
        {service :: Maybe (Value Text)
service = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Service" TargetContainerRepositoryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
haddock_workaround_ :: ()
repositoryName :: Maybe (Value Text)
..}