{-# 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.ServiceCatalog.UpdateServiceAction
-- 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 a self-service action.
module Amazonka.ServiceCatalog.UpdateServiceAction
  ( -- * Creating a Request
    UpdateServiceAction (..),
    newUpdateServiceAction,

    -- * Request Lenses
    updateServiceAction_definition,
    updateServiceAction_name,
    updateServiceAction_acceptLanguage,
    updateServiceAction_description,
    updateServiceAction_id,

    -- * Destructuring the Response
    UpdateServiceActionResponse (..),
    newUpdateServiceActionResponse,

    -- * Response Lenses
    updateServiceActionResponse_serviceActionDetail,
    updateServiceActionResponse_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.ServiceCatalog.Types

-- | /See:/ 'newUpdateServiceAction' smart constructor.
data UpdateServiceAction = UpdateServiceAction'
  { -- | A map that defines the self-service action.
    UpdateServiceAction
-> Maybe (HashMap ServiceActionDefinitionKey Text)
definition :: Prelude.Maybe (Prelude.HashMap ServiceActionDefinitionKey Prelude.Text),
    -- | The self-service action name.
    UpdateServiceAction -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    UpdateServiceAction -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The self-service action description.
    UpdateServiceAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The self-service action identifier.
    UpdateServiceAction -> Text
id :: Prelude.Text
  }
  deriving (UpdateServiceAction -> UpdateServiceAction -> Bool
(UpdateServiceAction -> UpdateServiceAction -> Bool)
-> (UpdateServiceAction -> UpdateServiceAction -> Bool)
-> Eq UpdateServiceAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServiceAction -> UpdateServiceAction -> Bool
$c/= :: UpdateServiceAction -> UpdateServiceAction -> Bool
== :: UpdateServiceAction -> UpdateServiceAction -> Bool
$c== :: UpdateServiceAction -> UpdateServiceAction -> Bool
Prelude.Eq, ReadPrec [UpdateServiceAction]
ReadPrec UpdateServiceAction
Int -> ReadS UpdateServiceAction
ReadS [UpdateServiceAction]
(Int -> ReadS UpdateServiceAction)
-> ReadS [UpdateServiceAction]
-> ReadPrec UpdateServiceAction
-> ReadPrec [UpdateServiceAction]
-> Read UpdateServiceAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServiceAction]
$creadListPrec :: ReadPrec [UpdateServiceAction]
readPrec :: ReadPrec UpdateServiceAction
$creadPrec :: ReadPrec UpdateServiceAction
readList :: ReadS [UpdateServiceAction]
$creadList :: ReadS [UpdateServiceAction]
readsPrec :: Int -> ReadS UpdateServiceAction
$creadsPrec :: Int -> ReadS UpdateServiceAction
Prelude.Read, Int -> UpdateServiceAction -> ShowS
[UpdateServiceAction] -> ShowS
UpdateServiceAction -> String
(Int -> UpdateServiceAction -> ShowS)
-> (UpdateServiceAction -> String)
-> ([UpdateServiceAction] -> ShowS)
-> Show UpdateServiceAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServiceAction] -> ShowS
$cshowList :: [UpdateServiceAction] -> ShowS
show :: UpdateServiceAction -> String
$cshow :: UpdateServiceAction -> String
showsPrec :: Int -> UpdateServiceAction -> ShowS
$cshowsPrec :: Int -> UpdateServiceAction -> ShowS
Prelude.Show, (forall x. UpdateServiceAction -> Rep UpdateServiceAction x)
-> (forall x. Rep UpdateServiceAction x -> UpdateServiceAction)
-> Generic UpdateServiceAction
forall x. Rep UpdateServiceAction x -> UpdateServiceAction
forall x. UpdateServiceAction -> Rep UpdateServiceAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServiceAction x -> UpdateServiceAction
$cfrom :: forall x. UpdateServiceAction -> Rep UpdateServiceAction x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServiceAction' 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:
--
-- 'definition', 'updateServiceAction_definition' - A map that defines the self-service action.
--
-- 'name', 'updateServiceAction_name' - The self-service action name.
--
-- 'acceptLanguage', 'updateServiceAction_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'description', 'updateServiceAction_description' - The self-service action description.
--
-- 'id', 'updateServiceAction_id' - The self-service action identifier.
newUpdateServiceAction ::
  -- | 'id'
  Prelude.Text ->
  UpdateServiceAction
newUpdateServiceAction :: Text -> UpdateServiceAction
newUpdateServiceAction Text
pId_ =
  UpdateServiceAction' :: Maybe (HashMap ServiceActionDefinitionKey Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> UpdateServiceAction
UpdateServiceAction'
    { $sel:definition:UpdateServiceAction' :: Maybe (HashMap ServiceActionDefinitionKey Text)
definition = Maybe (HashMap ServiceActionDefinitionKey Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateServiceAction' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptLanguage:UpdateServiceAction' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateServiceAction' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateServiceAction' :: Text
id = Text
pId_
    }

-- | A map that defines the self-service action.
updateServiceAction_definition :: Lens.Lens' UpdateServiceAction (Prelude.Maybe (Prelude.HashMap ServiceActionDefinitionKey Prelude.Text))
updateServiceAction_definition :: (Maybe (HashMap ServiceActionDefinitionKey Text)
 -> f (Maybe (HashMap ServiceActionDefinitionKey Text)))
-> UpdateServiceAction -> f UpdateServiceAction
updateServiceAction_definition = (UpdateServiceAction
 -> Maybe (HashMap ServiceActionDefinitionKey Text))
-> (UpdateServiceAction
    -> Maybe (HashMap ServiceActionDefinitionKey Text)
    -> UpdateServiceAction)
-> Lens
     UpdateServiceAction
     UpdateServiceAction
     (Maybe (HashMap ServiceActionDefinitionKey Text))
     (Maybe (HashMap ServiceActionDefinitionKey Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceAction' {Maybe (HashMap ServiceActionDefinitionKey Text)
definition :: Maybe (HashMap ServiceActionDefinitionKey Text)
$sel:definition:UpdateServiceAction' :: UpdateServiceAction
-> Maybe (HashMap ServiceActionDefinitionKey Text)
definition} -> Maybe (HashMap ServiceActionDefinitionKey Text)
definition) (\s :: UpdateServiceAction
s@UpdateServiceAction' {} Maybe (HashMap ServiceActionDefinitionKey Text)
a -> UpdateServiceAction
s {$sel:definition:UpdateServiceAction' :: Maybe (HashMap ServiceActionDefinitionKey Text)
definition = Maybe (HashMap ServiceActionDefinitionKey Text)
a} :: UpdateServiceAction) ((Maybe (HashMap ServiceActionDefinitionKey Text)
  -> f (Maybe (HashMap ServiceActionDefinitionKey Text)))
 -> UpdateServiceAction -> f UpdateServiceAction)
-> ((Maybe (HashMap ServiceActionDefinitionKey Text)
     -> f (Maybe (HashMap ServiceActionDefinitionKey Text)))
    -> Maybe (HashMap ServiceActionDefinitionKey Text)
    -> f (Maybe (HashMap ServiceActionDefinitionKey Text)))
-> (Maybe (HashMap ServiceActionDefinitionKey Text)
    -> f (Maybe (HashMap ServiceActionDefinitionKey Text)))
-> UpdateServiceAction
-> f UpdateServiceAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
-> Iso
     (Maybe (HashMap ServiceActionDefinitionKey Text))
     (Maybe (HashMap ServiceActionDefinitionKey Text))
     (Maybe (HashMap ServiceActionDefinitionKey Text))
     (Maybe (HashMap ServiceActionDefinitionKey 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
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
  (HashMap ServiceActionDefinitionKey Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The self-service action name.
updateServiceAction_name :: Lens.Lens' UpdateServiceAction (Prelude.Maybe Prelude.Text)
updateServiceAction_name :: (Maybe Text -> f (Maybe Text))
-> UpdateServiceAction -> f UpdateServiceAction
updateServiceAction_name = (UpdateServiceAction -> Maybe Text)
-> (UpdateServiceAction -> Maybe Text -> UpdateServiceAction)
-> Lens
     UpdateServiceAction UpdateServiceAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceAction' {Maybe Text
name :: Maybe Text
$sel:name:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateServiceAction
s@UpdateServiceAction' {} Maybe Text
a -> UpdateServiceAction
s {$sel:name:UpdateServiceAction' :: Maybe Text
name = Maybe Text
a} :: UpdateServiceAction)

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
updateServiceAction_acceptLanguage :: Lens.Lens' UpdateServiceAction (Prelude.Maybe Prelude.Text)
updateServiceAction_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> UpdateServiceAction -> f UpdateServiceAction
updateServiceAction_acceptLanguage = (UpdateServiceAction -> Maybe Text)
-> (UpdateServiceAction -> Maybe Text -> UpdateServiceAction)
-> Lens
     UpdateServiceAction UpdateServiceAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceAction' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: UpdateServiceAction
s@UpdateServiceAction' {} Maybe Text
a -> UpdateServiceAction
s {$sel:acceptLanguage:UpdateServiceAction' :: Maybe Text
acceptLanguage = Maybe Text
a} :: UpdateServiceAction)

-- | The self-service action description.
updateServiceAction_description :: Lens.Lens' UpdateServiceAction (Prelude.Maybe Prelude.Text)
updateServiceAction_description :: (Maybe Text -> f (Maybe Text))
-> UpdateServiceAction -> f UpdateServiceAction
updateServiceAction_description = (UpdateServiceAction -> Maybe Text)
-> (UpdateServiceAction -> Maybe Text -> UpdateServiceAction)
-> Lens
     UpdateServiceAction UpdateServiceAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceAction' {Maybe Text
description :: Maybe Text
$sel:description:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateServiceAction
s@UpdateServiceAction' {} Maybe Text
a -> UpdateServiceAction
s {$sel:description:UpdateServiceAction' :: Maybe Text
description = Maybe Text
a} :: UpdateServiceAction)

-- | The self-service action identifier.
updateServiceAction_id :: Lens.Lens' UpdateServiceAction Prelude.Text
updateServiceAction_id :: (Text -> f Text) -> UpdateServiceAction -> f UpdateServiceAction
updateServiceAction_id = (UpdateServiceAction -> Text)
-> (UpdateServiceAction -> Text -> UpdateServiceAction)
-> Lens UpdateServiceAction UpdateServiceAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceAction' {Text
id :: Text
$sel:id:UpdateServiceAction' :: UpdateServiceAction -> Text
id} -> Text
id) (\s :: UpdateServiceAction
s@UpdateServiceAction' {} Text
a -> UpdateServiceAction
s {$sel:id:UpdateServiceAction' :: Text
id = Text
a} :: UpdateServiceAction)

instance Core.AWSRequest UpdateServiceAction where
  type
    AWSResponse UpdateServiceAction =
      UpdateServiceActionResponse
  request :: UpdateServiceAction -> Request UpdateServiceAction
request = Service -> UpdateServiceAction -> Request UpdateServiceAction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateServiceAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServiceAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateServiceAction))
-> Logger
-> Service
-> Proxy UpdateServiceAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServiceAction)))
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 ServiceActionDetail -> Int -> UpdateServiceActionResponse
UpdateServiceActionResponse'
            (Maybe ServiceActionDetail -> Int -> UpdateServiceActionResponse)
-> Either String (Maybe ServiceActionDetail)
-> Either String (Int -> UpdateServiceActionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ServiceActionDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ServiceActionDetail")
            Either String (Int -> UpdateServiceActionResponse)
-> Either String Int -> Either String UpdateServiceActionResponse
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 UpdateServiceAction

instance Prelude.NFData UpdateServiceAction

instance Core.ToHeaders UpdateServiceAction where
  toHeaders :: UpdateServiceAction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateServiceAction -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWS242ServiceCatalogService.UpdateServiceAction" ::
                          Prelude.ByteString
                      ),
            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 UpdateServiceAction where
  toJSON :: UpdateServiceAction -> Value
toJSON UpdateServiceAction' {Maybe Text
Maybe (HashMap ServiceActionDefinitionKey Text)
Text
id :: Text
description :: Maybe Text
acceptLanguage :: Maybe Text
name :: Maybe Text
definition :: Maybe (HashMap ServiceActionDefinitionKey Text)
$sel:id:UpdateServiceAction' :: UpdateServiceAction -> Text
$sel:description:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
$sel:acceptLanguage:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
$sel:name:UpdateServiceAction' :: UpdateServiceAction -> Maybe Text
$sel:definition:UpdateServiceAction' :: UpdateServiceAction
-> Maybe (HashMap ServiceActionDefinitionKey Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Definition" Text -> HashMap ServiceActionDefinitionKey Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap ServiceActionDefinitionKey Text -> Pair)
-> Maybe (HashMap ServiceActionDefinitionKey Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap ServiceActionDefinitionKey Text)
definition,
            (Text
"Name" 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
name,
            (Text
"AcceptLanguage" 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
acceptLanguage,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id)
          ]
      )

instance Core.ToPath UpdateServiceAction where
  toPath :: UpdateServiceAction -> ByteString
toPath = ByteString -> UpdateServiceAction -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateServiceActionResponse' smart constructor.
data UpdateServiceActionResponse = UpdateServiceActionResponse'
  { -- | Detailed information about the self-service action.
    UpdateServiceActionResponse -> Maybe ServiceActionDetail
serviceActionDetail :: Prelude.Maybe ServiceActionDetail,
    -- | The response's http status code.
    UpdateServiceActionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateServiceActionResponse -> UpdateServiceActionResponse -> Bool
(UpdateServiceActionResponse
 -> UpdateServiceActionResponse -> Bool)
-> (UpdateServiceActionResponse
    -> UpdateServiceActionResponse -> Bool)
-> Eq UpdateServiceActionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServiceActionResponse -> UpdateServiceActionResponse -> Bool
$c/= :: UpdateServiceActionResponse -> UpdateServiceActionResponse -> Bool
== :: UpdateServiceActionResponse -> UpdateServiceActionResponse -> Bool
$c== :: UpdateServiceActionResponse -> UpdateServiceActionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServiceActionResponse]
ReadPrec UpdateServiceActionResponse
Int -> ReadS UpdateServiceActionResponse
ReadS [UpdateServiceActionResponse]
(Int -> ReadS UpdateServiceActionResponse)
-> ReadS [UpdateServiceActionResponse]
-> ReadPrec UpdateServiceActionResponse
-> ReadPrec [UpdateServiceActionResponse]
-> Read UpdateServiceActionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServiceActionResponse]
$creadListPrec :: ReadPrec [UpdateServiceActionResponse]
readPrec :: ReadPrec UpdateServiceActionResponse
$creadPrec :: ReadPrec UpdateServiceActionResponse
readList :: ReadS [UpdateServiceActionResponse]
$creadList :: ReadS [UpdateServiceActionResponse]
readsPrec :: Int -> ReadS UpdateServiceActionResponse
$creadsPrec :: Int -> ReadS UpdateServiceActionResponse
Prelude.Read, Int -> UpdateServiceActionResponse -> ShowS
[UpdateServiceActionResponse] -> ShowS
UpdateServiceActionResponse -> String
(Int -> UpdateServiceActionResponse -> ShowS)
-> (UpdateServiceActionResponse -> String)
-> ([UpdateServiceActionResponse] -> ShowS)
-> Show UpdateServiceActionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServiceActionResponse] -> ShowS
$cshowList :: [UpdateServiceActionResponse] -> ShowS
show :: UpdateServiceActionResponse -> String
$cshow :: UpdateServiceActionResponse -> String
showsPrec :: Int -> UpdateServiceActionResponse -> ShowS
$cshowsPrec :: Int -> UpdateServiceActionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateServiceActionResponse -> Rep UpdateServiceActionResponse x)
-> (forall x.
    Rep UpdateServiceActionResponse x -> UpdateServiceActionResponse)
-> Generic UpdateServiceActionResponse
forall x.
Rep UpdateServiceActionResponse x -> UpdateServiceActionResponse
forall x.
UpdateServiceActionResponse -> Rep UpdateServiceActionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServiceActionResponse x -> UpdateServiceActionResponse
$cfrom :: forall x.
UpdateServiceActionResponse -> Rep UpdateServiceActionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServiceActionResponse' 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:
--
-- 'serviceActionDetail', 'updateServiceActionResponse_serviceActionDetail' - Detailed information about the self-service action.
--
-- 'httpStatus', 'updateServiceActionResponse_httpStatus' - The response's http status code.
newUpdateServiceActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateServiceActionResponse
newUpdateServiceActionResponse :: Int -> UpdateServiceActionResponse
newUpdateServiceActionResponse Int
pHttpStatus_ =
  UpdateServiceActionResponse' :: Maybe ServiceActionDetail -> Int -> UpdateServiceActionResponse
UpdateServiceActionResponse'
    { $sel:serviceActionDetail:UpdateServiceActionResponse' :: Maybe ServiceActionDetail
serviceActionDetail =
        Maybe ServiceActionDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateServiceActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Detailed information about the self-service action.
updateServiceActionResponse_serviceActionDetail :: Lens.Lens' UpdateServiceActionResponse (Prelude.Maybe ServiceActionDetail)
updateServiceActionResponse_serviceActionDetail :: (Maybe ServiceActionDetail -> f (Maybe ServiceActionDetail))
-> UpdateServiceActionResponse -> f UpdateServiceActionResponse
updateServiceActionResponse_serviceActionDetail = (UpdateServiceActionResponse -> Maybe ServiceActionDetail)
-> (UpdateServiceActionResponse
    -> Maybe ServiceActionDetail -> UpdateServiceActionResponse)
-> Lens
     UpdateServiceActionResponse
     UpdateServiceActionResponse
     (Maybe ServiceActionDetail)
     (Maybe ServiceActionDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceActionResponse' {Maybe ServiceActionDetail
serviceActionDetail :: Maybe ServiceActionDetail
$sel:serviceActionDetail:UpdateServiceActionResponse' :: UpdateServiceActionResponse -> Maybe ServiceActionDetail
serviceActionDetail} -> Maybe ServiceActionDetail
serviceActionDetail) (\s :: UpdateServiceActionResponse
s@UpdateServiceActionResponse' {} Maybe ServiceActionDetail
a -> UpdateServiceActionResponse
s {$sel:serviceActionDetail:UpdateServiceActionResponse' :: Maybe ServiceActionDetail
serviceActionDetail = Maybe ServiceActionDetail
a} :: UpdateServiceActionResponse)

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

instance Prelude.NFData UpdateServiceActionResponse