{-# 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.EKS.ListFargateProfiles
-- 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)
--
-- Lists the Fargate profiles associated with the specified cluster in your
-- Amazon Web Services account in the specified Region.
--
-- This operation returns paginated results.
module Amazonka.EKS.ListFargateProfiles
  ( -- * Creating a Request
    ListFargateProfiles (..),
    newListFargateProfiles,

    -- * Request Lenses
    listFargateProfiles_nextToken,
    listFargateProfiles_maxResults,
    listFargateProfiles_clusterName,

    -- * Destructuring the Response
    ListFargateProfilesResponse (..),
    newListFargateProfilesResponse,

    -- * Response Lenses
    listFargateProfilesResponse_nextToken,
    listFargateProfilesResponse_fargateProfileNames,
    listFargateProfilesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListFargateProfiles' smart constructor.
data ListFargateProfiles = ListFargateProfiles'
  { -- | The @nextToken@ value returned from a previous paginated
    -- @ListFargateProfiles@ request where @maxResults@ was used and the
    -- results exceeded the value of that parameter. Pagination continues from
    -- the end of the previous results that returned the @nextToken@ value.
    ListFargateProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of Fargate profile results returned by
    -- @ListFargateProfiles@ in paginated output. When you use this parameter,
    -- @ListFargateProfiles@ returns only @maxResults@ results in a single page
    -- along with a @nextToken@ response element. You can see the remaining
    -- results of the initial request by sending another @ListFargateProfiles@
    -- request with the returned @nextToken@ value. This value can be between 1
    -- and 100. If you don\'t use this parameter, @ListFargateProfiles@ returns
    -- up to 100 results and a @nextToken@ value if applicable.
    ListFargateProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the Amazon EKS cluster that you would like to list Fargate
    -- profiles in.
    ListFargateProfiles -> Text
clusterName :: Prelude.Text
  }
  deriving (ListFargateProfiles -> ListFargateProfiles -> Bool
(ListFargateProfiles -> ListFargateProfiles -> Bool)
-> (ListFargateProfiles -> ListFargateProfiles -> Bool)
-> Eq ListFargateProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFargateProfiles -> ListFargateProfiles -> Bool
$c/= :: ListFargateProfiles -> ListFargateProfiles -> Bool
== :: ListFargateProfiles -> ListFargateProfiles -> Bool
$c== :: ListFargateProfiles -> ListFargateProfiles -> Bool
Prelude.Eq, ReadPrec [ListFargateProfiles]
ReadPrec ListFargateProfiles
Int -> ReadS ListFargateProfiles
ReadS [ListFargateProfiles]
(Int -> ReadS ListFargateProfiles)
-> ReadS [ListFargateProfiles]
-> ReadPrec ListFargateProfiles
-> ReadPrec [ListFargateProfiles]
-> Read ListFargateProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFargateProfiles]
$creadListPrec :: ReadPrec [ListFargateProfiles]
readPrec :: ReadPrec ListFargateProfiles
$creadPrec :: ReadPrec ListFargateProfiles
readList :: ReadS [ListFargateProfiles]
$creadList :: ReadS [ListFargateProfiles]
readsPrec :: Int -> ReadS ListFargateProfiles
$creadsPrec :: Int -> ReadS ListFargateProfiles
Prelude.Read, Int -> ListFargateProfiles -> ShowS
[ListFargateProfiles] -> ShowS
ListFargateProfiles -> String
(Int -> ListFargateProfiles -> ShowS)
-> (ListFargateProfiles -> String)
-> ([ListFargateProfiles] -> ShowS)
-> Show ListFargateProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFargateProfiles] -> ShowS
$cshowList :: [ListFargateProfiles] -> ShowS
show :: ListFargateProfiles -> String
$cshow :: ListFargateProfiles -> String
showsPrec :: Int -> ListFargateProfiles -> ShowS
$cshowsPrec :: Int -> ListFargateProfiles -> ShowS
Prelude.Show, (forall x. ListFargateProfiles -> Rep ListFargateProfiles x)
-> (forall x. Rep ListFargateProfiles x -> ListFargateProfiles)
-> Generic ListFargateProfiles
forall x. Rep ListFargateProfiles x -> ListFargateProfiles
forall x. ListFargateProfiles -> Rep ListFargateProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFargateProfiles x -> ListFargateProfiles
$cfrom :: forall x. ListFargateProfiles -> Rep ListFargateProfiles x
Prelude.Generic)

