{-# 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.WorkMail.ListAvailabilityConfigurations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List all the @AvailabilityConfiguration@\'s for the given WorkMail
-- organization.
--
-- This operation returns paginated results.
module Amazonka.WorkMail.ListAvailabilityConfigurations
  ( -- * Creating a Request
    ListAvailabilityConfigurations (..),
    newListAvailabilityConfigurations,

    -- * Request Lenses
    listAvailabilityConfigurations_maxResults,
    listAvailabilityConfigurations_nextToken,
    listAvailabilityConfigurations_organizationId,

    -- * Destructuring the Response
    ListAvailabilityConfigurationsResponse (..),
    newListAvailabilityConfigurationsResponse,

    -- * Response Lenses
    listAvailabilityConfigurationsResponse_availabilityConfigurations,
    listAvailabilityConfigurationsResponse_nextToken,
    listAvailabilityConfigurationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListAvailabilityConfigurations' smart constructor.
data ListAvailabilityConfigurations = ListAvailabilityConfigurations'
  { -- | The maximum number of results to return in a single call.
    ListAvailabilityConfigurations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to use to retrieve the next page of results. The first call
    -- does not require a token.
    ListAvailabilityConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The WorkMail organization for which the @AvailabilityConfiguration@\'s
    -- will be listed.
    ListAvailabilityConfigurations -> Text
organizationId :: Prelude.Text
  }
  deriving (ListAvailabilityConfigurations
-> ListAvailabilityConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAvailabilityConfigurations
-> ListAvailabilityConfigurations -> Bool
$c/= :: ListAvailabilityConfigurations
-> ListAvailabilityConfigurations -> Bool
== :: ListAvailabilityConfigurations
-> ListAvailabilityConfigurations -> Bool
$c== :: ListAvailabilityConfigurations
-> ListAvailabilityConfigurations -> Bool
Prelude.Eq, ReadPrec [ListAvailabilityConfigurations]
ReadPrec ListAvailabilityConfigurations
Int -> ReadS ListAvailabilityConfigurations
ReadS [ListAvailabilityConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAvailabilityConfigurations]
$creadListPrec :: ReadPrec [ListAvailabilityConfigurations]
readPrec :: ReadPrec ListAvailabilityConfigurations
$creadPrec :: ReadPrec ListAvailabilityConfigurations
readList :: ReadS [ListAvailabilityConfigurations]
$creadList :: ReadS [ListAvailabilityConfigurations]
readsPrec :: Int -> ReadS ListAvailabilityConfigurations
$creadsPrec :: Int -> ReadS ListAvailabilityConfigurations
Prelude.Read, Int -> ListAvailabilityConfigurations -> ShowS
[ListAvailabilityConfigurations] -> ShowS
ListAvailabilityConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAvailabilityConfigurations] -> ShowS
$cshowList :: [ListAvailabilityConfigurations] -> ShowS
show :: ListAvailabilityConfigurations -> String
$cshow :: ListAvailabilityConfigurations -> String
showsPrec :: Int -> ListAvailabilityConfigurations -> ShowS
$cshowsPrec :: Int -> ListAvailabilityConfigurations -> ShowS
Prelude.Show, forall x.
Rep ListAvailabilityConfigurations x
-> ListAvailabilityConfigurations
forall x.
ListAvailabilityConfigurations
-> Rep ListAvailabilityConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAvailabilityConfigurations x
-> ListAvailabilityConfigurations
$cfrom :: forall x.
ListAvailabilityConfigurations
-> Rep ListAvailabilityConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListAvailabilityConfigurations' 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:
--
-- 'maxResults', 'listAvailabilityConfigurations_maxResults' - The maximum number of results to return in a single call.
--
-- 'nextToken', 'listAvailabilityConfigurations_nextToken' - The token to use to retrieve the next page of results. The first call
-- does not require a token.
--
-- 'organizationId', 'listAvailabilityConfigurations_organizationId' - The WorkMail organization for which the @AvailabilityConfiguration@\'s
-- will be listed.
newListAvailabilityConfigurations ::
  -- | 'organizationId'
  Prelude.Text ->
  ListAvailabilityConfigurations
newListAvailabilityConfigurations :: Text -> ListAvailabilityConfigurations
newListAvailabilityConfigurations Text
pOrganizationId_ =
  ListAvailabilityConfigurations'
    { $sel:maxResults:ListAvailabilityConfigurations' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAvailabilityConfigurations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationId:ListAvailabilityConfigurations' :: Text
organizationId = Text
pOrganizationId_
    }

-- | The maximum number of results to return in a single call.
listAvailabilityConfigurations_maxResults :: Lens.Lens' ListAvailabilityConfigurations (Prelude.Maybe Prelude.Natural)
listAvailabilityConfigurations_maxResults :: Lens' ListAvailabilityConfigurations (Maybe Natural)
listAvailabilityConfigurations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailabilityConfigurations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAvailabilityConfigurations
s@ListAvailabilityConfigurations' {} Maybe Natural
a -> ListAvailabilityConfigurations
s {$sel:maxResults:ListAvailabilityConfigurations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAvailabilityConfigurations)

-- | The token to use to retrieve the next page of results. The first call
-- does not require a token.
listAvailabilityConfigurations_nextToken :: Lens.Lens' ListAvailabilityConfigurations (Prelude.Maybe Prelude.Text)
listAvailabilityConfigurations_nextToken :: Lens' ListAvailabilityConfigurations (Maybe Text)
listAvailabilityConfigurations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailabilityConfigurations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAvailabilityConfigurations
s@ListAvailabilityConfigurations' {} Maybe Text
a -> ListAvailabilityConfigurations
s {$sel:nextToken:ListAvailabilityConfigurations' :: Maybe Text
nextToken = Maybe Text
a} :: ListAvailabilityConfigurations)

-- | The WorkMail organization for which the @AvailabilityConfiguration@\'s
-- will be listed.
listAvailabilityConfigurations_organizationId :: Lens.Lens' ListAvailabilityConfigurations Prelude.Text
listAvailabilityConfigurations_organizationId :: Lens' ListAvailabilityConfigurations Text
listAvailabilityConfigurations_organizationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailabilityConfigurations' {Text
organizationId :: Text
$sel:organizationId:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Text
organizationId} -> Text
organizationId) (\s :: ListAvailabilityConfigurations
s@ListAvailabilityConfigurations' {} Text
a -> ListAvailabilityConfigurations
s {$sel:organizationId:ListAvailabilityConfigurations' :: Text
organizationId = Text
a} :: ListAvailabilityConfigurations)

instance Core.AWSPager ListAvailabilityConfigurations where
  page :: ListAvailabilityConfigurations
-> AWSResponse ListAvailabilityConfigurations
-> Maybe ListAvailabilityConfigurations
page ListAvailabilityConfigurations
rq AWSResponse ListAvailabilityConfigurations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAvailabilityConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAvailabilityConfigurationsResponse (Maybe Text)
listAvailabilityConfigurationsResponse_nextToken
            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 ListAvailabilityConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListAvailabilityConfigurationsResponse
  (Maybe [AvailabilityConfiguration])
listAvailabilityConfigurationsResponse_availabilityConfigurations
            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.$ ListAvailabilityConfigurations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAvailabilityConfigurations (Maybe Text)
listAvailabilityConfigurations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAvailabilityConfigurations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAvailabilityConfigurationsResponse (Maybe Text)
listAvailabilityConfigurationsResponse_nextToken
          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
    ListAvailabilityConfigurations
  where
  type
    AWSResponse ListAvailabilityConfigurations =
      ListAvailabilityConfigurationsResponse
  request :: (Service -> Service)
-> ListAvailabilityConfigurations
-> Request ListAvailabilityConfigurations
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAvailabilityConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListAvailabilityConfigurations)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [AvailabilityConfiguration]
-> Maybe Text -> Int -> ListAvailabilityConfigurationsResponse
ListAvailabilityConfigurationsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AvailabilityConfigurations"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            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
    ListAvailabilityConfigurations
  where
  hashWithSalt :: Int -> ListAvailabilityConfigurations -> Int
hashWithSalt
    Int
_salt
    ListAvailabilityConfigurations' {Maybe Natural
Maybe Text
Text
organizationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:organizationId:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Text
$sel:nextToken:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Text
$sel:maxResults:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
organizationId

instance
  Prelude.NFData
    ListAvailabilityConfigurations
  where
  rnf :: ListAvailabilityConfigurations -> ()
rnf ListAvailabilityConfigurations' {Maybe Natural
Maybe Text
Text
organizationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:organizationId:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Text
$sel:nextToken:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Text
$sel:maxResults:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
organizationId

instance
  Data.ToHeaders
    ListAvailabilityConfigurations
  where
  toHeaders :: ListAvailabilityConfigurations -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"WorkMailService.ListAvailabilityConfigurations" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListAvailabilityConfigurations where
  toJSON :: ListAvailabilityConfigurations -> Value
toJSON ListAvailabilityConfigurations' {Maybe Natural
Maybe Text
Text
organizationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:organizationId:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Text
$sel:nextToken:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Text
$sel:maxResults:ListAvailabilityConfigurations' :: ListAvailabilityConfigurations -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OrganizationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
organizationId)
          ]
      )

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

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

-- | /See:/ 'newListAvailabilityConfigurationsResponse' smart constructor.
data ListAvailabilityConfigurationsResponse = ListAvailabilityConfigurationsResponse'
  { -- | The list of @AvailabilityConfiguration@\'s that exist for the specified
    -- WorkMail organization.
    ListAvailabilityConfigurationsResponse
-> Maybe [AvailabilityConfiguration]
availabilityConfigurations :: Prelude.Maybe [AvailabilityConfiguration],
    -- | The token to use to retrieve the next page of results. The value is
    -- @null@ when there are no further results to return.
    ListAvailabilityConfigurationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAvailabilityConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAvailabilityConfigurationsResponse
-> ListAvailabilityConfigurationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAvailabilityConfigurationsResponse
-> ListAvailabilityConfigurationsResponse -> Bool
$c/= :: ListAvailabilityConfigurationsResponse
-> ListAvailabilityConfigurationsResponse -> Bool
== :: ListAvailabilityConfigurationsResponse
-> ListAvailabilityConfigurationsResponse -> Bool
$c== :: ListAvailabilityConfigurationsResponse
-> ListAvailabilityConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListAvailabilityConfigurationsResponse]
ReadPrec ListAvailabilityConfigurationsResponse
Int -> ReadS ListAvailabilityConfigurationsResponse
ReadS [ListAvailabilityConfigurationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAvailabilityConfigurationsResponse]
$creadListPrec :: ReadPrec [ListAvailabilityConfigurationsResponse]
readPrec :: ReadPrec ListAvailabilityConfigurationsResponse
$creadPrec :: ReadPrec ListAvailabilityConfigurationsResponse
readList :: ReadS [ListAvailabilityConfigurationsResponse]
$creadList :: ReadS [ListAvailabilityConfigurationsResponse]
readsPrec :: Int -> ReadS ListAvailabilityConfigurationsResponse
$creadsPrec :: Int -> ReadS ListAvailabilityConfigurationsResponse
Prelude.Read, Int -> ListAvailabilityConfigurationsResponse -> ShowS
[ListAvailabilityConfigurationsResponse] -> ShowS
ListAvailabilityConfigurationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAvailabilityConfigurationsResponse] -> ShowS
$cshowList :: [ListAvailabilityConfigurationsResponse] -> ShowS
show :: ListAvailabilityConfigurationsResponse -> String
$cshow :: ListAvailabilityConfigurationsResponse -> String
showsPrec :: Int -> ListAvailabilityConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListAvailabilityConfigurationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAvailabilityConfigurationsResponse x
-> ListAvailabilityConfigurationsResponse
forall x.
ListAvailabilityConfigurationsResponse
-> Rep ListAvailabilityConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAvailabilityConfigurationsResponse x
-> ListAvailabilityConfigurationsResponse
$cfrom :: forall x.
ListAvailabilityConfigurationsResponse
-> Rep ListAvailabilityConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAvailabilityConfigurationsResponse' 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:
--
-- 'availabilityConfigurations', 'listAvailabilityConfigurationsResponse_availabilityConfigurations' - The list of @AvailabilityConfiguration@\'s that exist for the specified
-- WorkMail organization.
--
-- 'nextToken', 'listAvailabilityConfigurationsResponse_nextToken' - The token to use to retrieve the next page of results. The value is
-- @null@ when there are no further results to return.
--
-- 'httpStatus', 'listAvailabilityConfigurationsResponse_httpStatus' - The response's http status code.
newListAvailabilityConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAvailabilityConfigurationsResponse
newListAvailabilityConfigurationsResponse :: Int -> ListAvailabilityConfigurationsResponse
newListAvailabilityConfigurationsResponse
  Int
pHttpStatus_ =
    ListAvailabilityConfigurationsResponse'
      { $sel:availabilityConfigurations:ListAvailabilityConfigurationsResponse' :: Maybe [AvailabilityConfiguration]
availabilityConfigurations =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListAvailabilityConfigurationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListAvailabilityConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The list of @AvailabilityConfiguration@\'s that exist for the specified
-- WorkMail organization.
listAvailabilityConfigurationsResponse_availabilityConfigurations :: Lens.Lens' ListAvailabilityConfigurationsResponse (Prelude.Maybe [AvailabilityConfiguration])
listAvailabilityConfigurationsResponse_availabilityConfigurations :: Lens'
  ListAvailabilityConfigurationsResponse
  (Maybe [AvailabilityConfiguration])
listAvailabilityConfigurationsResponse_availabilityConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailabilityConfigurationsResponse' {Maybe [AvailabilityConfiguration]
availabilityConfigurations :: Maybe [AvailabilityConfiguration]
$sel:availabilityConfigurations:ListAvailabilityConfigurationsResponse' :: ListAvailabilityConfigurationsResponse
-> Maybe [AvailabilityConfiguration]
availabilityConfigurations} -> Maybe [AvailabilityConfiguration]
availabilityConfigurations) (\s :: ListAvailabilityConfigurationsResponse
s@ListAvailabilityConfigurationsResponse' {} Maybe [AvailabilityConfiguration]
a -> ListAvailabilityConfigurationsResponse
s {$sel:availabilityConfigurations:ListAvailabilityConfigurationsResponse' :: Maybe [AvailabilityConfiguration]
availabilityConfigurations = Maybe [AvailabilityConfiguration]
a} :: ListAvailabilityConfigurationsResponse) 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 token to use to retrieve the next page of results. The value is
-- @null@ when there are no further results to return.
listAvailabilityConfigurationsResponse_nextToken :: Lens.Lens' ListAvailabilityConfigurationsResponse (Prelude.Maybe Prelude.Text)
listAvailabilityConfigurationsResponse_nextToken :: Lens' ListAvailabilityConfigurationsResponse (Maybe Text)
listAvailabilityConfigurationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailabilityConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAvailabilityConfigurationsResponse' :: ListAvailabilityConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAvailabilityConfigurationsResponse
s@ListAvailabilityConfigurationsResponse' {} Maybe Text
a -> ListAvailabilityConfigurationsResponse
s {$sel:nextToken:ListAvailabilityConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAvailabilityConfigurationsResponse)

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

instance
  Prelude.NFData
    ListAvailabilityConfigurationsResponse
  where
  rnf :: ListAvailabilityConfigurationsResponse -> ()
rnf ListAvailabilityConfigurationsResponse' {Int
Maybe [AvailabilityConfiguration]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
availabilityConfigurations :: Maybe [AvailabilityConfiguration]
$sel:httpStatus:ListAvailabilityConfigurationsResponse' :: ListAvailabilityConfigurationsResponse -> Int
$sel:nextToken:ListAvailabilityConfigurationsResponse' :: ListAvailabilityConfigurationsResponse -> Maybe Text
$sel:availabilityConfigurations:ListAvailabilityConfigurationsResponse' :: ListAvailabilityConfigurationsResponse
-> Maybe [AvailabilityConfiguration]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AvailabilityConfiguration]
availabilityConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus