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

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

-- |
-- Module      : Amazonka.ServerlessApplicationRepository.UpdateApplication
-- 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)
--
-- Updates the specified application.
module Amazonka.ServerlessApplicationRepository.UpdateApplication
  ( -- * Creating a Request
    UpdateApplication (..),
    newUpdateApplication,

    -- * Request Lenses
    updateApplication_homePageUrl,
    updateApplication_readmeBody,
    updateApplication_readmeUrl,
    updateApplication_author,
    updateApplication_labels,
    updateApplication_description,
    updateApplication_applicationId,

    -- * Destructuring the Response
    UpdateApplicationResponse (..),
    newUpdateApplicationResponse,

    -- * Response Lenses
    updateApplicationResponse_creationTime,
    updateApplicationResponse_homePageUrl,
    updateApplicationResponse_licenseUrl,
    updateApplicationResponse_readmeUrl,
    updateApplicationResponse_applicationId,
    updateApplicationResponse_name,
    updateApplicationResponse_version,
    updateApplicationResponse_author,
    updateApplicationResponse_labels,
    updateApplicationResponse_verifiedAuthorUrl,
    updateApplicationResponse_description,
    updateApplicationResponse_spdxLicenseId,
    updateApplicationResponse_isVerifiedAuthor,
    updateApplicationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServerlessApplicationRepository.Types

-- | /See:/ 'newUpdateApplication' smart constructor.
data UpdateApplication = UpdateApplication'
  { -- | A URL with more information about the application, for example the
    -- location of your GitHub repository for the application.
    UpdateApplication -> Maybe Text
homePageUrl :: Prelude.Maybe Prelude.Text,
    -- | A text readme file in Markdown language that contains a more detailed
    -- description of the application and how it works.
    --
    -- Maximum size 5 MB
    UpdateApplication -> Maybe Text
readmeBody :: Prelude.Maybe Prelude.Text,
    -- | A link to the readme file in Markdown language that contains a more
    -- detailed description of the application and how it works.
    --
    -- Maximum size 5 MB
    UpdateApplication -> Maybe Text
readmeUrl :: Prelude.Maybe Prelude.Text,
    -- | The name of the author publishing the app.
    --
    -- Minimum length=1. Maximum length=127.
    --
    -- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
    UpdateApplication -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
    -- | Labels to improve discovery of apps in search results.
    --
    -- Minimum length=1. Maximum length=127. Maximum number of labels: 10
    --
    -- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
    UpdateApplication -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
    -- | The description of the application.
    --
    -- Minimum length=1. Maximum length=256
    UpdateApplication -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the application.
    UpdateApplication -> Text
applicationId :: Prelude.Text
  }
  deriving (UpdateApplication -> UpdateApplication -> Bool
(UpdateApplication -> UpdateApplication -> Bool)
-> (UpdateApplication -> UpdateApplication -> Bool)
-> Eq UpdateApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplication -> UpdateApplication -> Bool
$c/= :: UpdateApplication -> UpdateApplication -> Bool
== :: UpdateApplication -> UpdateApplication -> Bool
$c== :: UpdateApplication -> UpdateApplication -> Bool
Prelude.Eq, ReadPrec [UpdateApplication]
ReadPrec UpdateApplication
Int -> ReadS UpdateApplication
ReadS [UpdateApplication]
(Int -> ReadS UpdateApplication)
-> ReadS [UpdateApplication]
-> ReadPrec UpdateApplication
-> ReadPrec [UpdateApplication]
-> Read UpdateApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplication]
$creadListPrec :: ReadPrec [UpdateApplication]
readPrec :: ReadPrec UpdateApplication
$creadPrec :: ReadPrec UpdateApplication
readList :: ReadS [UpdateApplication]
$creadList :: ReadS [UpdateApplication]
readsPrec :: Int -> ReadS UpdateApplication
$creadsPrec :: Int -> ReadS UpdateApplication
Prelude.Read, Int -> UpdateApplication -> ShowS
[UpdateApplication] -> ShowS
UpdateApplication -> String
(Int -> UpdateApplication -> ShowS)
-> (UpdateApplication -> String)
-> ([UpdateApplication] -> ShowS)
-> Show UpdateApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplication] -> ShowS
$cshowList :: [UpdateApplication] -> ShowS
show :: UpdateApplication -> String
$cshow :: UpdateApplication -> String
showsPrec :: Int -> UpdateApplication -> ShowS
$cshowsPrec :: Int -> UpdateApplication -> ShowS
Prelude.Show, (forall x. UpdateApplication -> Rep UpdateApplication x)
-> (forall x. Rep UpdateApplication x -> UpdateApplication)
-> Generic UpdateApplication
forall x. Rep UpdateApplication x -> UpdateApplication
forall x. UpdateApplication -> Rep UpdateApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateApplication x -> UpdateApplication
$cfrom :: forall x. UpdateApplication -> Rep UpdateApplication x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplication' 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:
--
-- 'homePageUrl', 'updateApplication_homePageUrl' - A URL with more information about the application, for example the
-- location of your GitHub repository for the application.
--
-- 'readmeBody', 'updateApplication_readmeBody' - A text readme file in Markdown language that contains a more detailed
-- description of the application and how it works.
--
-- Maximum size 5 MB
--
-- 'readmeUrl', 'updateApplication_readmeUrl' - A link to the readme file in Markdown language that contains a more
-- detailed description of the application and how it works.
--
-- Maximum size 5 MB
--
-- 'author', 'updateApplication_author' - The name of the author publishing the app.
--
-- Minimum length=1. Maximum length=127.
--
-- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
--
-- 'labels', 'updateApplication_labels' - Labels to improve discovery of apps in search results.
--
-- Minimum length=1. Maximum length=127. Maximum number of labels: 10
--
-- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
--
-- 'description', 'updateApplication_description' - The description of the application.
--
-- Minimum length=1. Maximum length=256
--
-- 'applicationId', 'updateApplication_applicationId' - The Amazon Resource Name (ARN) of the application.
newUpdateApplication ::
  -- | 'applicationId'
  Prelude.Text ->
  UpdateApplication
newUpdateApplication :: Text -> UpdateApplication
newUpdateApplication Text
pApplicationId_ =
  UpdateApplication' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> UpdateApplication
UpdateApplication'
    { $sel:homePageUrl:UpdateApplication' :: Maybe Text
homePageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:readmeBody:UpdateApplication' :: Maybe Text
readmeBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:readmeUrl:UpdateApplication' :: Maybe Text
readmeUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:author:UpdateApplication' :: Maybe Text
author = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:UpdateApplication' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateApplication' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:UpdateApplication' :: Text
applicationId = Text
pApplicationId_
    }

-- | A URL with more information about the application, for example the
-- location of your GitHub repository for the application.
updateApplication_homePageUrl :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_homePageUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_homePageUrl = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
homePageUrl :: Maybe Text
$sel:homePageUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
homePageUrl} -> Maybe Text
homePageUrl) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:homePageUrl:UpdateApplication' :: Maybe Text
homePageUrl = Maybe Text
a} :: UpdateApplication)

-- | A text readme file in Markdown language that contains a more detailed
-- description of the application and how it works.
--
-- Maximum size 5 MB
updateApplication_readmeBody :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_readmeBody :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_readmeBody = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
readmeBody :: Maybe Text
$sel:readmeBody:UpdateApplication' :: UpdateApplication -> Maybe Text
readmeBody} -> Maybe Text
readmeBody) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:readmeBody:UpdateApplication' :: Maybe Text
readmeBody = Maybe Text
a} :: UpdateApplication)

-- | A link to the readme file in Markdown language that contains a more
-- detailed description of the application and how it works.
--
-- Maximum size 5 MB
updateApplication_readmeUrl :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_readmeUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_readmeUrl = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
readmeUrl :: Maybe Text
$sel:readmeUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
readmeUrl} -> Maybe Text
readmeUrl) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:readmeUrl:UpdateApplication' :: Maybe Text
readmeUrl = Maybe Text
a} :: UpdateApplication)

-- | The name of the author publishing the app.
--
-- Minimum length=1. Maximum length=127.
--
-- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
updateApplication_author :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_author :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_author = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
author :: Maybe Text
$sel:author:UpdateApplication' :: UpdateApplication -> Maybe Text
author} -> Maybe Text
author) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:author:UpdateApplication' :: Maybe Text
author = Maybe Text
a} :: UpdateApplication)

-- | Labels to improve discovery of apps in search results.
--
-- Minimum length=1. Maximum length=127. Maximum number of labels: 10
--
-- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
updateApplication_labels :: Lens.Lens' UpdateApplication (Prelude.Maybe [Prelude.Text])
updateApplication_labels :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateApplication -> f UpdateApplication
updateApplication_labels = (UpdateApplication -> Maybe [Text])
-> (UpdateApplication -> Maybe [Text] -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:UpdateApplication' :: UpdateApplication -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe [Text]
a -> UpdateApplication
s {$sel:labels:UpdateApplication' :: Maybe [Text]
labels = Maybe [Text]
a} :: UpdateApplication) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateApplication -> f UpdateApplication)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateApplication
-> f UpdateApplication
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The description of the application.
--
-- Minimum length=1. Maximum length=256
updateApplication_description :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_description :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_description = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
description :: Maybe Text
$sel:description:UpdateApplication' :: UpdateApplication -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:description:UpdateApplication' :: Maybe Text
description = Maybe Text
a} :: UpdateApplication)

-- | The Amazon Resource Name (ARN) of the application.
updateApplication_applicationId :: Lens.Lens' UpdateApplication Prelude.Text
updateApplication_applicationId :: (Text -> f Text) -> UpdateApplication -> f UpdateApplication
updateApplication_applicationId = (UpdateApplication -> Text)
-> (UpdateApplication -> Text -> UpdateApplication)
-> Lens UpdateApplication UpdateApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Text
applicationId :: Text
$sel:applicationId:UpdateApplication' :: UpdateApplication -> Text
applicationId} -> Text
applicationId) (\s :: UpdateApplication
s@UpdateApplication' {} Text
a -> UpdateApplication
s {$sel:applicationId:UpdateApplication' :: Text
applicationId = Text
a} :: UpdateApplication)

instance Core.AWSRequest UpdateApplication where
  type
    AWSResponse UpdateApplication =
      UpdateApplicationResponse
  request :: UpdateApplication -> Request UpdateApplication
request = Service -> UpdateApplication -> Request UpdateApplication
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateApplication)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateApplication))
-> Logger
-> Service
-> Proxy UpdateApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateApplication)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Version
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> UpdateApplicationResponse
UpdateApplicationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Version
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Int
 -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"homePageUrl")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"licenseUrl")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"readmeUrl")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"applicationId")
            Either
  String
  (Maybe Text
   -> Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Version
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Version
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Version)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Version)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"version")
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"author")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"labels" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Bool -> Int -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"verifiedAuthorUrl")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Bool -> Int -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Bool -> Int -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String
  (Maybe Text -> Maybe Bool -> Int -> UpdateApplicationResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"spdxLicenseId")
            Either String (Maybe Bool -> Int -> UpdateApplicationResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"isVerifiedAuthor")
            Either String (Int -> UpdateApplicationResponse)
-> Either String Int -> Either String UpdateApplicationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateApplication

instance Prelude.NFData UpdateApplication

instance Core.ToHeaders UpdateApplication where
  toHeaders :: UpdateApplication -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateApplication -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateApplication where
  toJSON :: UpdateApplication -> Value
toJSON UpdateApplication' {Maybe [Text]
Maybe Text
Text
applicationId :: Text
description :: Maybe Text
labels :: Maybe [Text]
author :: Maybe Text
readmeUrl :: Maybe Text
readmeBody :: Maybe Text
homePageUrl :: Maybe Text
$sel:applicationId:UpdateApplication' :: UpdateApplication -> Text
$sel:description:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:labels:UpdateApplication' :: UpdateApplication -> Maybe [Text]
$sel:author:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:readmeUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:readmeBody:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:homePageUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"homePageUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
homePageUrl,
            (Text
"readmeBody" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
readmeBody,
            (Text
"readmeUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
readmeUrl,
            (Text
"author" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
author,
            (Text
"labels" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
labels,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
          ]
      )

instance Core.ToPath UpdateApplication where
  toPath :: UpdateApplication -> ByteString
toPath UpdateApplication' {Maybe [Text]
Maybe Text
Text
applicationId :: Text
description :: Maybe Text
labels :: Maybe [Text]
author :: Maybe Text
readmeUrl :: Maybe Text
readmeBody :: Maybe Text
homePageUrl :: Maybe Text
$sel:applicationId:UpdateApplication' :: UpdateApplication -> Text
$sel:description:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:labels:UpdateApplication' :: UpdateApplication -> Maybe [Text]
$sel:author:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:readmeUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:readmeBody:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:homePageUrl:UpdateApplication' :: UpdateApplication -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/applications/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId]

instance Core.ToQuery UpdateApplication where
  toQuery :: UpdateApplication -> QueryString
toQuery = QueryString -> UpdateApplication -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateApplicationResponse' smart constructor.
data UpdateApplicationResponse = UpdateApplicationResponse'
  { -- | The date and time this resource was created.
    UpdateApplicationResponse -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
    -- | A URL with more information about the application, for example the
    -- location of your GitHub repository for the application.
    UpdateApplicationResponse -> Maybe Text
homePageUrl :: Prelude.Maybe Prelude.Text,
    -- | A link to a license file of the app that matches the spdxLicenseID value
    -- of your application.
    --
    -- Maximum size 5 MB
    UpdateApplicationResponse -> Maybe Text
licenseUrl :: Prelude.Maybe Prelude.Text,
    -- | A link to the readme file in Markdown language that contains a more
    -- detailed description of the application and how it works.
    --
    -- Maximum size 5 MB
    UpdateApplicationResponse -> Maybe Text
readmeUrl :: Prelude.Maybe Prelude.Text,
    -- | The application Amazon Resource Name (ARN).
    UpdateApplicationResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The name of the application.
    --
    -- Minimum length=1. Maximum length=140
    --
    -- Pattern: \"[a-zA-Z0-9\\\\-]+\";
    UpdateApplicationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Version information about the application.
    UpdateApplicationResponse -> Maybe Version
version :: Prelude.Maybe Version,
    -- | The name of the author publishing the app.
    --
    -- Minimum length=1. Maximum length=127.
    --
    -- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
    UpdateApplicationResponse -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
    -- | Labels to improve discovery of apps in search results.
    --
    -- Minimum length=1. Maximum length=127. Maximum number of labels: 10
    --
    -- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
    UpdateApplicationResponse -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
    -- | The URL to the public profile of a verified author. This URL is
    -- submitted by the author.
    UpdateApplicationResponse -> Maybe Text
verifiedAuthorUrl :: Prelude.Maybe Prelude.Text,
    -- | The description of the application.
    --
    -- Minimum length=1. Maximum length=256
    UpdateApplicationResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A valid identifier from https:\/\/spdx.org\/licenses\/.
    UpdateApplicationResponse -> Maybe Text
spdxLicenseId :: Prelude.Maybe Prelude.Text,
    -- | Whether the author of this application has been verified. This means
    -- means that AWS has made a good faith review, as a reasonable and prudent
    -- service provider, of the information provided by the requester and has
    -- confirmed that the requester\'s identity is as claimed.
    UpdateApplicationResponse -> Maybe Bool
isVerifiedAuthor :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    UpdateApplicationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateApplicationResponse -> UpdateApplicationResponse -> Bool
(UpdateApplicationResponse -> UpdateApplicationResponse -> Bool)
-> (UpdateApplicationResponse -> UpdateApplicationResponse -> Bool)
-> Eq UpdateApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplicationResponse -> UpdateApplicationResponse -> Bool
$c/= :: UpdateApplicationResponse -> UpdateApplicationResponse -> Bool
== :: UpdateApplicationResponse -> UpdateApplicationResponse -> Bool
$c== :: UpdateApplicationResponse -> UpdateApplicationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateApplicationResponse]
ReadPrec UpdateApplicationResponse
Int -> ReadS UpdateApplicationResponse
ReadS [UpdateApplicationResponse]
(Int -> ReadS UpdateApplicationResponse)
-> ReadS [UpdateApplicationResponse]
-> ReadPrec UpdateApplicationResponse
-> ReadPrec [UpdateApplicationResponse]
-> Read UpdateApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplicationResponse]
$creadListPrec :: ReadPrec [UpdateApplicationResponse]
readPrec :: ReadPrec UpdateApplicationResponse
$creadPrec :: ReadPrec UpdateApplicationResponse
readList :: ReadS [UpdateApplicationResponse]
$creadList :: ReadS [UpdateApplicationResponse]
readsPrec :: Int -> ReadS UpdateApplicationResponse
$creadsPrec :: Int -> ReadS UpdateApplicationResponse
Prelude.Read, Int -> UpdateApplicationResponse -> ShowS
[UpdateApplicationResponse] -> ShowS
UpdateApplicationResponse -> String
(Int -> UpdateApplicationResponse -> ShowS)
-> (UpdateApplicationResponse -> String)
-> ([UpdateApplicationResponse] -> ShowS)
-> Show UpdateApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplicationResponse] -> ShowS
$cshowList :: [UpdateApplicationResponse] -> ShowS
show :: UpdateApplicationResponse -> String
$cshow :: UpdateApplicationResponse -> String
showsPrec :: Int -> UpdateApplicationResponse -> ShowS
$cshowsPrec :: Int -> UpdateApplicationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateApplicationResponse -> Rep UpdateApplicationResponse x)
-> (forall x.
    Rep UpdateApplicationResponse x -> UpdateApplicationResponse)
-> Generic UpdateApplicationResponse
forall x.
Rep UpdateApplicationResponse x -> UpdateApplicationResponse
forall x.
UpdateApplicationResponse -> Rep UpdateApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApplicationResponse x -> UpdateApplicationResponse
$cfrom :: forall x.
UpdateApplicationResponse -> Rep UpdateApplicationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplicationResponse' 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:
--
-- 'creationTime', 'updateApplicationResponse_creationTime' - The date and time this resource was created.
--
-- 'homePageUrl', 'updateApplicationResponse_homePageUrl' - A URL with more information about the application, for example the
-- location of your GitHub repository for the application.
--
-- 'licenseUrl', 'updateApplicationResponse_licenseUrl' - A link to a license file of the app that matches the spdxLicenseID value
-- of your application.
--
-- Maximum size 5 MB
--
-- 'readmeUrl', 'updateApplicationResponse_readmeUrl' - A link to the readme file in Markdown language that contains a more
-- detailed description of the application and how it works.
--
-- Maximum size 5 MB
--
-- 'applicationId', 'updateApplicationResponse_applicationId' - The application Amazon Resource Name (ARN).
--
-- 'name', 'updateApplicationResponse_name' - The name of the application.
--
-- Minimum length=1. Maximum length=140
--
-- Pattern: \"[a-zA-Z0-9\\\\-]+\";
--
-- 'version', 'updateApplicationResponse_version' - Version information about the application.
--
-- 'author', 'updateApplicationResponse_author' - The name of the author publishing the app.
--
-- Minimum length=1. Maximum length=127.
--
-- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
--
-- 'labels', 'updateApplicationResponse_labels' - Labels to improve discovery of apps in search results.
--
-- Minimum length=1. Maximum length=127. Maximum number of labels: 10
--
-- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
--
-- 'verifiedAuthorUrl', 'updateApplicationResponse_verifiedAuthorUrl' - The URL to the public profile of a verified author. This URL is
-- submitted by the author.
--
-- 'description', 'updateApplicationResponse_description' - The description of the application.
--
-- Minimum length=1. Maximum length=256
--
-- 'spdxLicenseId', 'updateApplicationResponse_spdxLicenseId' - A valid identifier from https:\/\/spdx.org\/licenses\/.
--
-- 'isVerifiedAuthor', 'updateApplicationResponse_isVerifiedAuthor' - Whether the author of this application has been verified. This means
-- means that AWS has made a good faith review, as a reasonable and prudent
-- service provider, of the information provided by the requester and has
-- confirmed that the requester\'s identity is as claimed.
--
-- 'httpStatus', 'updateApplicationResponse_httpStatus' - The response's http status code.
newUpdateApplicationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateApplicationResponse
newUpdateApplicationResponse :: Int -> UpdateApplicationResponse
newUpdateApplicationResponse Int
pHttpStatus_ =
  UpdateApplicationResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Version
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> UpdateApplicationResponse
UpdateApplicationResponse'
    { $sel:creationTime:UpdateApplicationResponse' :: Maybe Text
creationTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:homePageUrl:UpdateApplicationResponse' :: Maybe Text
homePageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseUrl:UpdateApplicationResponse' :: Maybe Text
licenseUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:readmeUrl:UpdateApplicationResponse' :: Maybe Text
readmeUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:UpdateApplicationResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateApplicationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:UpdateApplicationResponse' :: Maybe Version
version = Maybe Version
forall a. Maybe a
Prelude.Nothing,
      $sel:author:UpdateApplicationResponse' :: Maybe Text
author = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:UpdateApplicationResponse' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:verifiedAuthorUrl:UpdateApplicationResponse' :: Maybe Text
verifiedAuthorUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateApplicationResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:spdxLicenseId:UpdateApplicationResponse' :: Maybe Text
spdxLicenseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isVerifiedAuthor:UpdateApplicationResponse' :: Maybe Bool
isVerifiedAuthor = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateApplicationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time this resource was created.
updateApplicationResponse_creationTime :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_creationTime :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_creationTime = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
creationTime :: Maybe Text
$sel:creationTime:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
creationTime} -> Maybe Text
creationTime) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:creationTime:UpdateApplicationResponse' :: Maybe Text
creationTime = Maybe Text
a} :: UpdateApplicationResponse)

-- | A URL with more information about the application, for example the
-- location of your GitHub repository for the application.
updateApplicationResponse_homePageUrl :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_homePageUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_homePageUrl = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
homePageUrl :: Maybe Text
$sel:homePageUrl:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
homePageUrl} -> Maybe Text
homePageUrl) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:homePageUrl:UpdateApplicationResponse' :: Maybe Text
homePageUrl = Maybe Text
a} :: UpdateApplicationResponse)

-- | A link to a license file of the app that matches the spdxLicenseID value
-- of your application.
--
-- Maximum size 5 MB
updateApplicationResponse_licenseUrl :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_licenseUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_licenseUrl = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
licenseUrl :: Maybe Text
$sel:licenseUrl:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
licenseUrl} -> Maybe Text
licenseUrl) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:licenseUrl:UpdateApplicationResponse' :: Maybe Text
licenseUrl = Maybe Text
a} :: UpdateApplicationResponse)

-- | A link to the readme file in Markdown language that contains a more
-- detailed description of the application and how it works.
--
-- Maximum size 5 MB
updateApplicationResponse_readmeUrl :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_readmeUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_readmeUrl = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
readmeUrl :: Maybe Text
$sel:readmeUrl:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
readmeUrl} -> Maybe Text
readmeUrl) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:readmeUrl:UpdateApplicationResponse' :: Maybe Text
readmeUrl = Maybe Text
a} :: UpdateApplicationResponse)

-- | The application Amazon Resource Name (ARN).
updateApplicationResponse_applicationId :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_applicationId = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:applicationId:UpdateApplicationResponse' :: Maybe Text
applicationId = Maybe Text
a} :: UpdateApplicationResponse)

-- | The name of the application.
--
-- Minimum length=1. Maximum length=140
--
-- Pattern: \"[a-zA-Z0-9\\\\-]+\";
updateApplicationResponse_name :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_name :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_name = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
name :: Maybe Text
$sel:name:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:name:UpdateApplicationResponse' :: Maybe Text
name = Maybe Text
a} :: UpdateApplicationResponse)

-- | Version information about the application.
updateApplicationResponse_version :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Version)
updateApplicationResponse_version :: (Maybe Version -> f (Maybe Version))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_version = (UpdateApplicationResponse -> Maybe Version)
-> (UpdateApplicationResponse
    -> Maybe Version -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Version)
     (Maybe Version)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Version
version :: Maybe Version
$sel:version:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Version
version} -> Maybe Version
version) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Version
a -> UpdateApplicationResponse
s {$sel:version:UpdateApplicationResponse' :: Maybe Version
version = Maybe Version
a} :: UpdateApplicationResponse)

-- | The name of the author publishing the app.
--
-- Minimum length=1. Maximum length=127.
--
-- Pattern \"^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$\";
updateApplicationResponse_author :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_author :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_author = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
author :: Maybe Text
$sel:author:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
author} -> Maybe Text
author) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:author:UpdateApplicationResponse' :: Maybe Text
author = Maybe Text
a} :: UpdateApplicationResponse)

-- | Labels to improve discovery of apps in search results.
--
-- Minimum length=1. Maximum length=127. Maximum number of labels: 10
--
-- Pattern: \"^[a-zA-Z0-9+\\\\-_:\\\\\/\@]+$\";
updateApplicationResponse_labels :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe [Prelude.Text])
updateApplicationResponse_labels :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_labels = (UpdateApplicationResponse -> Maybe [Text])
-> (UpdateApplicationResponse
    -> Maybe [Text] -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe [Text]
a -> UpdateApplicationResponse
s {$sel:labels:UpdateApplicationResponse' :: Maybe [Text]
labels = Maybe [Text]
a} :: UpdateApplicationResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateApplicationResponse -> f UpdateApplicationResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateApplicationResponse
-> f UpdateApplicationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The URL to the public profile of a verified author. This URL is
-- submitted by the author.
updateApplicationResponse_verifiedAuthorUrl :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_verifiedAuthorUrl :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_verifiedAuthorUrl = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
verifiedAuthorUrl :: Maybe Text
$sel:verifiedAuthorUrl:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
verifiedAuthorUrl} -> Maybe Text
verifiedAuthorUrl) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:verifiedAuthorUrl:UpdateApplicationResponse' :: Maybe Text
verifiedAuthorUrl = Maybe Text
a} :: UpdateApplicationResponse)

-- | The description of the application.
--
-- Minimum length=1. Maximum length=256
updateApplicationResponse_description :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_description = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:description:UpdateApplicationResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateApplicationResponse)

-- | A valid identifier from https:\/\/spdx.org\/licenses\/.
updateApplicationResponse_spdxLicenseId :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Text)
updateApplicationResponse_spdxLicenseId :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_spdxLicenseId = (UpdateApplicationResponse -> Maybe Text)
-> (UpdateApplicationResponse
    -> Maybe Text -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Text
spdxLicenseId :: Maybe Text
$sel:spdxLicenseId:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Text
spdxLicenseId} -> Maybe Text
spdxLicenseId) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Text
a -> UpdateApplicationResponse
s {$sel:spdxLicenseId:UpdateApplicationResponse' :: Maybe Text
spdxLicenseId = Maybe Text
a} :: UpdateApplicationResponse)

-- | Whether the author of this application has been verified. This means
-- means that AWS has made a good faith review, as a reasonable and prudent
-- service provider, of the information provided by the requester and has
-- confirmed that the requester\'s identity is as claimed.
updateApplicationResponse_isVerifiedAuthor :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe Prelude.Bool)
updateApplicationResponse_isVerifiedAuthor :: (Maybe Bool -> f (Maybe Bool))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_isVerifiedAuthor = (UpdateApplicationResponse -> Maybe Bool)
-> (UpdateApplicationResponse
    -> Maybe Bool -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe Bool
isVerifiedAuthor :: Maybe Bool
$sel:isVerifiedAuthor:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe Bool
isVerifiedAuthor} -> Maybe Bool
isVerifiedAuthor) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe Bool
a -> UpdateApplicationResponse
s {$sel:isVerifiedAuthor:UpdateApplicationResponse' :: Maybe Bool
isVerifiedAuthor = Maybe Bool
a} :: UpdateApplicationResponse)

-- | The response's http status code.
updateApplicationResponse_httpStatus :: Lens.Lens' UpdateApplicationResponse Prelude.Int
updateApplicationResponse_httpStatus :: (Int -> f Int)
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_httpStatus = (UpdateApplicationResponse -> Int)
-> (UpdateApplicationResponse -> Int -> UpdateApplicationResponse)
-> Lens UpdateApplicationResponse UpdateApplicationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateApplicationResponse' :: UpdateApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Int
a -> UpdateApplicationResponse
s {$sel:httpStatus:UpdateApplicationResponse' :: Int
httpStatus = Int
a} :: UpdateApplicationResponse)

instance Prelude.NFData UpdateApplicationResponse