{-# 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.SSM.UpdateOpsMetadata
-- 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)
--
-- Amazon Web Services Systems Manager calls this API operation when you
-- edit OpsMetadata in Application Manager.
module Amazonka.SSM.UpdateOpsMetadata
  ( -- * Creating a Request
    UpdateOpsMetadata (..),
    newUpdateOpsMetadata,

    -- * Request Lenses
    updateOpsMetadata_metadataToUpdate,
    updateOpsMetadata_keysToDelete,
    updateOpsMetadata_opsMetadataArn,

    -- * Destructuring the Response
    UpdateOpsMetadataResponse (..),
    newUpdateOpsMetadataResponse,

    -- * Response Lenses
    updateOpsMetadataResponse_opsMetadataArn,
    updateOpsMetadataResponse_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.SSM.Types

-- | /See:/ 'newUpdateOpsMetadata' smart constructor.
data UpdateOpsMetadata = UpdateOpsMetadata'
  { -- | Metadata to add to an OpsMetadata object.
    UpdateOpsMetadata -> Maybe (HashMap Text MetadataValue)
metadataToUpdate :: Prelude.Maybe (Prelude.HashMap Prelude.Text MetadataValue),
    -- | The metadata keys to delete from the OpsMetadata object.
    UpdateOpsMetadata -> Maybe (NonEmpty Text)
keysToDelete :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The Amazon Resoure Name (ARN) of the OpsMetadata Object to update.
    UpdateOpsMetadata -> Text
opsMetadataArn :: Prelude.Text
  }
  deriving (UpdateOpsMetadata -> UpdateOpsMetadata -> Bool
(UpdateOpsMetadata -> UpdateOpsMetadata -> Bool)
-> (UpdateOpsMetadata -> UpdateOpsMetadata -> Bool)
-> Eq UpdateOpsMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateOpsMetadata -> UpdateOpsMetadata -> Bool
$c/= :: UpdateOpsMetadata -> UpdateOpsMetadata -> Bool
== :: UpdateOpsMetadata -> UpdateOpsMetadata -> Bool
$c== :: UpdateOpsMetadata -> UpdateOpsMetadata -> Bool
Prelude.Eq, ReadPrec [UpdateOpsMetadata]
ReadPrec UpdateOpsMetadata
Int -> ReadS UpdateOpsMetadata
ReadS [UpdateOpsMetadata]
(Int -> ReadS UpdateOpsMetadata)
-> ReadS [UpdateOpsMetadata]
-> ReadPrec UpdateOpsMetadata
-> ReadPrec [UpdateOpsMetadata]
-> Read UpdateOpsMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateOpsMetadata]
$creadListPrec :: ReadPrec [UpdateOpsMetadata]
readPrec :: ReadPrec UpdateOpsMetadata
$creadPrec :: ReadPrec UpdateOpsMetadata
readList :: ReadS [UpdateOpsMetadata]
$creadList :: ReadS [UpdateOpsMetadata]
readsPrec :: Int -> ReadS UpdateOpsMetadata
$creadsPrec :: Int -> ReadS UpdateOpsMetadata
Prelude.Read, Int -> UpdateOpsMetadata -> ShowS
[UpdateOpsMetadata] -> ShowS
UpdateOpsMetadata -> String
(Int -> UpdateOpsMetadata -> ShowS)
-> (UpdateOpsMetadata -> String)
-> ([UpdateOpsMetadata] -> ShowS)
-> Show UpdateOpsMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateOpsMetadata] -> ShowS
$cshowList :: [UpdateOpsMetadata] -> ShowS
show :: UpdateOpsMetadata -> String
$cshow :: UpdateOpsMetadata -> String
showsPrec :: Int -> UpdateOpsMetadata -> ShowS
$cshowsPrec :: Int -> UpdateOpsMetadata -> ShowS
Prelude.Show, (forall x. UpdateOpsMetadata -> Rep UpdateOpsMetadata x)
-> (forall x. Rep UpdateOpsMetadata x -> UpdateOpsMetadata)
-> Generic UpdateOpsMetadata
forall x. Rep UpdateOpsMetadata x -> UpdateOpsMetadata
forall x. UpdateOpsMetadata -> Rep UpdateOpsMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateOpsMetadata x -> UpdateOpsMetadata
$cfrom :: forall x. UpdateOpsMetadata -> Rep UpdateOpsMetadata x
Prelude.Generic)

-- |
-- Create a value of 'UpdateOpsMetadata' 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:
--
-- 'metadataToUpdate', 'updateOpsMetadata_metadataToUpdate' - Metadata to add to an OpsMetadata object.
--
-- 'keysToDelete', 'updateOpsMetadata_keysToDelete' - The metadata keys to delete from the OpsMetadata object.
--
-- 'opsMetadataArn', 'updateOpsMetadata_opsMetadataArn' - The Amazon Resoure Name (ARN) of the OpsMetadata Object to update.
newUpdateOpsMetadata ::
  -- | 'opsMetadataArn'
  Prelude.Text ->
  UpdateOpsMetadata
newUpdateOpsMetadata :: Text -> UpdateOpsMetadata
newUpdateOpsMetadata Text
pOpsMetadataArn_ =
  UpdateOpsMetadata' :: Maybe (HashMap Text MetadataValue)
-> Maybe (NonEmpty Text) -> Text -> UpdateOpsMetadata
UpdateOpsMetadata'
    { $sel:metadataToUpdate:UpdateOpsMetadata' :: Maybe (HashMap Text MetadataValue)
metadataToUpdate =
        Maybe (HashMap Text MetadataValue)
forall a. Maybe a
Prelude.Nothing,
      $sel:keysToDelete:UpdateOpsMetadata' :: Maybe (NonEmpty Text)
keysToDelete = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:opsMetadataArn:UpdateOpsMetadata' :: Text
opsMetadataArn = Text
pOpsMetadataArn_
    }

-- | Metadata to add to an OpsMetadata object.
updateOpsMetadata_metadataToUpdate :: Lens.Lens' UpdateOpsMetadata (Prelude.Maybe (Prelude.HashMap Prelude.Text MetadataValue))
updateOpsMetadata_metadataToUpdate :: (Maybe (HashMap Text MetadataValue)
 -> f (Maybe (HashMap Text MetadataValue)))
-> UpdateOpsMetadata -> f UpdateOpsMetadata
updateOpsMetadata_metadataToUpdate = (UpdateOpsMetadata -> Maybe (HashMap Text MetadataValue))
-> (UpdateOpsMetadata
    -> Maybe (HashMap Text MetadataValue) -> UpdateOpsMetadata)
-> Lens
     UpdateOpsMetadata
     UpdateOpsMetadata
     (Maybe (HashMap Text MetadataValue))
     (Maybe (HashMap Text MetadataValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpsMetadata' {Maybe (HashMap Text MetadataValue)
metadataToUpdate :: Maybe (HashMap Text MetadataValue)
$sel:metadataToUpdate:UpdateOpsMetadata' :: UpdateOpsMetadata -> Maybe (HashMap Text MetadataValue)
metadataToUpdate} -> Maybe (HashMap Text MetadataValue)
metadataToUpdate) (\s :: UpdateOpsMetadata
s@UpdateOpsMetadata' {} Maybe (HashMap Text MetadataValue)
a -> UpdateOpsMetadata
s {$sel:metadataToUpdate:UpdateOpsMetadata' :: Maybe (HashMap Text MetadataValue)
metadataToUpdate = Maybe (HashMap Text MetadataValue)
a} :: UpdateOpsMetadata) ((Maybe (HashMap Text MetadataValue)
  -> f (Maybe (HashMap Text MetadataValue)))
 -> UpdateOpsMetadata -> f UpdateOpsMetadata)
-> ((Maybe (HashMap Text MetadataValue)
     -> f (Maybe (HashMap Text MetadataValue)))
    -> Maybe (HashMap Text MetadataValue)
    -> f (Maybe (HashMap Text MetadataValue)))
-> (Maybe (HashMap Text MetadataValue)
    -> f (Maybe (HashMap Text MetadataValue)))
-> UpdateOpsMetadata
-> f UpdateOpsMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text MetadataValue)
  (HashMap Text MetadataValue)
  (HashMap Text MetadataValue)
  (HashMap Text MetadataValue)
-> Iso
     (Maybe (HashMap Text MetadataValue))
     (Maybe (HashMap Text MetadataValue))
     (Maybe (HashMap Text MetadataValue))
     (Maybe (HashMap Text MetadataValue))
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 Text MetadataValue)
  (HashMap Text MetadataValue)
  (HashMap Text MetadataValue)
  (HashMap Text MetadataValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The metadata keys to delete from the OpsMetadata object.
updateOpsMetadata_keysToDelete :: Lens.Lens' UpdateOpsMetadata (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateOpsMetadata_keysToDelete :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateOpsMetadata -> f UpdateOpsMetadata
updateOpsMetadata_keysToDelete = (UpdateOpsMetadata -> Maybe (NonEmpty Text))
-> (UpdateOpsMetadata
    -> Maybe (NonEmpty Text) -> UpdateOpsMetadata)
-> Lens
     UpdateOpsMetadata
     UpdateOpsMetadata
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpsMetadata' {Maybe (NonEmpty Text)
keysToDelete :: Maybe (NonEmpty Text)
$sel:keysToDelete:UpdateOpsMetadata' :: UpdateOpsMetadata -> Maybe (NonEmpty Text)
keysToDelete} -> Maybe (NonEmpty Text)
keysToDelete) (\s :: UpdateOpsMetadata
s@UpdateOpsMetadata' {} Maybe (NonEmpty Text)
a -> UpdateOpsMetadata
s {$sel:keysToDelete:UpdateOpsMetadata' :: Maybe (NonEmpty Text)
keysToDelete = Maybe (NonEmpty Text)
a} :: UpdateOpsMetadata) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> UpdateOpsMetadata -> f UpdateOpsMetadata)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateOpsMetadata
-> f UpdateOpsMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resoure Name (ARN) of the OpsMetadata Object to update.
updateOpsMetadata_opsMetadataArn :: Lens.Lens' UpdateOpsMetadata Prelude.Text
updateOpsMetadata_opsMetadataArn :: (Text -> f Text) -> UpdateOpsMetadata -> f UpdateOpsMetadata
updateOpsMetadata_opsMetadataArn = (UpdateOpsMetadata -> Text)
-> (UpdateOpsMetadata -> Text -> UpdateOpsMetadata)
-> Lens UpdateOpsMetadata UpdateOpsMetadata Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpsMetadata' {Text
opsMetadataArn :: Text
$sel:opsMetadataArn:UpdateOpsMetadata' :: UpdateOpsMetadata -> Text
opsMetadataArn} -> Text
opsMetadataArn) (\s :: UpdateOpsMetadata
s@UpdateOpsMetadata' {} Text
a -> UpdateOpsMetadata
s {$sel:opsMetadataArn:UpdateOpsMetadata' :: Text
opsMetadataArn = Text
a} :: UpdateOpsMetadata)

instance Core.AWSRequest UpdateOpsMetadata where
  type
    AWSResponse UpdateOpsMetadata =
      UpdateOpsMetadataResponse
  request :: UpdateOpsMetadata -> Request UpdateOpsMetadata
request = Service -> UpdateOpsMetadata -> Request UpdateOpsMetadata
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateOpsMetadata
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateOpsMetadata)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateOpsMetadata))
-> Logger
-> Service
-> Proxy UpdateOpsMetadata
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateOpsMetadata)))
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 -> Int -> UpdateOpsMetadataResponse
UpdateOpsMetadataResponse'
            (Maybe Text -> Int -> UpdateOpsMetadataResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateOpsMetadataResponse)
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
"OpsMetadataArn")
            Either String (Int -> UpdateOpsMetadataResponse)
-> Either String Int -> Either String UpdateOpsMetadataResponse
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 UpdateOpsMetadata

instance Prelude.NFData UpdateOpsMetadata

instance Core.ToHeaders UpdateOpsMetadata where
  toHeaders :: UpdateOpsMetadata -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateOpsMetadata -> 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
"AmazonSSM.UpdateOpsMetadata" ::
                          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 UpdateOpsMetadata where
  toJSON :: UpdateOpsMetadata -> Value
toJSON UpdateOpsMetadata' {Maybe (NonEmpty Text)
Maybe (HashMap Text MetadataValue)
Text
opsMetadataArn :: Text
keysToDelete :: Maybe (NonEmpty Text)
metadataToUpdate :: Maybe (HashMap Text MetadataValue)
$sel:opsMetadataArn:UpdateOpsMetadata' :: UpdateOpsMetadata -> Text
$sel:keysToDelete:UpdateOpsMetadata' :: UpdateOpsMetadata -> Maybe (NonEmpty Text)
$sel:metadataToUpdate:UpdateOpsMetadata' :: UpdateOpsMetadata -> Maybe (HashMap Text MetadataValue)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MetadataToUpdate" Text -> HashMap Text MetadataValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text MetadataValue -> Pair)
-> Maybe (HashMap Text MetadataValue) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text MetadataValue)
metadataToUpdate,
            (Text
"KeysToDelete" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
keysToDelete,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OpsMetadataArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
opsMetadataArn)
          ]
      )

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

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

-- | /See:/ 'newUpdateOpsMetadataResponse' smart constructor.
data UpdateOpsMetadataResponse = UpdateOpsMetadataResponse'
  { -- | The Amazon Resource Name (ARN) of the OpsMetadata Object that was
    -- updated.
    UpdateOpsMetadataResponse -> Maybe Text
opsMetadataArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateOpsMetadataResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool
(UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool)
-> (UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool)
-> Eq UpdateOpsMetadataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool
$c/= :: UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool
== :: UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool
$c== :: UpdateOpsMetadataResponse -> UpdateOpsMetadataResponse -> Bool
Prelude.Eq, ReadPrec [UpdateOpsMetadataResponse]
ReadPrec UpdateOpsMetadataResponse
Int -> ReadS UpdateOpsMetadataResponse
ReadS [UpdateOpsMetadataResponse]
(Int -> ReadS UpdateOpsMetadataResponse)
-> ReadS [UpdateOpsMetadataResponse]
-> ReadPrec UpdateOpsMetadataResponse
-> ReadPrec [UpdateOpsMetadataResponse]
-> Read UpdateOpsMetadataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateOpsMetadataResponse]
$creadListPrec :: ReadPrec [UpdateOpsMetadataResponse]
readPrec :: ReadPrec UpdateOpsMetadataResponse
$creadPrec :: ReadPrec UpdateOpsMetadataResponse
readList :: ReadS [UpdateOpsMetadataResponse]
$creadList :: ReadS [UpdateOpsMetadataResponse]
readsPrec :: Int -> ReadS UpdateOpsMetadataResponse
$creadsPrec :: Int -> ReadS UpdateOpsMetadataResponse
Prelude.Read, Int -> UpdateOpsMetadataResponse -> ShowS
[UpdateOpsMetadataResponse] -> ShowS
UpdateOpsMetadataResponse -> String
(Int -> UpdateOpsMetadataResponse -> ShowS)
-> (UpdateOpsMetadataResponse -> String)
-> ([UpdateOpsMetadataResponse] -> ShowS)
-> Show UpdateOpsMetadataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateOpsMetadataResponse] -> ShowS
$cshowList :: [UpdateOpsMetadataResponse] -> ShowS
show :: UpdateOpsMetadataResponse -> String
$cshow :: UpdateOpsMetadataResponse -> String
showsPrec :: Int -> UpdateOpsMetadataResponse -> ShowS
$cshowsPrec :: Int -> UpdateOpsMetadataResponse -> ShowS
Prelude.Show, (forall x.
 UpdateOpsMetadataResponse -> Rep UpdateOpsMetadataResponse x)
-> (forall x.
    Rep UpdateOpsMetadataResponse x -> UpdateOpsMetadataResponse)
-> Generic UpdateOpsMetadataResponse
forall x.
Rep UpdateOpsMetadataResponse x -> UpdateOpsMetadataResponse
forall x.
UpdateOpsMetadataResponse -> Rep UpdateOpsMetadataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateOpsMetadataResponse x -> UpdateOpsMetadataResponse
$cfrom :: forall x.
UpdateOpsMetadataResponse -> Rep UpdateOpsMetadataResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateOpsMetadataResponse' 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:
--
-- 'opsMetadataArn', 'updateOpsMetadataResponse_opsMetadataArn' - The Amazon Resource Name (ARN) of the OpsMetadata Object that was
-- updated.
--
-- 'httpStatus', 'updateOpsMetadataResponse_httpStatus' - The response's http status code.
newUpdateOpsMetadataResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateOpsMetadataResponse
newUpdateOpsMetadataResponse :: Int -> UpdateOpsMetadataResponse
newUpdateOpsMetadataResponse Int
pHttpStatus_ =
  UpdateOpsMetadataResponse' :: Maybe Text -> Int -> UpdateOpsMetadataResponse
UpdateOpsMetadataResponse'
    { $sel:opsMetadataArn:UpdateOpsMetadataResponse' :: Maybe Text
opsMetadataArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateOpsMetadataResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the OpsMetadata Object that was
-- updated.
updateOpsMetadataResponse_opsMetadataArn :: Lens.Lens' UpdateOpsMetadataResponse (Prelude.Maybe Prelude.Text)
updateOpsMetadataResponse_opsMetadataArn :: (Maybe Text -> f (Maybe Text))
-> UpdateOpsMetadataResponse -> f UpdateOpsMetadataResponse
updateOpsMetadataResponse_opsMetadataArn = (UpdateOpsMetadataResponse -> Maybe Text)
-> (UpdateOpsMetadataResponse
    -> Maybe Text -> UpdateOpsMetadataResponse)
-> Lens
     UpdateOpsMetadataResponse
     UpdateOpsMetadataResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOpsMetadataResponse' {Maybe Text
opsMetadataArn :: Maybe Text
$sel:opsMetadataArn:UpdateOpsMetadataResponse' :: UpdateOpsMetadataResponse -> Maybe Text
opsMetadataArn} -> Maybe Text
opsMetadataArn) (\s :: UpdateOpsMetadataResponse
s@UpdateOpsMetadataResponse' {} Maybe Text
a -> UpdateOpsMetadataResponse
s {$sel:opsMetadataArn:UpdateOpsMetadataResponse' :: Maybe Text
opsMetadataArn = Maybe Text
a} :: UpdateOpsMetadataResponse)

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

instance Prelude.NFData UpdateOpsMetadataResponse