-- |
-- Create a value of 'ListFargateProfiles' 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', 'listFargateProfiles_nextToken' - The @nextToken@ value returned from a previous paginated
-- @ListFargateProfiles@ request where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
--
-- 'maxResults', 'listFargateProfiles_maxResults' - The maximum number of Fargate profile results returned by
-- @ListFargateProfiles@ in paginated output. When you use this parameter,
-- @ListFargateProfiles@ returns only @maxResults@ results in a single page
-- along with a @nextToken@ response element. You can see the remaining
-- results of the initial request by sending another @ListFargateProfiles@
-- request with the returned @nextToken@ value. This value can be between 1
-- and 100. If you don\'t use this parameter, @ListFargateProfiles@ returns
-- up to 100 results and a @nextToken@ value if applicable.
--
-- 'clusterName', 'listFargateProfiles_clusterName' - The name of the Amazon EKS cluster that you would like to list Fargate
-- profiles in.
newListFargateProfiles ::
  -- | 'clusterName'
  Prelude.Text ->
  ListFargateProfiles
newListFargateProfiles :: Text -> ListFargateProfiles
newListFargateProfiles Text
pClusterName_ =
  ListFargateProfiles' :: Maybe Text -> Maybe Natural -> Text -> ListFargateProfiles
ListFargateProfiles'
    { $sel:nextToken:ListFargateProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListFargateProfiles' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterName:ListFargateProfiles' :: Text
clusterName = Text
pClusterName_
    }

-- | The @nextToken@ value returned from a previous paginated
-- @ListFargateProfiles@ request where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
listFargateProfiles_nextToken :: Lens.Lens' ListFargateProfiles (Prelude.Maybe Prelude.Text)
listFargateProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFargateProfiles -> f ListFargateProfiles
listFargateProfiles_nextToken = (ListFargateProfiles -> Maybe Text)
-> (ListFargateProfiles -> Maybe Text -> ListFargateProfiles)
-> Lens
     ListFargateProfiles ListFargateProfiles (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFargateProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFargateProfiles' :: ListFargateProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFargateProfiles
s@ListFargateProfiles' {} Maybe Text
a -> ListFargateProfiles
s {$sel:nextToken:ListFargateProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: ListFargateProfiles)

-- | The maximum number of Fargate profile results returned by
-- @ListFargateProfiles@ in paginated output. When you use this parameter,
-- @ListFargateProfiles@ returns only @maxResults@ results in a single page
-- along with a @nextToken@ response element. You can see the remaining
-- results of the initial request by sending another @ListFargateProfiles@
-- request with the returned @nextToken@ value. This value can be between 1
-- and 100. If you don\'t use this parameter, @ListFargateProfiles@ returns
-- up to 100 results and a @nextToken@ value if applicable.
listFargateProfiles_maxResults :: Lens.Lens' ListFargateProfiles (Prelude.Maybe Prelude.Natural)
listFargateProfiles_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListFargateProfiles -> f ListFargateProfiles
listFargateProfiles_maxResults = (ListFargateProfiles -> Maybe Natural)
-> (ListFargateProfiles -> Maybe Natural -> ListFargateProfiles)
-> Lens
     ListFargateProfiles
     ListFargateProfiles
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFargateProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListFargateProfiles' :: ListFargateProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListFargateProfiles
s@ListFargateProfiles' {} Maybe Natural
a -> ListFargateProfiles
s {$sel:maxResults:ListFargateProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListFargateProfiles)

-- | The name of the Amazon EKS cluster that you would like to list Fargate
-- profiles in.
listFargateProfiles_clusterName :: Lens.Lens' ListFargateProfiles Prelude.Text
listFargateProfiles_clusterName :: (Text -> f Text) -> ListFargateProfiles -> f ListFargateProfiles
listFargateProfiles_clusterName = (ListFargateProfiles -> Text)
-> (ListFargateProfiles -> Text -> ListFargateProfiles)
-> Lens ListFargateProfiles ListFargateProfiles Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFargateProfiles' {Text
clusterName :: Text
$sel:clusterName:ListFargateProfiles' :: ListFargateProfiles -> Text
clusterName} -> Text
clusterName) (\s :: ListFargateProfiles
s@ListFargateProfiles' {} Text
a -> ListFargateProfiles
s {$sel:clusterName:ListFargateProfiles' :: Text
clusterName = Text
a} :: ListFargateProfiles)

instance Core.AWSPager ListFargateProfiles where
  page :: ListFargateProfiles
-> AWSResponse ListFargateProfiles -> Maybe ListFargateProfiles
page ListFargateProfiles
rq AWSResponse ListFargateProfiles
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFargateProfiles
ListFargateProfilesResponse
rs
            ListFargateProfilesResponse
-> Getting (First Text) ListFargateProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFargateProfilesResponse
-> Const (First Text) ListFargateProfilesResponse
Lens' ListFargateProfilesResponse (Maybe Text)
listFargateProfilesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFargateProfilesResponse
 -> Const (First Text) ListFargateProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFargateProfilesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListFargateProfiles
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFargateProfiles
ListFargateProfilesResponse
rs
            ListFargateProfilesResponse
-> Getting (First [Text]) ListFargateProfilesResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListFargateProfilesResponse
-> Const (First [Text]) ListFargateProfilesResponse
Lens' ListFargateProfilesResponse (Maybe [Text])
listFargateProfilesResponse_fargateProfileNames
              ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListFargateProfilesResponse
 -> Const (First [Text]) ListFargateProfilesResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListFargateProfilesResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListFargateProfiles
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListFargateProfiles -> Maybe ListFargateProfiles
forall a. a -> Maybe a
Prelude.Just (ListFargateProfiles -> Maybe ListFargateProfiles)
-> ListFargateProfiles -> Maybe ListFargateProfiles
forall a b. (a -> b) -> a -> b
Prelude.$
        ListFargateProfiles
rq
          ListFargateProfiles
-> (ListFargateProfiles -> ListFargateProfiles)
-> ListFargateProfiles
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListFargateProfiles -> Identity ListFargateProfiles
Lens
  ListFargateProfiles ListFargateProfiles (Maybe Text) (Maybe Text)
listFargateProfiles_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListFargateProfiles -> Identity ListFargateProfiles)
-> Maybe Text -> ListFargateProfiles -> ListFargateProfiles
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFargateProfiles
ListFargateProfilesResponse
rs
          ListFargateProfilesResponse
-> Getting (First Text) ListFargateProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFargateProfilesResponse
-> Const (First Text) ListFargateProfilesResponse
Lens' ListFargateProfilesResponse (Maybe Text)
listFargateProfilesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFargateProfilesResponse
 -> Const (First Text) ListFargateProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFargateProfilesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListFargateProfiles

instance Core.ToHeaders ListFargateProfiles where
  toHeaders :: ListFargateProfiles -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListFargateProfiles -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListFargateProfiles where
  toPath :: ListFargateProfiles -> ByteString
toPath ListFargateProfiles' {Maybe Natural
Maybe Text
Text
clusterName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterName:ListFargateProfiles' :: ListFargateProfiles -> Text
$sel:maxResults:ListFargateProfiles' :: ListFargateProfiles -> Maybe Natural
$sel:nextToken:ListFargateProfiles' :: ListFargateProfiles -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/clusters/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterName,
        ByteString
"/fargate-profiles"
      ]

instance Core.ToQuery ListFargateProfiles where
  toQuery :: ListFargateProfiles -> QueryString
toQuery ListFargateProfiles' {Maybe Natural
Maybe Text
Text
clusterName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterName:ListFargateProfiles' :: ListFargateProfiles -> Text
$sel:maxResults:ListFargateProfiles' :: ListFargateProfiles -> Maybe Natural
$sel:nextToken:ListFargateProfiles' :: ListFargateProfiles -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListFargateProfilesResponse' smart constructor.
data ListFargateProfilesResponse = ListFargateProfilesResponse'
  { -- | The @nextToken@ value to include in a future @ListFargateProfiles@
    -- request. When the results of a @ListFargateProfiles@ request exceed
    -- @maxResults@, you can use this value to retrieve the next page of
    -- results. This value is @null@ when there are no more results to return.
    ListFargateProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of all of the Fargate profiles associated with the specified
    -- cluster.
    ListFargateProfilesResponse -> Maybe [Text]
fargateProfileNames :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListFargateProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListFargateProfilesResponse -> ListFargateProfilesResponse -> Bool
(ListFargateProfilesResponse
 -> ListFargateProfilesResponse -> Bool)
-> (ListFargateProfilesResponse
    -> ListFargateProfilesResponse -> Bool)
-> Eq ListFargateProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFargateProfilesResponse -> ListFargateProfilesResponse -> Bool
$c/= :: ListFargateProfilesResponse -> ListFargateProfilesResponse -> Bool
== :: ListFargateProfilesResponse -> ListFargateProfilesResponse -> Bool
$c== :: ListFargateProfilesResponse -> ListFargateProfilesResponse -> Bool
Prelude.Eq, ReadPrec [ListFargateProfilesResponse]
ReadPrec ListFargateProfilesResponse
Int -> ReadS ListFargateProfilesResponse
ReadS [ListFargateProfilesResponse]
(Int -> ReadS ListFargateProfilesResponse)
-> ReadS [ListFargateProfilesResponse]
-> ReadPrec ListFargateProfilesResponse
-> ReadPrec [ListFargateProfilesResponse]
-> Read ListFargateProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFargateProfilesResponse]
$creadListPrec :: ReadPrec [ListFargateProfilesResponse]
readPrec :: ReadPrec ListFargateProfilesResponse
$creadPrec :: ReadPrec ListFargateProfilesResponse
readList :: ReadS [ListFargateProfilesResponse]
$creadList :: ReadS [ListFargateProfilesResponse]
readsPrec :: Int -> ReadS ListFargateProfilesResponse
$creadsPrec :: Int -> ReadS ListFargateProfilesResponse
Prelude.Read, Int -> ListFargateProfilesResponse -> ShowS
[ListFargateProfilesResponse] -> ShowS
ListFargateProfilesResponse -> String
(Int -> ListFargateProfilesResponse -> ShowS)
-> (ListFargateProfilesResponse -> String)
-> ([ListFargateProfilesResponse] -> ShowS)
-> Show ListFargateProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFargateProfilesResponse] -> ShowS
$cshowList :: [ListFargateProfilesResponse] -> ShowS
show :: ListFargateProfilesResponse -> String
$cshow :: ListFargateProfilesResponse -> String
showsPrec :: Int -> ListFargateProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListFargateProfilesResponse -> ShowS
Prelude.Show, (forall x.
 ListFargateProfilesResponse -> Rep ListFargateProfilesResponse x)
-> (forall x.
    Rep ListFargateProfilesResponse x -> ListFargateProfilesResponse)
-> Generic ListFargateProfilesResponse
forall x.
Rep ListFargateProfilesResponse x -> ListFargateProfilesResponse
forall x.
ListFargateProfilesResponse -> Rep ListFargateProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFargateProfilesResponse x -> ListFargateProfilesResponse
$cfrom :: forall x.
ListFargateProfilesResponse -> Rep ListFargateProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFargateProfilesResponse' 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', 'listFargateProfilesResponse_nextToken' - The @nextToken@ value to include in a future @ListFargateProfiles@
-- request. When the results of a @ListFargateProfiles@ request exceed
-- @maxResults@, you can use this value to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
--
-- 'fargateProfileNames', 'listFargateProfilesResponse_fargateProfileNames' - A list of all of the Fargate profiles associated with the specified
-- cluster.
--
-- 'httpStatus', 'listFargateProfilesResponse_httpStatus' - The response's http status code.
newListFargateProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFargateProfilesResponse
newListFargateProfilesResponse :: Int -> ListFargateProfilesResponse
newListFargateProfilesResponse Int
pHttpStatus_ =
  ListFargateProfilesResponse' :: Maybe Text -> Maybe [Text] -> Int -> ListFargateProfilesResponse
ListFargateProfilesResponse'
    { $sel:nextToken:ListFargateProfilesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fargateProfileNames:ListFargateProfilesResponse' :: Maybe [Text]
fargateProfileNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListFargateProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @nextToken@ value to include in a future @ListFargateProfiles@
-- request. When the results of a @ListFargateProfiles@ request exceed
-- @maxResults@, you can use this value to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
listFargateProfilesResponse_nextToken :: Lens.Lens' ListFargateProfilesResponse (Prelude.Maybe Prelude.Text)
listFargateProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFargateProfilesResponse -> f ListFargateProfilesResponse
listFargateProfilesResponse_nextToken = (ListFargateProfilesResponse -> Maybe Text)
-> (ListFargateProfilesResponse
    -> Maybe Text -> ListFargateProfilesResponse)
-> Lens' ListFargateProfilesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFargateProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFargateProfilesResponse' :: ListFargateProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFargateProfilesResponse
s@ListFargateProfilesResponse' {} Maybe Text
a -> ListFargateProfilesResponse
s {$sel:nextToken:ListFargateProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFargateProfilesResponse)

-- | A list of all of the Fargate profiles associated with the specified
-- cluster.
listFargateProfilesResponse_fargateProfileNames :: Lens.Lens' ListFargateProfilesResponse (Prelude.Maybe [Prelude.Text])
listFargateProfilesResponse_fargateProfileNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ListFargateProfilesResponse -> f ListFargateProfilesResponse
listFargateProfilesResponse_fargateProfileNames = (ListFargateProfilesResponse -> Maybe [Text])
-> (ListFargateProfilesResponse
    -> Maybe [Text] -> ListFargateProfilesResponse)
-> Lens' ListFargateProfilesResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFargateProfilesResponse' {Maybe [Text]
fargateProfileNames :: Maybe [Text]
$sel:fargateProfileNames:ListFargateProfilesResponse' :: ListFargateProfilesResponse -> Maybe [Text]
fargateProfileNames} -> Maybe [Text]
fargateProfileNames) (\s :: ListFargateProfilesResponse
s@ListFargateProfilesResponse' {} Maybe [Text]
a -> ListFargateProfilesResponse
s {$sel:fargateProfileNames:ListFargateProfilesResponse' :: Maybe [Text]
fargateProfileNames = Maybe [Text]
a} :: ListFargateProfilesResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListFargateProfilesResponse -> f ListFargateProfilesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListFargateProfilesResponse
-> f ListFargateProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListFargateProfilesResponse