{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ElasticBeanstalk.Types.ApplicationVersionDescriptionMessage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ElasticBeanstalk.Types.ApplicationVersionDescriptionMessage where

import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types.ApplicationVersionDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Result message wrapping a single description of an application version.
--
-- /See:/ 'newApplicationVersionDescriptionMessage' smart constructor.
data ApplicationVersionDescriptionMessage = ApplicationVersionDescriptionMessage'
  { -- | The ApplicationVersionDescription of the application version.
    ApplicationVersionDescriptionMessage
-> Maybe ApplicationVersionDescription
applicationVersion :: Prelude.Maybe ApplicationVersionDescription
  }
  deriving (ApplicationVersionDescriptionMessage
-> ApplicationVersionDescriptionMessage -> Bool
(ApplicationVersionDescriptionMessage
 -> ApplicationVersionDescriptionMessage -> Bool)
-> (ApplicationVersionDescriptionMessage
    -> ApplicationVersionDescriptionMessage -> Bool)
-> Eq ApplicationVersionDescriptionMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationVersionDescriptionMessage
-> ApplicationVersionDescriptionMessage -> Bool
$c/= :: ApplicationVersionDescriptionMessage
-> ApplicationVersionDescriptionMessage -> Bool
== :: ApplicationVersionDescriptionMessage
-> ApplicationVersionDescriptionMessage -> Bool
$c== :: ApplicationVersionDescriptionMessage
-> ApplicationVersionDescriptionMessage -> Bool
Prelude.Eq, ReadPrec [ApplicationVersionDescriptionMessage]
ReadPrec ApplicationVersionDescriptionMessage
Int -> ReadS ApplicationVersionDescriptionMessage
ReadS [ApplicationVersionDescriptionMessage]
(Int -> ReadS ApplicationVersionDescriptionMessage)
-> ReadS [ApplicationVersionDescriptionMessage]
-> ReadPrec ApplicationVersionDescriptionMessage
-> ReadPrec [ApplicationVersionDescriptionMessage]
-> Read ApplicationVersionDescriptionMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationVersionDescriptionMessage]
$creadListPrec :: ReadPrec [ApplicationVersionDescriptionMessage]
readPrec :: ReadPrec ApplicationVersionDescriptionMessage
$creadPrec :: ReadPrec ApplicationVersionDescriptionMessage
readList :: ReadS [ApplicationVersionDescriptionMessage]
$creadList :: ReadS [ApplicationVersionDescriptionMessage]
readsPrec :: Int -> ReadS ApplicationVersionDescriptionMessage
$creadsPrec :: Int -> ReadS ApplicationVersionDescriptionMessage
Prelude.Read, Int -> ApplicationVersionDescriptionMessage -> ShowS
[ApplicationVersionDescriptionMessage] -> ShowS
ApplicationVersionDescriptionMessage -> String
(Int -> ApplicationVersionDescriptionMessage -> ShowS)
-> (ApplicationVersionDescriptionMessage -> String)
-> ([ApplicationVersionDescriptionMessage] -> ShowS)
-> Show ApplicationVersionDescriptionMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationVersionDescriptionMessage] -> ShowS
$cshowList :: [ApplicationVersionDescriptionMessage] -> ShowS
show :: ApplicationVersionDescriptionMessage -> String
$cshow :: ApplicationVersionDescriptionMessage -> String
showsPrec :: Int -> ApplicationVersionDescriptionMessage -> ShowS
$cshowsPrec :: Int -> ApplicationVersionDescriptionMessage -> ShowS
Prelude.Show, (forall x.
 ApplicationVersionDescriptionMessage
 -> Rep ApplicationVersionDescriptionMessage x)
-> (forall x.
    Rep ApplicationVersionDescriptionMessage x
    -> ApplicationVersionDescriptionMessage)
-> Generic ApplicationVersionDescriptionMessage
forall x.
Rep ApplicationVersionDescriptionMessage x
-> ApplicationVersionDescriptionMessage
forall x.
ApplicationVersionDescriptionMessage
-> Rep ApplicationVersionDescriptionMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationVersionDescriptionMessage x
-> ApplicationVersionDescriptionMessage
$cfrom :: forall x.
ApplicationVersionDescriptionMessage
-> Rep ApplicationVersionDescriptionMessage x
Prelude.Generic)

-- |
-- Create a value of 'ApplicationVersionDescriptionMessage' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'applicationVersion', 'applicationVersionDescriptionMessage_applicationVersion' - The ApplicationVersionDescription of the application version.
newApplicationVersionDescriptionMessage ::
  ApplicationVersionDescriptionMessage
newApplicationVersionDescriptionMessage :: ApplicationVersionDescriptionMessage
newApplicationVersionDescriptionMessage =
  ApplicationVersionDescriptionMessage' :: Maybe ApplicationVersionDescription
-> ApplicationVersionDescriptionMessage
ApplicationVersionDescriptionMessage'
    { $sel:applicationVersion:ApplicationVersionDescriptionMessage' :: Maybe ApplicationVersionDescription
applicationVersion =
        Maybe ApplicationVersionDescription
forall a. Maybe a
Prelude.Nothing
    }

-- | The ApplicationVersionDescription of the application version.
applicationVersionDescriptionMessage_applicationVersion :: Lens.Lens' ApplicationVersionDescriptionMessage (Prelude.Maybe ApplicationVersionDescription)
applicationVersionDescriptionMessage_applicationVersion :: (Maybe ApplicationVersionDescription
 -> f (Maybe ApplicationVersionDescription))
-> ApplicationVersionDescriptionMessage
-> f ApplicationVersionDescriptionMessage
applicationVersionDescriptionMessage_applicationVersion = (ApplicationVersionDescriptionMessage
 -> Maybe ApplicationVersionDescription)
-> (ApplicationVersionDescriptionMessage
    -> Maybe ApplicationVersionDescription
    -> ApplicationVersionDescriptionMessage)
-> Lens
     ApplicationVersionDescriptionMessage
     ApplicationVersionDescriptionMessage
     (Maybe ApplicationVersionDescription)
     (Maybe ApplicationVersionDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationVersionDescriptionMessage' {Maybe ApplicationVersionDescription
applicationVersion :: Maybe ApplicationVersionDescription
$sel:applicationVersion:ApplicationVersionDescriptionMessage' :: ApplicationVersionDescriptionMessage
-> Maybe ApplicationVersionDescription
applicationVersion} -> Maybe ApplicationVersionDescription
applicationVersion) (\s :: ApplicationVersionDescriptionMessage
s@ApplicationVersionDescriptionMessage' {} Maybe ApplicationVersionDescription
a -> ApplicationVersionDescriptionMessage
s {$sel:applicationVersion:ApplicationVersionDescriptionMessage' :: Maybe ApplicationVersionDescription
applicationVersion = Maybe ApplicationVersionDescription
a} :: ApplicationVersionDescriptionMessage)

instance
  Core.FromXML
    ApplicationVersionDescriptionMessage
  where
  parseXML :: [Node] -> Either String ApplicationVersionDescriptionMessage
parseXML [Node]
x =
    Maybe ApplicationVersionDescription
-> ApplicationVersionDescriptionMessage
ApplicationVersionDescriptionMessage'
      (Maybe ApplicationVersionDescription
 -> ApplicationVersionDescriptionMessage)
-> Either String (Maybe ApplicationVersionDescription)
-> Either String ApplicationVersionDescriptionMessage
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe ApplicationVersionDescription)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ApplicationVersion")

instance
  Prelude.Hashable
    ApplicationVersionDescriptionMessage

instance
  Prelude.NFData
    ApplicationVersionDescriptionMessage