{-# 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.Lightsail.GetOperationsForResource
-- 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)
--
-- Gets operations for a specific resource (e.g., an instance or a static
-- IP).
module Amazonka.Lightsail.GetOperationsForResource
  ( -- * Creating a Request
    GetOperationsForResource (..),
    newGetOperationsForResource,

    -- * Request Lenses
    getOperationsForResource_pageToken,
    getOperationsForResource_resourceName,

    -- * Destructuring the Response
    GetOperationsForResourceResponse (..),
    newGetOperationsForResourceResponse,

    -- * Response Lenses
    getOperationsForResourceResponse_nextPageCount,
    getOperationsForResourceResponse_nextPageToken,
    getOperationsForResourceResponse_operations,
    getOperationsForResourceResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetOperationsForResource' smart constructor.
data GetOperationsForResource = GetOperationsForResource'
  { -- | The token to advance to the next page of results from your request.
    --
    -- To get a page token, perform an initial @GetOperationsForResource@
    -- request. If your results are paginated, the response will return a next
    -- page token that you can specify as the page token in a subsequent
    -- request.
    GetOperationsForResource -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the resource for which you are requesting information.
    GetOperationsForResource -> Text
resourceName :: Prelude.Text
  }
  deriving (GetOperationsForResource -> GetOperationsForResource -> Bool
(GetOperationsForResource -> GetOperationsForResource -> Bool)
-> (GetOperationsForResource -> GetOperationsForResource -> Bool)
-> Eq GetOperationsForResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOperationsForResource -> GetOperationsForResource -> Bool
$c/= :: GetOperationsForResource -> GetOperationsForResource -> Bool
== :: GetOperationsForResource -> GetOperationsForResource -> Bool
$c== :: GetOperationsForResource -> GetOperationsForResource -> Bool
Prelude.Eq, ReadPrec [GetOperationsForResource]
ReadPrec GetOperationsForResource
Int -> ReadS GetOperationsForResource
ReadS [GetOperationsForResource]
(Int -> ReadS GetOperationsForResource)
-> ReadS [GetOperationsForResource]
-> ReadPrec GetOperationsForResource
-> ReadPrec [GetOperationsForResource]
-> Read GetOperationsForResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOperationsForResource]
$creadListPrec :: ReadPrec [GetOperationsForResource]
readPrec :: ReadPrec GetOperationsForResource
$creadPrec :: ReadPrec GetOperationsForResource
readList :: ReadS [GetOperationsForResource]
$creadList :: ReadS [GetOperationsForResource]
readsPrec :: Int -> ReadS GetOperationsForResource
$creadsPrec :: Int -> ReadS GetOperationsForResource
Prelude.Read, Int -> GetOperationsForResource -> ShowS
[GetOperationsForResource] -> ShowS
GetOperationsForResource -> String
(Int -> GetOperationsForResource -> ShowS)
-> (GetOperationsForResource -> String)
-> ([GetOperationsForResource] -> ShowS)
-> Show GetOperationsForResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOperationsForResource] -> ShowS
$cshowList :: [GetOperationsForResource] -> ShowS
show :: GetOperationsForResource -> String
$cshow :: GetOperationsForResource -> String
showsPrec :: Int -> GetOperationsForResource -> ShowS
$cshowsPrec :: Int -> GetOperationsForResource -> ShowS
Prelude.Show, (forall x.
 GetOperationsForResource -> Rep GetOperationsForResource x)
-> (forall x.
    Rep GetOperationsForResource x -> GetOperationsForResource)
-> Generic GetOperationsForResource
forall x.
Rep GetOperationsForResource x -> GetOperationsForResource
forall x.
GetOperationsForResource -> Rep GetOperationsForResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOperationsForResource x -> GetOperationsForResource
$cfrom :: forall x.
GetOperationsForResource -> Rep GetOperationsForResource x
Prelude.Generic)

-- |
-- Create a value of 'GetOperationsForResource' 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:
--
-- 'pageToken', 'getOperationsForResource_pageToken' - The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetOperationsForResource@
-- request. If your results are paginated, the response will return a next
-- page token that you can specify as the page token in a subsequent
-- request.
--
-- 'resourceName', 'getOperationsForResource_resourceName' - The name of the resource for which you are requesting information.
newGetOperationsForResource ::
  -- | 'resourceName'
  Prelude.Text ->
  GetOperationsForResource
newGetOperationsForResource :: Text -> GetOperationsForResource
newGetOperationsForResource Text
pResourceName_ =
  GetOperationsForResource' :: Maybe Text -> Text -> GetOperationsForResource
GetOperationsForResource'
    { $sel:pageToken:GetOperationsForResource' :: Maybe Text
pageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceName:GetOperationsForResource' :: Text
resourceName = Text
pResourceName_
    }

-- | The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetOperationsForResource@
-- request. If your results are paginated, the response will return a next
-- page token that you can specify as the page token in a subsequent
-- request.
getOperationsForResource_pageToken :: Lens.Lens' GetOperationsForResource (Prelude.Maybe Prelude.Text)
getOperationsForResource_pageToken :: (Maybe Text -> f (Maybe Text))
-> GetOperationsForResource -> f GetOperationsForResource
getOperationsForResource_pageToken = (GetOperationsForResource -> Maybe Text)
-> (GetOperationsForResource
    -> Maybe Text -> GetOperationsForResource)
-> Lens
     GetOperationsForResource
     GetOperationsForResource
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationsForResource' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetOperationsForResource' :: GetOperationsForResource -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: GetOperationsForResource
s@GetOperationsForResource' {} Maybe Text
a -> GetOperationsForResource
s {$sel:pageToken:GetOperationsForResource' :: Maybe Text
pageToken = Maybe Text
a} :: GetOperationsForResource)

-- | The name of the resource for which you are requesting information.
getOperationsForResource_resourceName :: Lens.Lens' GetOperationsForResource Prelude.Text
getOperationsForResource_resourceName :: (Text -> f Text)
-> GetOperationsForResource -> f GetOperationsForResource
getOperationsForResource_resourceName = (GetOperationsForResource -> Text)
-> (GetOperationsForResource -> Text -> GetOperationsForResource)
-> Lens GetOperationsForResource GetOperationsForResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationsForResource' {Text
resourceName :: Text
$sel:resourceName:GetOperationsForResource' :: GetOperationsForResource -> Text
resourceName} -> Text
resourceName) (\s :: GetOperationsForResource
s@GetOperationsForResource' {} Text
a -> GetOperationsForResource
s {$sel:resourceName:GetOperationsForResource' :: Text
resourceName = Text
a} :: GetOperationsForResource)

instance Core.AWSRequest GetOperationsForResource where
  type
    AWSResponse GetOperationsForResource =
      GetOperationsForResourceResponse
  request :: GetOperationsForResource -> Request GetOperationsForResource
request = Service
-> GetOperationsForResource -> Request GetOperationsForResource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetOperationsForResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOperationsForResource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetOperationsForResource))
-> Logger
-> Service
-> Proxy GetOperationsForResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOperationsForResource)))
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 [Operation]
-> Int
-> GetOperationsForResourceResponse
GetOperationsForResourceResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [Operation]
 -> Int
 -> GetOperationsForResourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Operation] -> Int -> GetOperationsForResourceResponse)
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
"nextPageCount")
            Either
  String
  (Maybe Text
   -> Maybe [Operation] -> Int -> GetOperationsForResourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Operation] -> Int -> GetOperationsForResourceResponse)
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
"nextPageToken")
            Either
  String
  (Maybe [Operation] -> Int -> GetOperationsForResourceResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> GetOperationsForResourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetOperationsForResourceResponse)
-> Either String Int
-> Either String GetOperationsForResourceResponse
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 GetOperationsForResource

instance Prelude.NFData GetOperationsForResource

instance Core.ToHeaders GetOperationsForResource where
  toHeaders :: GetOperationsForResource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetOperationsForResource -> 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
"Lightsail_20161128.GetOperationsForResource" ::
                          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 GetOperationsForResource where
  toJSON :: GetOperationsForResource -> Value
toJSON GetOperationsForResource' {Maybe Text
Text
resourceName :: Text
pageToken :: Maybe Text
$sel:resourceName:GetOperationsForResource' :: GetOperationsForResource -> Text
$sel:pageToken:GetOperationsForResource' :: GetOperationsForResource -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"pageToken" 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
pageToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"resourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceName)
          ]
      )

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

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

-- | /See:/ 'newGetOperationsForResourceResponse' smart constructor.
data GetOperationsForResourceResponse = GetOperationsForResourceResponse'
  { -- | (Deprecated) Returns the number of pages of results that remain.
    --
    -- In releases prior to June 12, 2017, this parameter returned @null@ by
    -- the API. It is now deprecated, and the API returns the @next page token@
    -- parameter instead.
    GetOperationsForResourceResponse -> Maybe Text
nextPageCount :: Prelude.Maybe Prelude.Text,
    -- | The token to advance to the next page of results from your request.
    --
    -- A next page token is not returned if there are no more results to
    -- display.
    --
    -- To get the next page of results, perform another
    -- @GetOperationsForResource@ request and specify the next page token using
    -- the @pageToken@ parameter.
    GetOperationsForResourceResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | An array of objects that describe the result of the action, such as the
    -- status of the request, the timestamp of the request, and the resources
    -- affected by the request.
    GetOperationsForResourceResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    GetOperationsForResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetOperationsForResourceResponse
-> GetOperationsForResourceResponse -> Bool
(GetOperationsForResourceResponse
 -> GetOperationsForResourceResponse -> Bool)
-> (GetOperationsForResourceResponse
    -> GetOperationsForResourceResponse -> Bool)
-> Eq GetOperationsForResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOperationsForResourceResponse
-> GetOperationsForResourceResponse -> Bool
$c/= :: GetOperationsForResourceResponse
-> GetOperationsForResourceResponse -> Bool
== :: GetOperationsForResourceResponse
-> GetOperationsForResourceResponse -> Bool
$c== :: GetOperationsForResourceResponse
-> GetOperationsForResourceResponse -> Bool
Prelude.Eq, ReadPrec [GetOperationsForResourceResponse]
ReadPrec GetOperationsForResourceResponse
Int -> ReadS GetOperationsForResourceResponse
ReadS [GetOperationsForResourceResponse]
(Int -> ReadS GetOperationsForResourceResponse)
-> ReadS [GetOperationsForResourceResponse]
-> ReadPrec GetOperationsForResourceResponse
-> ReadPrec [GetOperationsForResourceResponse]
-> Read GetOperationsForResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOperationsForResourceResponse]
$creadListPrec :: ReadPrec [GetOperationsForResourceResponse]
readPrec :: ReadPrec GetOperationsForResourceResponse
$creadPrec :: ReadPrec GetOperationsForResourceResponse
readList :: ReadS [GetOperationsForResourceResponse]
$creadList :: ReadS [GetOperationsForResourceResponse]
readsPrec :: Int -> ReadS GetOperationsForResourceResponse
$creadsPrec :: Int -> ReadS GetOperationsForResourceResponse
Prelude.Read, Int -> GetOperationsForResourceResponse -> ShowS
[GetOperationsForResourceResponse] -> ShowS
GetOperationsForResourceResponse -> String
(Int -> GetOperationsForResourceResponse -> ShowS)
-> (GetOperationsForResourceResponse -> String)
-> ([GetOperationsForResourceResponse] -> ShowS)
-> Show GetOperationsForResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOperationsForResourceResponse] -> ShowS
$cshowList :: [GetOperationsForResourceResponse] -> ShowS
show :: GetOperationsForResourceResponse -> String
$cshow :: GetOperationsForResourceResponse -> String
showsPrec :: Int -> GetOperationsForResourceResponse -> ShowS
$cshowsPrec :: Int -> GetOperationsForResourceResponse -> ShowS
Prelude.Show, (forall x.
 GetOperationsForResourceResponse
 -> Rep GetOperationsForResourceResponse x)
-> (forall x.
    Rep GetOperationsForResourceResponse x
    -> GetOperationsForResourceResponse)
-> Generic GetOperationsForResourceResponse
forall x.
Rep GetOperationsForResourceResponse x
-> GetOperationsForResourceResponse
forall x.
GetOperationsForResourceResponse
-> Rep GetOperationsForResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOperationsForResourceResponse x
-> GetOperationsForResourceResponse
$cfrom :: forall x.
GetOperationsForResourceResponse
-> Rep GetOperationsForResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetOperationsForResourceResponse' 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:
--
-- 'nextPageCount', 'getOperationsForResourceResponse_nextPageCount' - (Deprecated) Returns the number of pages of results that remain.
--
-- In releases prior to June 12, 2017, this parameter returned @null@ by
-- the API. It is now deprecated, and the API returns the @next page token@
-- parameter instead.
--
-- 'nextPageToken', 'getOperationsForResourceResponse_nextPageToken' - The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetOperationsForResource@ request and specify the next page token using
-- the @pageToken@ parameter.
--
-- 'operations', 'getOperationsForResourceResponse_operations' - An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- 'httpStatus', 'getOperationsForResourceResponse_httpStatus' - The response's http status code.
newGetOperationsForResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOperationsForResourceResponse
newGetOperationsForResourceResponse :: Int -> GetOperationsForResourceResponse
newGetOperationsForResourceResponse Int
pHttpStatus_ =
  GetOperationsForResourceResponse' :: Maybe Text
-> Maybe Text
-> Maybe [Operation]
-> Int
-> GetOperationsForResourceResponse
GetOperationsForResourceResponse'
    { $sel:nextPageCount:GetOperationsForResourceResponse' :: Maybe Text
nextPageCount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextPageToken:GetOperationsForResourceResponse' :: Maybe Text
nextPageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operations:GetOperationsForResourceResponse' :: Maybe [Operation]
operations = Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetOperationsForResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | (Deprecated) Returns the number of pages of results that remain.
--
-- In releases prior to June 12, 2017, this parameter returned @null@ by
-- the API. It is now deprecated, and the API returns the @next page token@
-- parameter instead.
getOperationsForResourceResponse_nextPageCount :: Lens.Lens' GetOperationsForResourceResponse (Prelude.Maybe Prelude.Text)
getOperationsForResourceResponse_nextPageCount :: (Maybe Text -> f (Maybe Text))
-> GetOperationsForResourceResponse
-> f GetOperationsForResourceResponse
getOperationsForResourceResponse_nextPageCount = (GetOperationsForResourceResponse -> Maybe Text)
-> (GetOperationsForResourceResponse
    -> Maybe Text -> GetOperationsForResourceResponse)
-> Lens
     GetOperationsForResourceResponse
     GetOperationsForResourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationsForResourceResponse' {Maybe Text
nextPageCount :: Maybe Text
$sel:nextPageCount:GetOperationsForResourceResponse' :: GetOperationsForResourceResponse -> Maybe Text
nextPageCount} -> Maybe Text
nextPageCount) (\s :: GetOperationsForResourceResponse
s@GetOperationsForResourceResponse' {} Maybe Text
a -> GetOperationsForResourceResponse
s {$sel:nextPageCount:GetOperationsForResourceResponse' :: Maybe Text
nextPageCount = Maybe Text
a} :: GetOperationsForResourceResponse)

-- | The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetOperationsForResource@ request and specify the next page token using
-- the @pageToken@ parameter.
getOperationsForResourceResponse_nextPageToken :: Lens.Lens' GetOperationsForResourceResponse (Prelude.Maybe Prelude.Text)
getOperationsForResourceResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetOperationsForResourceResponse
-> f GetOperationsForResourceResponse
getOperationsForResourceResponse_nextPageToken = (GetOperationsForResourceResponse -> Maybe Text)
-> (GetOperationsForResourceResponse
    -> Maybe Text -> GetOperationsForResourceResponse)
-> Lens
     GetOperationsForResourceResponse
     GetOperationsForResourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationsForResourceResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetOperationsForResourceResponse' :: GetOperationsForResourceResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetOperationsForResourceResponse
s@GetOperationsForResourceResponse' {} Maybe Text
a -> GetOperationsForResourceResponse
s {$sel:nextPageToken:GetOperationsForResourceResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetOperationsForResourceResponse)

-- | An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
getOperationsForResourceResponse_operations :: Lens.Lens' GetOperationsForResourceResponse (Prelude.Maybe [Operation])
getOperationsForResourceResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> GetOperationsForResourceResponse
-> f GetOperationsForResourceResponse
getOperationsForResourceResponse_operations = (GetOperationsForResourceResponse -> Maybe [Operation])
-> (GetOperationsForResourceResponse
    -> Maybe [Operation] -> GetOperationsForResourceResponse)
-> Lens
     GetOperationsForResourceResponse
     GetOperationsForResourceResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationsForResourceResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:GetOperationsForResourceResponse' :: GetOperationsForResourceResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: GetOperationsForResourceResponse
s@GetOperationsForResourceResponse' {} Maybe [Operation]
a -> GetOperationsForResourceResponse
s {$sel:operations:GetOperationsForResourceResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: GetOperationsForResourceResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> GetOperationsForResourceResponse
 -> f GetOperationsForResourceResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> GetOperationsForResourceResponse
-> f GetOperationsForResourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
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 [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetOperationsForResourceResponse