{-# 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.ElastiCache.DescribeServiceUpdates
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns details of the service updates
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeServiceUpdates
  ( -- * Creating a Request
    DescribeServiceUpdates (..),
    newDescribeServiceUpdates,

    -- * Request Lenses
    describeServiceUpdates_marker,
    describeServiceUpdates_maxRecords,
    describeServiceUpdates_serviceUpdateName,
    describeServiceUpdates_serviceUpdateStatus,

    -- * Destructuring the Response
    DescribeServiceUpdatesResponse (..),
    newDescribeServiceUpdatesResponse,

    -- * Response Lenses
    describeServiceUpdatesResponse_marker,
    describeServiceUpdatesResponse_serviceUpdates,
    describeServiceUpdatesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeServiceUpdates' smart constructor.
data DescribeServiceUpdates = DescribeServiceUpdates'
  { -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by @MaxRecords@.
    DescribeServiceUpdates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response
    DescribeServiceUpdates -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The unique ID of the service update
    DescribeServiceUpdates -> Maybe Text
serviceUpdateName :: Prelude.Maybe Prelude.Text,
    -- | The status of the service update
    DescribeServiceUpdates -> Maybe [ServiceUpdateStatus]
serviceUpdateStatus :: Prelude.Maybe [ServiceUpdateStatus]
  }
  deriving (DescribeServiceUpdates -> DescribeServiceUpdates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServiceUpdates -> DescribeServiceUpdates -> Bool
$c/= :: DescribeServiceUpdates -> DescribeServiceUpdates -> Bool
== :: DescribeServiceUpdates -> DescribeServiceUpdates -> Bool
$c== :: DescribeServiceUpdates -> DescribeServiceUpdates -> Bool
Prelude.Eq, ReadPrec [DescribeServiceUpdates]
ReadPrec DescribeServiceUpdates
Int -> ReadS DescribeServiceUpdates
ReadS [DescribeServiceUpdates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServiceUpdates]
$creadListPrec :: ReadPrec [DescribeServiceUpdates]
readPrec :: ReadPrec DescribeServiceUpdates
$creadPrec :: ReadPrec DescribeServiceUpdates
readList :: ReadS [DescribeServiceUpdates]
$creadList :: ReadS [DescribeServiceUpdates]
readsPrec :: Int -> ReadS DescribeServiceUpdates
$creadsPrec :: Int -> ReadS DescribeServiceUpdates
Prelude.Read, Int -> DescribeServiceUpdates -> ShowS
[DescribeServiceUpdates] -> ShowS
DescribeServiceUpdates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServiceUpdates] -> ShowS
$cshowList :: [DescribeServiceUpdates] -> ShowS
show :: DescribeServiceUpdates -> String
$cshow :: DescribeServiceUpdates -> String
showsPrec :: Int -> DescribeServiceUpdates -> ShowS
$cshowsPrec :: Int -> DescribeServiceUpdates -> ShowS
Prelude.Show, forall x. Rep DescribeServiceUpdates x -> DescribeServiceUpdates
forall x. DescribeServiceUpdates -> Rep DescribeServiceUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeServiceUpdates x -> DescribeServiceUpdates
$cfrom :: forall x. DescribeServiceUpdates -> Rep DescribeServiceUpdates x
Prelude.Generic)

-- |
-- Create a value of 'DescribeServiceUpdates' 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:
--
-- 'marker', 'describeServiceUpdates_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeServiceUpdates_maxRecords' - The maximum number of records to include in the response
--
-- 'serviceUpdateName', 'describeServiceUpdates_serviceUpdateName' - The unique ID of the service update
--
-- 'serviceUpdateStatus', 'describeServiceUpdates_serviceUpdateStatus' - The status of the service update
newDescribeServiceUpdates ::
  DescribeServiceUpdates
newDescribeServiceUpdates :: DescribeServiceUpdates
newDescribeServiceUpdates =
  DescribeServiceUpdates'
    { $sel:marker:DescribeServiceUpdates' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeServiceUpdates' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateName:DescribeServiceUpdates' :: Maybe Text
serviceUpdateName = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdateStatus:DescribeServiceUpdates' :: Maybe [ServiceUpdateStatus]
serviceUpdateStatus = forall a. Maybe a
Prelude.Nothing
    }

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
describeServiceUpdates_marker :: Lens.Lens' DescribeServiceUpdates (Prelude.Maybe Prelude.Text)
describeServiceUpdates_marker :: Lens' DescribeServiceUpdates (Maybe Text)
describeServiceUpdates_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdates' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeServiceUpdates
s@DescribeServiceUpdates' {} Maybe Text
a -> DescribeServiceUpdates
s {$sel:marker:DescribeServiceUpdates' :: Maybe Text
marker = Maybe Text
a} :: DescribeServiceUpdates)

-- | The maximum number of records to include in the response
describeServiceUpdates_maxRecords :: Lens.Lens' DescribeServiceUpdates (Prelude.Maybe Prelude.Int)
describeServiceUpdates_maxRecords :: Lens' DescribeServiceUpdates (Maybe Int)
describeServiceUpdates_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdates' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeServiceUpdates
s@DescribeServiceUpdates' {} Maybe Int
a -> DescribeServiceUpdates
s {$sel:maxRecords:DescribeServiceUpdates' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeServiceUpdates)

-- | The unique ID of the service update
describeServiceUpdates_serviceUpdateName :: Lens.Lens' DescribeServiceUpdates (Prelude.Maybe Prelude.Text)
describeServiceUpdates_serviceUpdateName :: Lens' DescribeServiceUpdates (Maybe Text)
describeServiceUpdates_serviceUpdateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdates' {Maybe Text
serviceUpdateName :: Maybe Text
$sel:serviceUpdateName:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
serviceUpdateName} -> Maybe Text
serviceUpdateName) (\s :: DescribeServiceUpdates
s@DescribeServiceUpdates' {} Maybe Text
a -> DescribeServiceUpdates
s {$sel:serviceUpdateName:DescribeServiceUpdates' :: Maybe Text
serviceUpdateName = Maybe Text
a} :: DescribeServiceUpdates)

-- | The status of the service update
describeServiceUpdates_serviceUpdateStatus :: Lens.Lens' DescribeServiceUpdates (Prelude.Maybe [ServiceUpdateStatus])
describeServiceUpdates_serviceUpdateStatus :: Lens' DescribeServiceUpdates (Maybe [ServiceUpdateStatus])
describeServiceUpdates_serviceUpdateStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdates' {Maybe [ServiceUpdateStatus]
serviceUpdateStatus :: Maybe [ServiceUpdateStatus]
$sel:serviceUpdateStatus:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe [ServiceUpdateStatus]
serviceUpdateStatus} -> Maybe [ServiceUpdateStatus]
serviceUpdateStatus) (\s :: DescribeServiceUpdates
s@DescribeServiceUpdates' {} Maybe [ServiceUpdateStatus]
a -> DescribeServiceUpdates
s {$sel:serviceUpdateStatus:DescribeServiceUpdates' :: Maybe [ServiceUpdateStatus]
serviceUpdateStatus = Maybe [ServiceUpdateStatus]
a} :: DescribeServiceUpdates) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager DescribeServiceUpdates where
  page :: DescribeServiceUpdates
-> AWSResponse DescribeServiceUpdates
-> Maybe DescribeServiceUpdates
page DescribeServiceUpdates
rq AWSResponse DescribeServiceUpdates
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeServiceUpdates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeServiceUpdatesResponse (Maybe Text)
describeServiceUpdatesResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeServiceUpdates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeServiceUpdatesResponse (Maybe [ServiceUpdate])
describeServiceUpdatesResponse_serviceUpdates
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeServiceUpdates
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeServiceUpdates (Maybe Text)
describeServiceUpdates_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeServiceUpdates
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeServiceUpdatesResponse (Maybe Text)
describeServiceUpdatesResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeServiceUpdates where
  type
    AWSResponse DescribeServiceUpdates =
      DescribeServiceUpdatesResponse
  request :: (Service -> Service)
-> DescribeServiceUpdates -> Request DescribeServiceUpdates
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeServiceUpdates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeServiceUpdates)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeServiceUpdatesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [ServiceUpdate] -> Int -> DescribeServiceUpdatesResponse
DescribeServiceUpdatesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ServiceUpdates"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"ServiceUpdate")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeServiceUpdates where
  hashWithSalt :: Int -> DescribeServiceUpdates -> Int
hashWithSalt Int
_salt DescribeServiceUpdates' {Maybe Int
Maybe [ServiceUpdateStatus]
Maybe Text
serviceUpdateStatus :: Maybe [ServiceUpdateStatus]
serviceUpdateName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:serviceUpdateStatus:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe [ServiceUpdateStatus]
$sel:serviceUpdateName:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
$sel:maxRecords:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Int
$sel:marker:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceUpdateName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ServiceUpdateStatus]
serviceUpdateStatus

instance Prelude.NFData DescribeServiceUpdates where
  rnf :: DescribeServiceUpdates -> ()
rnf DescribeServiceUpdates' {Maybe Int
Maybe [ServiceUpdateStatus]
Maybe Text
serviceUpdateStatus :: Maybe [ServiceUpdateStatus]
serviceUpdateName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:serviceUpdateStatus:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe [ServiceUpdateStatus]
$sel:serviceUpdateName:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
$sel:maxRecords:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Int
$sel:marker:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceUpdateName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServiceUpdateStatus]
serviceUpdateStatus

instance Data.ToHeaders DescribeServiceUpdates where
  toHeaders :: DescribeServiceUpdates -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeServiceUpdates where
  toQuery :: DescribeServiceUpdates -> QueryString
toQuery DescribeServiceUpdates' {Maybe Int
Maybe [ServiceUpdateStatus]
Maybe Text
serviceUpdateStatus :: Maybe [ServiceUpdateStatus]
serviceUpdateName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:serviceUpdateStatus:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe [ServiceUpdateStatus]
$sel:serviceUpdateName:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
$sel:maxRecords:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Int
$sel:marker:DescribeServiceUpdates' :: DescribeServiceUpdates -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeServiceUpdates" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
        ByteString
"ServiceUpdateName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
serviceUpdateName,
        ByteString
"ServiceUpdateStatus"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServiceUpdateStatus]
serviceUpdateStatus
            )
      ]

-- | /See:/ 'newDescribeServiceUpdatesResponse' smart constructor.
data DescribeServiceUpdatesResponse = DescribeServiceUpdatesResponse'
  { -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by @MaxRecords@.
    DescribeServiceUpdatesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of service updates
    DescribeServiceUpdatesResponse -> Maybe [ServiceUpdate]
serviceUpdates :: Prelude.Maybe [ServiceUpdate],
    -- | The response's http status code.
    DescribeServiceUpdatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeServiceUpdatesResponse
-> DescribeServiceUpdatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServiceUpdatesResponse
-> DescribeServiceUpdatesResponse -> Bool
$c/= :: DescribeServiceUpdatesResponse
-> DescribeServiceUpdatesResponse -> Bool
== :: DescribeServiceUpdatesResponse
-> DescribeServiceUpdatesResponse -> Bool
$c== :: DescribeServiceUpdatesResponse
-> DescribeServiceUpdatesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeServiceUpdatesResponse]
ReadPrec DescribeServiceUpdatesResponse
Int -> ReadS DescribeServiceUpdatesResponse
ReadS [DescribeServiceUpdatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServiceUpdatesResponse]
$creadListPrec :: ReadPrec [DescribeServiceUpdatesResponse]
readPrec :: ReadPrec DescribeServiceUpdatesResponse
$creadPrec :: ReadPrec DescribeServiceUpdatesResponse
readList :: ReadS [DescribeServiceUpdatesResponse]
$creadList :: ReadS [DescribeServiceUpdatesResponse]
readsPrec :: Int -> ReadS DescribeServiceUpdatesResponse
$creadsPrec :: Int -> ReadS DescribeServiceUpdatesResponse
Prelude.Read, Int -> DescribeServiceUpdatesResponse -> ShowS
[DescribeServiceUpdatesResponse] -> ShowS
DescribeServiceUpdatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServiceUpdatesResponse] -> ShowS
$cshowList :: [DescribeServiceUpdatesResponse] -> ShowS
show :: DescribeServiceUpdatesResponse -> String
$cshow :: DescribeServiceUpdatesResponse -> String
showsPrec :: Int -> DescribeServiceUpdatesResponse -> ShowS
$cshowsPrec :: Int -> DescribeServiceUpdatesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeServiceUpdatesResponse x
-> DescribeServiceUpdatesResponse
forall x.
DescribeServiceUpdatesResponse
-> Rep DescribeServiceUpdatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeServiceUpdatesResponse x
-> DescribeServiceUpdatesResponse
$cfrom :: forall x.
DescribeServiceUpdatesResponse
-> Rep DescribeServiceUpdatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeServiceUpdatesResponse' 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:
--
-- 'marker', 'describeServiceUpdatesResponse_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
--
-- 'serviceUpdates', 'describeServiceUpdatesResponse_serviceUpdates' - A list of service updates
--
-- 'httpStatus', 'describeServiceUpdatesResponse_httpStatus' - The response's http status code.
newDescribeServiceUpdatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeServiceUpdatesResponse
newDescribeServiceUpdatesResponse :: Int -> DescribeServiceUpdatesResponse
newDescribeServiceUpdatesResponse Int
pHttpStatus_ =
  DescribeServiceUpdatesResponse'
    { $sel:marker:DescribeServiceUpdatesResponse' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:serviceUpdates:DescribeServiceUpdatesResponse' :: Maybe [ServiceUpdate]
serviceUpdates = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeServiceUpdatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
describeServiceUpdatesResponse_marker :: Lens.Lens' DescribeServiceUpdatesResponse (Prelude.Maybe Prelude.Text)
describeServiceUpdatesResponse_marker :: Lens' DescribeServiceUpdatesResponse (Maybe Text)
describeServiceUpdatesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdatesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeServiceUpdatesResponse' :: DescribeServiceUpdatesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeServiceUpdatesResponse
s@DescribeServiceUpdatesResponse' {} Maybe Text
a -> DescribeServiceUpdatesResponse
s {$sel:marker:DescribeServiceUpdatesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeServiceUpdatesResponse)

-- | A list of service updates
describeServiceUpdatesResponse_serviceUpdates :: Lens.Lens' DescribeServiceUpdatesResponse (Prelude.Maybe [ServiceUpdate])
describeServiceUpdatesResponse_serviceUpdates :: Lens' DescribeServiceUpdatesResponse (Maybe [ServiceUpdate])
describeServiceUpdatesResponse_serviceUpdates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceUpdatesResponse' {Maybe [ServiceUpdate]
serviceUpdates :: Maybe [ServiceUpdate]
$sel:serviceUpdates:DescribeServiceUpdatesResponse' :: DescribeServiceUpdatesResponse -> Maybe [ServiceUpdate]
serviceUpdates} -> Maybe [ServiceUpdate]
serviceUpdates) (\s :: DescribeServiceUpdatesResponse
s@DescribeServiceUpdatesResponse' {} Maybe [ServiceUpdate]
a -> DescribeServiceUpdatesResponse
s {$sel:serviceUpdates:DescribeServiceUpdatesResponse' :: Maybe [ServiceUpdate]
serviceUpdates = Maybe [ServiceUpdate]
a} :: DescribeServiceUpdatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeServiceUpdatesResponse
  where
  rnf :: DescribeServiceUpdatesResponse -> ()
rnf DescribeServiceUpdatesResponse' {Int
Maybe [ServiceUpdate]
Maybe Text
httpStatus :: Int
serviceUpdates :: Maybe [ServiceUpdate]
marker :: Maybe Text
$sel:httpStatus:DescribeServiceUpdatesResponse' :: DescribeServiceUpdatesResponse -> Int
$sel:serviceUpdates:DescribeServiceUpdatesResponse' :: DescribeServiceUpdatesResponse -> Maybe [ServiceUpdate]
$sel:marker:DescribeServiceUpdatesResponse' :: DescribeServiceUpdatesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServiceUpdate]
serviceUpdates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus