{-# 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.GetOpsMetadata
-- 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)
--
-- View operational metadata related to an application in Application
-- Manager.
module Amazonka.SSM.GetOpsMetadata
  ( -- * Creating a Request
    GetOpsMetadata (..),
    newGetOpsMetadata,

    -- * Request Lenses
    getOpsMetadata_nextToken,
    getOpsMetadata_maxResults,
    getOpsMetadata_opsMetadataArn,

    -- * Destructuring the Response
    GetOpsMetadataResponse (..),
    newGetOpsMetadataResponse,

    -- * Response Lenses
    getOpsMetadataResponse_resourceId,
    getOpsMetadataResponse_nextToken,
    getOpsMetadataResponse_metadata,
    getOpsMetadataResponse_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:/ 'newGetOpsMetadata' smart constructor.
data GetOpsMetadata = GetOpsMetadata'
  { -- | A token to start the list. Use this token to get the next set of
    -- results.
    GetOpsMetadata -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return for this call. The call also
    -- returns a token that you can specify in a subsequent call to get the
    -- next set of results.
    GetOpsMetadata -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of an OpsMetadata Object to view.
    GetOpsMetadata -> Text
opsMetadataArn :: Prelude.Text
  }
  deriving (GetOpsMetadata -> GetOpsMetadata -> Bool
(GetOpsMetadata -> GetOpsMetadata -> Bool)
-> (GetOpsMetadata -> GetOpsMetadata -> Bool) -> Eq GetOpsMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpsMetadata -> GetOpsMetadata -> Bool
$c/= :: GetOpsMetadata -> GetOpsMetadata -> Bool
== :: GetOpsMetadata -> GetOpsMetadata -> Bool
$c== :: GetOpsMetadata -> GetOpsMetadata -> Bool
Prelude.Eq, ReadPrec [GetOpsMetadata]
ReadPrec GetOpsMetadata
Int -> ReadS GetOpsMetadata
ReadS [GetOpsMetadata]
(Int -> ReadS GetOpsMetadata)
-> ReadS [GetOpsMetadata]
-> ReadPrec GetOpsMetadata
-> ReadPrec [GetOpsMetadata]
-> Read GetOpsMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpsMetadata]
$creadListPrec :: ReadPrec [GetOpsMetadata]
readPrec :: ReadPrec GetOpsMetadata
$creadPrec :: ReadPrec GetOpsMetadata
readList :: ReadS [GetOpsMetadata]
$creadList :: ReadS [GetOpsMetadata]
readsPrec :: Int -> ReadS GetOpsMetadata
$creadsPrec :: Int -> ReadS GetOpsMetadata
Prelude.Read, Int -> GetOpsMetadata -> ShowS
[GetOpsMetadata] -> ShowS
GetOpsMetadata -> String
(Int -> GetOpsMetadata -> ShowS)
-> (GetOpsMetadata -> String)
-> ([GetOpsMetadata] -> ShowS)
-> Show GetOpsMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpsMetadata] -> ShowS
$cshowList :: [GetOpsMetadata] -> ShowS
show :: GetOpsMetadata -> String
$cshow :: GetOpsMetadata -> String
showsPrec :: Int -> GetOpsMetadata -> ShowS
$cshowsPrec :: Int -> GetOpsMetadata -> ShowS
Prelude.Show, (forall x. GetOpsMetadata -> Rep GetOpsMetadata x)
-> (forall x. Rep GetOpsMetadata x -> GetOpsMetadata)
-> Generic GetOpsMetadata
forall x. Rep GetOpsMetadata x -> GetOpsMetadata
forall x. GetOpsMetadata -> Rep GetOpsMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOpsMetadata x -> GetOpsMetadata
$cfrom :: forall x. GetOpsMetadata -> Rep GetOpsMetadata x
Prelude.Generic)

-- |
-- Create a value of 'GetOpsMetadata' 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:
--
-- 'nextToken', 'getOpsMetadata_nextToken' - A token to start the list. Use this token to get the next set of
-- results.
--
-- 'maxResults', 'getOpsMetadata_maxResults' - The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
--
-- 'opsMetadataArn', 'getOpsMetadata_opsMetadataArn' - The Amazon Resource Name (ARN) of an OpsMetadata Object to view.
newGetOpsMetadata ::
  -- | 'opsMetadataArn'
  Prelude.Text ->
  GetOpsMetadata
newGetOpsMetadata :: Text -> GetOpsMetadata
newGetOpsMetadata Text
pOpsMetadataArn_ =
  GetOpsMetadata' :: Maybe Text -> Maybe Natural -> Text -> GetOpsMetadata
GetOpsMetadata'
    { $sel:nextToken:GetOpsMetadata' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetOpsMetadata' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:opsMetadataArn:GetOpsMetadata' :: Text
opsMetadataArn = Text
pOpsMetadataArn_
    }

-- | A token to start the list. Use this token to get the next set of
-- results.
getOpsMetadata_nextToken :: Lens.Lens' GetOpsMetadata (Prelude.Maybe Prelude.Text)
getOpsMetadata_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetOpsMetadata -> f GetOpsMetadata
getOpsMetadata_nextToken = (GetOpsMetadata -> Maybe Text)
-> (GetOpsMetadata -> Maybe Text -> GetOpsMetadata)
-> Lens GetOpsMetadata GetOpsMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadata' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOpsMetadata' :: GetOpsMetadata -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetOpsMetadata
s@GetOpsMetadata' {} Maybe Text
a -> GetOpsMetadata
s {$sel:nextToken:GetOpsMetadata' :: Maybe Text
nextToken = Maybe Text
a} :: GetOpsMetadata)

-- | The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
getOpsMetadata_maxResults :: Lens.Lens' GetOpsMetadata (Prelude.Maybe Prelude.Natural)
getOpsMetadata_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetOpsMetadata -> f GetOpsMetadata
getOpsMetadata_maxResults = (GetOpsMetadata -> Maybe Natural)
-> (GetOpsMetadata -> Maybe Natural -> GetOpsMetadata)
-> Lens
     GetOpsMetadata GetOpsMetadata (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadata' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetOpsMetadata' :: GetOpsMetadata -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetOpsMetadata
s@GetOpsMetadata' {} Maybe Natural
a -> GetOpsMetadata
s {$sel:maxResults:GetOpsMetadata' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetOpsMetadata)

-- | The Amazon Resource Name (ARN) of an OpsMetadata Object to view.
getOpsMetadata_opsMetadataArn :: Lens.Lens' GetOpsMetadata Prelude.Text
getOpsMetadata_opsMetadataArn :: (Text -> f Text) -> GetOpsMetadata -> f GetOpsMetadata
getOpsMetadata_opsMetadataArn = (GetOpsMetadata -> Text)
-> (GetOpsMetadata -> Text -> GetOpsMetadata)
-> Lens GetOpsMetadata GetOpsMetadata Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadata' {Text
opsMetadataArn :: Text
$sel:opsMetadataArn:GetOpsMetadata' :: GetOpsMetadata -> Text
opsMetadataArn} -> Text
opsMetadataArn) (\s :: GetOpsMetadata
s@GetOpsMetadata' {} Text
a -> GetOpsMetadata
s {$sel:opsMetadataArn:GetOpsMetadata' :: Text
opsMetadataArn = Text
a} :: GetOpsMetadata)

instance Core.AWSRequest GetOpsMetadata where
  type
    AWSResponse GetOpsMetadata =
      GetOpsMetadataResponse
  request :: GetOpsMetadata -> Request GetOpsMetadata
request = Service -> GetOpsMetadata -> Request GetOpsMetadata
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetOpsMetadata
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetOpsMetadata)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetOpsMetadata))
-> Logger
-> Service
-> Proxy GetOpsMetadata
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetOpsMetadata)))
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 (HashMap Text MetadataValue)
-> Int
-> GetOpsMetadataResponse
GetOpsMetadataResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text MetadataValue)
 -> Int
 -> GetOpsMetadataResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text MetadataValue)
      -> Int
      -> GetOpsMetadataResponse)
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
"ResourceId")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text MetadataValue)
   -> Int
   -> GetOpsMetadataResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text MetadataValue)
      -> Int -> GetOpsMetadataResponse)
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
"NextToken")
            Either
  String
  (Maybe (HashMap Text MetadataValue)
   -> Int -> GetOpsMetadataResponse)
-> Either String (Maybe (HashMap Text MetadataValue))
-> Either String (Int -> GetOpsMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text MetadataValue)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Metadata" Either String (Maybe (Maybe (HashMap Text MetadataValue)))
-> Maybe (HashMap Text MetadataValue)
-> Either String (Maybe (HashMap Text MetadataValue))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text MetadataValue)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetOpsMetadataResponse)
-> Either String Int -> Either String GetOpsMetadataResponse
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 GetOpsMetadata

instance Prelude.NFData GetOpsMetadata

instance Core.ToHeaders GetOpsMetadata where
  toHeaders :: GetOpsMetadata -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetOpsMetadata -> 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.GetOpsMetadata" :: 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 GetOpsMetadata where
  toJSON :: GetOpsMetadata -> Value
toJSON GetOpsMetadata' {Maybe Natural
Maybe Text
Text
opsMetadataArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:opsMetadataArn:GetOpsMetadata' :: GetOpsMetadata -> Text
$sel:maxResults:GetOpsMetadata' :: GetOpsMetadata -> Maybe Natural
$sel:nextToken:GetOpsMetadata' :: GetOpsMetadata -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" 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
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            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 GetOpsMetadata where
  toPath :: GetOpsMetadata -> ByteString
toPath = ByteString -> GetOpsMetadata -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newGetOpsMetadataResponse' smart constructor.
data GetOpsMetadataResponse = GetOpsMetadataResponse'
  { -- | The resource ID of the Application Manager application.
    GetOpsMetadataResponse -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of items to return. Use this token to get the
    -- next set of results.
    GetOpsMetadataResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | OpsMetadata for an Application Manager application.
    GetOpsMetadataResponse -> Maybe (HashMap Text MetadataValue)
metadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text MetadataValue),
    -- | The response's http status code.
    GetOpsMetadataResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool
(GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool)
-> (GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool)
-> Eq GetOpsMetadataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool
$c/= :: GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool
== :: GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool
$c== :: GetOpsMetadataResponse -> GetOpsMetadataResponse -> Bool
Prelude.Eq, ReadPrec [GetOpsMetadataResponse]
ReadPrec GetOpsMetadataResponse
Int -> ReadS GetOpsMetadataResponse
ReadS [GetOpsMetadataResponse]
(Int -> ReadS GetOpsMetadataResponse)
-> ReadS [GetOpsMetadataResponse]
-> ReadPrec GetOpsMetadataResponse
-> ReadPrec [GetOpsMetadataResponse]
-> Read GetOpsMetadataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpsMetadataResponse]
$creadListPrec :: ReadPrec [GetOpsMetadataResponse]
readPrec :: ReadPrec GetOpsMetadataResponse
$creadPrec :: ReadPrec GetOpsMetadataResponse
readList :: ReadS [GetOpsMetadataResponse]
$creadList :: ReadS [GetOpsMetadataResponse]
readsPrec :: Int -> ReadS GetOpsMetadataResponse
$creadsPrec :: Int -> ReadS GetOpsMetadataResponse
Prelude.Read, Int -> GetOpsMetadataResponse -> ShowS
[GetOpsMetadataResponse] -> ShowS
GetOpsMetadataResponse -> String
(Int -> GetOpsMetadataResponse -> ShowS)
-> (GetOpsMetadataResponse -> String)
-> ([GetOpsMetadataResponse] -> ShowS)
-> Show GetOpsMetadataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpsMetadataResponse] -> ShowS
$cshowList :: [GetOpsMetadataResponse] -> ShowS
show :: GetOpsMetadataResponse -> String
$cshow :: GetOpsMetadataResponse -> String
showsPrec :: Int -> GetOpsMetadataResponse -> ShowS
$cshowsPrec :: Int -> GetOpsMetadataResponse -> ShowS
Prelude.Show, (forall x. GetOpsMetadataResponse -> Rep GetOpsMetadataResponse x)
-> (forall x.
    Rep GetOpsMetadataResponse x -> GetOpsMetadataResponse)
-> Generic GetOpsMetadataResponse
forall x. Rep GetOpsMetadataResponse x -> GetOpsMetadataResponse
forall x. GetOpsMetadataResponse -> Rep GetOpsMetadataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOpsMetadataResponse x -> GetOpsMetadataResponse
$cfrom :: forall x. GetOpsMetadataResponse -> Rep GetOpsMetadataResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetOpsMetadataResponse' 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:
--
-- 'resourceId', 'getOpsMetadataResponse_resourceId' - The resource ID of the Application Manager application.
--
-- 'nextToken', 'getOpsMetadataResponse_nextToken' - The token for the next set of items to return. Use this token to get the
-- next set of results.
--
-- 'metadata', 'getOpsMetadataResponse_metadata' - OpsMetadata for an Application Manager application.
--
-- 'httpStatus', 'getOpsMetadataResponse_httpStatus' - The response's http status code.
newGetOpsMetadataResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOpsMetadataResponse
newGetOpsMetadataResponse :: Int -> GetOpsMetadataResponse
newGetOpsMetadataResponse Int
pHttpStatus_ =
  GetOpsMetadataResponse' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text MetadataValue)
-> Int
-> GetOpsMetadataResponse
GetOpsMetadataResponse'
    { $sel:resourceId:GetOpsMetadataResponse' :: Maybe Text
resourceId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetOpsMetadataResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:GetOpsMetadataResponse' :: Maybe (HashMap Text MetadataValue)
metadata = Maybe (HashMap Text MetadataValue)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetOpsMetadataResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The resource ID of the Application Manager application.
getOpsMetadataResponse_resourceId :: Lens.Lens' GetOpsMetadataResponse (Prelude.Maybe Prelude.Text)
getOpsMetadataResponse_resourceId :: (Maybe Text -> f (Maybe Text))
-> GetOpsMetadataResponse -> f GetOpsMetadataResponse
getOpsMetadataResponse_resourceId = (GetOpsMetadataResponse -> Maybe Text)
-> (GetOpsMetadataResponse -> Maybe Text -> GetOpsMetadataResponse)
-> Lens
     GetOpsMetadataResponse
     GetOpsMetadataResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadataResponse' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:GetOpsMetadataResponse' :: GetOpsMetadataResponse -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: GetOpsMetadataResponse
s@GetOpsMetadataResponse' {} Maybe Text
a -> GetOpsMetadataResponse
s {$sel:resourceId:GetOpsMetadataResponse' :: Maybe Text
resourceId = Maybe Text
a} :: GetOpsMetadataResponse)

-- | The token for the next set of items to return. Use this token to get the
-- next set of results.
getOpsMetadataResponse_nextToken :: Lens.Lens' GetOpsMetadataResponse (Prelude.Maybe Prelude.Text)
getOpsMetadataResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetOpsMetadataResponse -> f GetOpsMetadataResponse
getOpsMetadataResponse_nextToken = (GetOpsMetadataResponse -> Maybe Text)
-> (GetOpsMetadataResponse -> Maybe Text -> GetOpsMetadataResponse)
-> Lens
     GetOpsMetadataResponse
     GetOpsMetadataResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadataResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOpsMetadataResponse' :: GetOpsMetadataResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetOpsMetadataResponse
s@GetOpsMetadataResponse' {} Maybe Text
a -> GetOpsMetadataResponse
s {$sel:nextToken:GetOpsMetadataResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetOpsMetadataResponse)

-- | OpsMetadata for an Application Manager application.
getOpsMetadataResponse_metadata :: Lens.Lens' GetOpsMetadataResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text MetadataValue))
getOpsMetadataResponse_metadata :: (Maybe (HashMap Text MetadataValue)
 -> f (Maybe (HashMap Text MetadataValue)))
-> GetOpsMetadataResponse -> f GetOpsMetadataResponse
getOpsMetadataResponse_metadata = (GetOpsMetadataResponse -> Maybe (HashMap Text MetadataValue))
-> (GetOpsMetadataResponse
    -> Maybe (HashMap Text MetadataValue) -> GetOpsMetadataResponse)
-> Lens
     GetOpsMetadataResponse
     GetOpsMetadataResponse
     (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 (\GetOpsMetadataResponse' {Maybe (HashMap Text MetadataValue)
metadata :: Maybe (HashMap Text MetadataValue)
$sel:metadata:GetOpsMetadataResponse' :: GetOpsMetadataResponse -> Maybe (HashMap Text MetadataValue)
metadata} -> Maybe (HashMap Text MetadataValue)
metadata) (\s :: GetOpsMetadataResponse
s@GetOpsMetadataResponse' {} Maybe (HashMap Text MetadataValue)
a -> GetOpsMetadataResponse
s {$sel:metadata:GetOpsMetadataResponse' :: Maybe (HashMap Text MetadataValue)
metadata = Maybe (HashMap Text MetadataValue)
a} :: GetOpsMetadataResponse) ((Maybe (HashMap Text MetadataValue)
  -> f (Maybe (HashMap Text MetadataValue)))
 -> GetOpsMetadataResponse -> f GetOpsMetadataResponse)
-> ((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)))
-> GetOpsMetadataResponse
-> f GetOpsMetadataResponse
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 response's http status code.
getOpsMetadataResponse_httpStatus :: Lens.Lens' GetOpsMetadataResponse Prelude.Int
getOpsMetadataResponse_httpStatus :: (Int -> f Int)
-> GetOpsMetadataResponse -> f GetOpsMetadataResponse
getOpsMetadataResponse_httpStatus = (GetOpsMetadataResponse -> Int)
-> (GetOpsMetadataResponse -> Int -> GetOpsMetadataResponse)
-> Lens GetOpsMetadataResponse GetOpsMetadataResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpsMetadataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOpsMetadataResponse' :: GetOpsMetadataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOpsMetadataResponse
s@GetOpsMetadataResponse' {} Int
a -> GetOpsMetadataResponse
s {$sel:httpStatus:GetOpsMetadataResponse' :: Int
httpStatus = Int
a} :: GetOpsMetadataResponse)

instance Prelude.NFData GetOpsMetadataResponse