module Stratosphere.ImageBuilder.Image.LatestVersionProperty (
        LatestVersionProperty(..), mkLatestVersionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LatestVersionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-image-latestversion.html>
    LatestVersionProperty {LatestVersionProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-image-latestversion.html#cfn-imagebuilder-image-latestversion-arn>
                           LatestVersionProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-image-latestversion.html#cfn-imagebuilder-image-latestversion-major>
                           LatestVersionProperty -> Maybe (Value Text)
major :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-image-latestversion.html#cfn-imagebuilder-image-latestversion-minor>
                           LatestVersionProperty -> Maybe (Value Text)
minor :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-image-latestversion.html#cfn-imagebuilder-image-latestversion-patch>
                           LatestVersionProperty -> Maybe (Value Text)
patch :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LatestVersionProperty -> LatestVersionProperty -> Bool
(LatestVersionProperty -> LatestVersionProperty -> Bool)
-> (LatestVersionProperty -> LatestVersionProperty -> Bool)
-> Eq LatestVersionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LatestVersionProperty -> LatestVersionProperty -> Bool
== :: LatestVersionProperty -> LatestVersionProperty -> Bool
$c/= :: LatestVersionProperty -> LatestVersionProperty -> Bool
/= :: LatestVersionProperty -> LatestVersionProperty -> Bool
Prelude.Eq, Int -> LatestVersionProperty -> ShowS
[LatestVersionProperty] -> ShowS
LatestVersionProperty -> String
(Int -> LatestVersionProperty -> ShowS)
-> (LatestVersionProperty -> String)
-> ([LatestVersionProperty] -> ShowS)
-> Show LatestVersionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LatestVersionProperty -> ShowS
showsPrec :: Int -> LatestVersionProperty -> ShowS
$cshow :: LatestVersionProperty -> String
show :: LatestVersionProperty -> String
$cshowList :: [LatestVersionProperty] -> ShowS
showList :: [LatestVersionProperty] -> ShowS
Prelude.Show)
mkLatestVersionProperty :: LatestVersionProperty
mkLatestVersionProperty :: LatestVersionProperty
mkLatestVersionProperty
  = LatestVersionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       major :: Maybe (Value Text)
major = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, minor :: Maybe (Value Text)
minor = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       patch :: Maybe (Value Text)
patch = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LatestVersionProperty where
  toResourceProperties :: LatestVersionProperty -> ResourceProperties
toResourceProperties LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ImageBuilder::Image.LatestVersion",
         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
"Arn" (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)
arn,
                            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
"Major" (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)
major,
                            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
"Minor" (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)
minor,
                            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
"Patch" (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)
patch])}
instance JSON.ToJSON LatestVersionProperty where
  toJSON :: LatestVersionProperty -> Value
toJSON LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: 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
"Arn" (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)
arn,
               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
"Major" (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)
major,
               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
"Minor" (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)
minor,
               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
"Patch" (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)
patch]))
instance Property "Arn" LatestVersionProperty where
  type PropertyType "Arn" LatestVersionProperty = Value Prelude.Text
  set :: PropertyType "Arn" LatestVersionProperty
-> LatestVersionProperty -> LatestVersionProperty
set PropertyType "Arn" LatestVersionProperty
newValue LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
    = LatestVersionProperty {arn :: Maybe (Value Text)
arn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Arn" LatestVersionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
haddock_workaround_ :: ()
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
instance Property "Major" LatestVersionProperty where
  type PropertyType "Major" LatestVersionProperty = Value Prelude.Text
  set :: PropertyType "Major" LatestVersionProperty
-> LatestVersionProperty -> LatestVersionProperty
set PropertyType "Major" LatestVersionProperty
newValue LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
    = LatestVersionProperty {major :: Maybe (Value Text)
major = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Major" LatestVersionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
instance Property "Minor" LatestVersionProperty where
  type PropertyType "Minor" LatestVersionProperty = Value Prelude.Text
  set :: PropertyType "Minor" LatestVersionProperty
-> LatestVersionProperty -> LatestVersionProperty
set PropertyType "Minor" LatestVersionProperty
newValue LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
    = LatestVersionProperty {minor :: Maybe (Value Text)
minor = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Minor" LatestVersionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
patch :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
instance Property "Patch" LatestVersionProperty where
  type PropertyType "Patch" LatestVersionProperty = Value Prelude.Text
  set :: PropertyType "Patch" LatestVersionProperty
-> LatestVersionProperty -> LatestVersionProperty
set PropertyType "Patch" LatestVersionProperty
newValue LatestVersionProperty {Maybe (Value Text)
()
haddock_workaround_ :: LatestVersionProperty -> ()
arn :: LatestVersionProperty -> Maybe (Value Text)
major :: LatestVersionProperty -> Maybe (Value Text)
minor :: LatestVersionProperty -> Maybe (Value Text)
patch :: LatestVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
patch :: Maybe (Value Text)
..}
    = LatestVersionProperty {patch :: Maybe (Value Text)
patch = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Patch" LatestVersionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
major :: Maybe (Value Text)
minor :: Maybe (Value Text)
..}