{-# 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.Connect.ListHoursOfOperations
-- 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)
--
-- Provides information about the hours of operation for the specified
-- Amazon Connect instance.
--
-- For more information about hours of operation, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/set-hours-operation.html Set the Hours of Operation for a Queue>
-- in the /Amazon Connect Administrator Guide/.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListHoursOfOperations
  ( -- * Creating a Request
    ListHoursOfOperations (..),
    newListHoursOfOperations,

    -- * Request Lenses
    listHoursOfOperations_nextToken,
    listHoursOfOperations_maxResults,
    listHoursOfOperations_instanceId,

    -- * Destructuring the Response
    ListHoursOfOperationsResponse (..),
    newListHoursOfOperationsResponse,

    -- * Response Lenses
    listHoursOfOperationsResponse_nextToken,
    listHoursOfOperationsResponse_hoursOfOperationSummaryList,
    listHoursOfOperationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListHoursOfOperations' smart constructor.
data ListHoursOfOperations = ListHoursOfOperations'
  { -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListHoursOfOperations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListHoursOfOperations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListHoursOfOperations -> Text
instanceId :: Prelude.Text
  }
  deriving (ListHoursOfOperations -> ListHoursOfOperations -> Bool
(ListHoursOfOperations -> ListHoursOfOperations -> Bool)
-> (ListHoursOfOperations -> ListHoursOfOperations -> Bool)
-> Eq ListHoursOfOperations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHoursOfOperations -> ListHoursOfOperations -> Bool
$c/= :: ListHoursOfOperations -> ListHoursOfOperations -> Bool
== :: ListHoursOfOperations -> ListHoursOfOperations -> Bool
$c== :: ListHoursOfOperations -> ListHoursOfOperations -> Bool
Prelude.Eq, ReadPrec [ListHoursOfOperations]
ReadPrec ListHoursOfOperations
Int -> ReadS ListHoursOfOperations
ReadS [ListHoursOfOperations]
(Int -> ReadS ListHoursOfOperations)
-> ReadS [ListHoursOfOperations]
-> ReadPrec ListHoursOfOperations
-> ReadPrec [ListHoursOfOperations]
-> Read ListHoursOfOperations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHoursOfOperations]
$creadListPrec :: ReadPrec [ListHoursOfOperations]
readPrec :: ReadPrec ListHoursOfOperations
$creadPrec :: ReadPrec ListHoursOfOperations
readList :: ReadS [ListHoursOfOperations]
$creadList :: ReadS [ListHoursOfOperations]
readsPrec :: Int -> ReadS ListHoursOfOperations
$creadsPrec :: Int -> ReadS ListHoursOfOperations
Prelude.Read, Int -> ListHoursOfOperations -> ShowS
[ListHoursOfOperations] -> ShowS
ListHoursOfOperations -> String
(Int -> ListHoursOfOperations -> ShowS)
-> (ListHoursOfOperations -> String)
-> ([ListHoursOfOperations] -> ShowS)
-> Show ListHoursOfOperations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHoursOfOperations] -> ShowS
$cshowList :: [ListHoursOfOperations] -> ShowS
show :: ListHoursOfOperations -> String
$cshow :: ListHoursOfOperations -> String
showsPrec :: Int -> ListHoursOfOperations -> ShowS
$cshowsPrec :: Int -> ListHoursOfOperations -> ShowS
Prelude.Show, (forall x. ListHoursOfOperations -> Rep ListHoursOfOperations x)
-> (forall x. Rep ListHoursOfOperations x -> ListHoursOfOperations)
-> Generic ListHoursOfOperations
forall x. Rep ListHoursOfOperations x -> ListHoursOfOperations
forall x. ListHoursOfOperations -> Rep ListHoursOfOperations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListHoursOfOperations x -> ListHoursOfOperations
$cfrom :: forall x. ListHoursOfOperations -> Rep ListHoursOfOperations x
Prelude.Generic)

-- |
-- Create a value of 'ListHoursOfOperations' 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', 'listHoursOfOperations_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'maxResults', 'listHoursOfOperations_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listHoursOfOperations_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListHoursOfOperations ::
  -- | 'instanceId'
  Prelude.Text ->
  ListHoursOfOperations
newListHoursOfOperations :: Text -> ListHoursOfOperations
newListHoursOfOperations Text
pInstanceId_ =
  ListHoursOfOperations' :: Maybe Text -> Maybe Natural -> Text -> ListHoursOfOperations
ListHoursOfOperations'
    { $sel:nextToken:ListHoursOfOperations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListHoursOfOperations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListHoursOfOperations' :: Text
instanceId = Text
pInstanceId_
    }

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listHoursOfOperations_nextToken :: Lens.Lens' ListHoursOfOperations (Prelude.Maybe Prelude.Text)
listHoursOfOperations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHoursOfOperations -> f ListHoursOfOperations
listHoursOfOperations_nextToken = (ListHoursOfOperations -> Maybe Text)
-> (ListHoursOfOperations -> Maybe Text -> ListHoursOfOperations)
-> Lens
     ListHoursOfOperations
     ListHoursOfOperations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHoursOfOperations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHoursOfOperations' :: ListHoursOfOperations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHoursOfOperations
s@ListHoursOfOperations' {} Maybe Text
a -> ListHoursOfOperations
s {$sel:nextToken:ListHoursOfOperations' :: Maybe Text
nextToken = Maybe Text
a} :: ListHoursOfOperations)

-- | The maximum number of results to return per page.
listHoursOfOperations_maxResults :: Lens.Lens' ListHoursOfOperations (Prelude.Maybe Prelude.Natural)
listHoursOfOperations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListHoursOfOperations -> f ListHoursOfOperations
listHoursOfOperations_maxResults = (ListHoursOfOperations -> Maybe Natural)
-> (ListHoursOfOperations
    -> Maybe Natural -> ListHoursOfOperations)
-> Lens
     ListHoursOfOperations
     ListHoursOfOperations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHoursOfOperations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHoursOfOperations' :: ListHoursOfOperations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHoursOfOperations
s@ListHoursOfOperations' {} Maybe Natural
a -> ListHoursOfOperations
s {$sel:maxResults:ListHoursOfOperations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHoursOfOperations)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
listHoursOfOperations_instanceId :: Lens.Lens' ListHoursOfOperations Prelude.Text
listHoursOfOperations_instanceId :: (Text -> f Text)
-> ListHoursOfOperations -> f ListHoursOfOperations
listHoursOfOperations_instanceId = (ListHoursOfOperations -> Text)
-> (ListHoursOfOperations -> Text -> ListHoursOfOperations)
-> Lens ListHoursOfOperations ListHoursOfOperations Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHoursOfOperations' {Text
instanceId :: Text
$sel:instanceId:ListHoursOfOperations' :: ListHoursOfOperations -> Text
instanceId} -> Text
instanceId) (\s :: ListHoursOfOperations
s@ListHoursOfOperations' {} Text
a -> ListHoursOfOperations
s {$sel:instanceId:ListHoursOfOperations' :: Text
instanceId = Text
a} :: ListHoursOfOperations)

instance Core.AWSPager ListHoursOfOperations where
  page :: ListHoursOfOperations
-> AWSResponse ListHoursOfOperations -> Maybe ListHoursOfOperations
page ListHoursOfOperations
rq AWSResponse ListHoursOfOperations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHoursOfOperations
ListHoursOfOperationsResponse
rs
            ListHoursOfOperationsResponse
-> Getting (First Text) ListHoursOfOperationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHoursOfOperationsResponse
-> Const (First Text) ListHoursOfOperationsResponse
Lens' ListHoursOfOperationsResponse (Maybe Text)
listHoursOfOperationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListHoursOfOperationsResponse
 -> Const (First Text) ListHoursOfOperationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHoursOfOperationsResponse 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 ListHoursOfOperations
forall a. Maybe a
Prelude.Nothing
    | Maybe [HoursOfOperationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHoursOfOperations
ListHoursOfOperationsResponse
rs
            ListHoursOfOperationsResponse
-> Getting
     (First [HoursOfOperationSummary])
     ListHoursOfOperationsResponse
     [HoursOfOperationSummary]
-> Maybe [HoursOfOperationSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [HoursOfOperationSummary]
 -> Const
      (First [HoursOfOperationSummary])
      (Maybe [HoursOfOperationSummary]))
-> ListHoursOfOperationsResponse
-> Const
     (First [HoursOfOperationSummary]) ListHoursOfOperationsResponse
Lens'
  ListHoursOfOperationsResponse (Maybe [HoursOfOperationSummary])
listHoursOfOperationsResponse_hoursOfOperationSummaryList
              ((Maybe [HoursOfOperationSummary]
  -> Const
       (First [HoursOfOperationSummary])
       (Maybe [HoursOfOperationSummary]))
 -> ListHoursOfOperationsResponse
 -> Const
      (First [HoursOfOperationSummary]) ListHoursOfOperationsResponse)
-> (([HoursOfOperationSummary]
     -> Const
          (First [HoursOfOperationSummary]) [HoursOfOperationSummary])
    -> Maybe [HoursOfOperationSummary]
    -> Const
         (First [HoursOfOperationSummary])
         (Maybe [HoursOfOperationSummary]))
-> Getting
     (First [HoursOfOperationSummary])
     ListHoursOfOperationsResponse
     [HoursOfOperationSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HoursOfOperationSummary]
 -> Const
      (First [HoursOfOperationSummary]) [HoursOfOperationSummary])
-> Maybe [HoursOfOperationSummary]
-> Const
     (First [HoursOfOperationSummary]) (Maybe [HoursOfOperationSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListHoursOfOperations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListHoursOfOperations -> Maybe ListHoursOfOperations
forall a. a -> Maybe a
Prelude.Just (ListHoursOfOperations -> Maybe ListHoursOfOperations)
-> ListHoursOfOperations -> Maybe ListHoursOfOperations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListHoursOfOperations
rq
          ListHoursOfOperations
-> (ListHoursOfOperations -> ListHoursOfOperations)
-> ListHoursOfOperations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListHoursOfOperations -> Identity ListHoursOfOperations
Lens
  ListHoursOfOperations
  ListHoursOfOperations
  (Maybe Text)
  (Maybe Text)
listHoursOfOperations_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListHoursOfOperations -> Identity ListHoursOfOperations)
-> Maybe Text -> ListHoursOfOperations -> ListHoursOfOperations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListHoursOfOperations
ListHoursOfOperationsResponse
rs
          ListHoursOfOperationsResponse
-> Getting (First Text) ListHoursOfOperationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHoursOfOperationsResponse
-> Const (First Text) ListHoursOfOperationsResponse
Lens' ListHoursOfOperationsResponse (Maybe Text)
listHoursOfOperationsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListHoursOfOperationsResponse
 -> Const (First Text) ListHoursOfOperationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHoursOfOperationsResponse 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 ListHoursOfOperations where
  type
    AWSResponse ListHoursOfOperations =
      ListHoursOfOperationsResponse
  request :: ListHoursOfOperations -> Request ListHoursOfOperations
request = Service -> ListHoursOfOperations -> Request ListHoursOfOperations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListHoursOfOperations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListHoursOfOperations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListHoursOfOperations))
-> Logger
-> Service
-> Proxy ListHoursOfOperations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListHoursOfOperations)))
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 [HoursOfOperationSummary]
-> Int
-> ListHoursOfOperationsResponse
ListHoursOfOperationsResponse'
            (Maybe Text
 -> Maybe [HoursOfOperationSummary]
 -> Int
 -> ListHoursOfOperationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [HoursOfOperationSummary]
      -> Int -> ListHoursOfOperationsResponse)
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 [HoursOfOperationSummary]
   -> Int -> ListHoursOfOperationsResponse)
-> Either String (Maybe [HoursOfOperationSummary])
-> Either String (Int -> ListHoursOfOperationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [HoursOfOperationSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HoursOfOperationSummaryList"
                            Either String (Maybe (Maybe [HoursOfOperationSummary]))
-> Maybe [HoursOfOperationSummary]
-> Either String (Maybe [HoursOfOperationSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [HoursOfOperationSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListHoursOfOperationsResponse)
-> Either String Int -> Either String ListHoursOfOperationsResponse
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 ListHoursOfOperations

instance Prelude.NFData ListHoursOfOperations

instance Core.ToHeaders ListHoursOfOperations where
  toHeaders :: ListHoursOfOperations -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListHoursOfOperations -> 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 ListHoursOfOperations where
  toPath :: ListHoursOfOperations -> ByteString
toPath ListHoursOfOperations' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListHoursOfOperations' :: ListHoursOfOperations -> Text
$sel:maxResults:ListHoursOfOperations' :: ListHoursOfOperations -> Maybe Natural
$sel:nextToken:ListHoursOfOperations' :: ListHoursOfOperations -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/hours-of-operations-summary/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId
      ]

instance Core.ToQuery ListHoursOfOperations where
  toQuery :: ListHoursOfOperations -> QueryString
toQuery ListHoursOfOperations' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListHoursOfOperations' :: ListHoursOfOperations -> Text
$sel:maxResults:ListHoursOfOperations' :: ListHoursOfOperations -> Maybe Natural
$sel:nextToken:ListHoursOfOperations' :: ListHoursOfOperations -> 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:/ 'newListHoursOfOperationsResponse' smart constructor.
data ListHoursOfOperationsResponse = ListHoursOfOperationsResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    ListHoursOfOperationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the hours of operation.
    ListHoursOfOperationsResponse -> Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList :: Prelude.Maybe [HoursOfOperationSummary],
    -- | The response's http status code.
    ListHoursOfOperationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListHoursOfOperationsResponse
-> ListHoursOfOperationsResponse -> Bool
(ListHoursOfOperationsResponse
 -> ListHoursOfOperationsResponse -> Bool)
-> (ListHoursOfOperationsResponse
    -> ListHoursOfOperationsResponse -> Bool)
-> Eq ListHoursOfOperationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHoursOfOperationsResponse
-> ListHoursOfOperationsResponse -> Bool
$c/= :: ListHoursOfOperationsResponse
-> ListHoursOfOperationsResponse -> Bool
== :: ListHoursOfOperationsResponse
-> ListHoursOfOperationsResponse -> Bool
$c== :: ListHoursOfOperationsResponse
-> ListHoursOfOperationsResponse -> Bool
Prelude.Eq, ReadPrec [ListHoursOfOperationsResponse]
ReadPrec ListHoursOfOperationsResponse
Int -> ReadS ListHoursOfOperationsResponse
ReadS [ListHoursOfOperationsResponse]
(Int -> ReadS ListHoursOfOperationsResponse)
-> ReadS [ListHoursOfOperationsResponse]
-> ReadPrec ListHoursOfOperationsResponse
-> ReadPrec [ListHoursOfOperationsResponse]
-> Read ListHoursOfOperationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHoursOfOperationsResponse]
$creadListPrec :: ReadPrec [ListHoursOfOperationsResponse]
readPrec :: ReadPrec ListHoursOfOperationsResponse
$creadPrec :: ReadPrec ListHoursOfOperationsResponse
readList :: ReadS [ListHoursOfOperationsResponse]
$creadList :: ReadS [ListHoursOfOperationsResponse]
readsPrec :: Int -> ReadS ListHoursOfOperationsResponse
$creadsPrec :: Int -> ReadS ListHoursOfOperationsResponse
Prelude.Read, Int -> ListHoursOfOperationsResponse -> ShowS
[ListHoursOfOperationsResponse] -> ShowS
ListHoursOfOperationsResponse -> String
(Int -> ListHoursOfOperationsResponse -> ShowS)
-> (ListHoursOfOperationsResponse -> String)
-> ([ListHoursOfOperationsResponse] -> ShowS)
-> Show ListHoursOfOperationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHoursOfOperationsResponse] -> ShowS
$cshowList :: [ListHoursOfOperationsResponse] -> ShowS
show :: ListHoursOfOperationsResponse -> String
$cshow :: ListHoursOfOperationsResponse -> String
showsPrec :: Int -> ListHoursOfOperationsResponse -> ShowS
$cshowsPrec :: Int -> ListHoursOfOperationsResponse -> ShowS
Prelude.Show, (forall x.
 ListHoursOfOperationsResponse
 -> Rep ListHoursOfOperationsResponse x)
-> (forall x.
    Rep ListHoursOfOperationsResponse x
    -> ListHoursOfOperationsResponse)
-> Generic ListHoursOfOperationsResponse
forall x.
Rep ListHoursOfOperationsResponse x
-> ListHoursOfOperationsResponse
forall x.
ListHoursOfOperationsResponse
-> Rep ListHoursOfOperationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHoursOfOperationsResponse x
-> ListHoursOfOperationsResponse
$cfrom :: forall x.
ListHoursOfOperationsResponse
-> Rep ListHoursOfOperationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHoursOfOperationsResponse' 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', 'listHoursOfOperationsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'hoursOfOperationSummaryList', 'listHoursOfOperationsResponse_hoursOfOperationSummaryList' - Information about the hours of operation.
--
-- 'httpStatus', 'listHoursOfOperationsResponse_httpStatus' - The response's http status code.
newListHoursOfOperationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListHoursOfOperationsResponse
newListHoursOfOperationsResponse :: Int -> ListHoursOfOperationsResponse
newListHoursOfOperationsResponse Int
pHttpStatus_ =
  ListHoursOfOperationsResponse' :: Maybe Text
-> Maybe [HoursOfOperationSummary]
-> Int
-> ListHoursOfOperationsResponse
ListHoursOfOperationsResponse'
    { $sel:nextToken:ListHoursOfOperationsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hoursOfOperationSummaryList:ListHoursOfOperationsResponse' :: Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList =
        Maybe [HoursOfOperationSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListHoursOfOperationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If there are additional results, this is the token for the next set of
-- results.
listHoursOfOperationsResponse_nextToken :: Lens.Lens' ListHoursOfOperationsResponse (Prelude.Maybe Prelude.Text)
listHoursOfOperationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHoursOfOperationsResponse -> f ListHoursOfOperationsResponse
listHoursOfOperationsResponse_nextToken = (ListHoursOfOperationsResponse -> Maybe Text)
-> (ListHoursOfOperationsResponse
    -> Maybe Text -> ListHoursOfOperationsResponse)
-> Lens' ListHoursOfOperationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHoursOfOperationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHoursOfOperationsResponse' :: ListHoursOfOperationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHoursOfOperationsResponse
s@ListHoursOfOperationsResponse' {} Maybe Text
a -> ListHoursOfOperationsResponse
s {$sel:nextToken:ListHoursOfOperationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHoursOfOperationsResponse)

-- | Information about the hours of operation.
listHoursOfOperationsResponse_hoursOfOperationSummaryList :: Lens.Lens' ListHoursOfOperationsResponse (Prelude.Maybe [HoursOfOperationSummary])
listHoursOfOperationsResponse_hoursOfOperationSummaryList :: (Maybe [HoursOfOperationSummary]
 -> f (Maybe [HoursOfOperationSummary]))
-> ListHoursOfOperationsResponse -> f ListHoursOfOperationsResponse
listHoursOfOperationsResponse_hoursOfOperationSummaryList = (ListHoursOfOperationsResponse -> Maybe [HoursOfOperationSummary])
-> (ListHoursOfOperationsResponse
    -> Maybe [HoursOfOperationSummary]
    -> ListHoursOfOperationsResponse)
-> Lens'
     ListHoursOfOperationsResponse (Maybe [HoursOfOperationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHoursOfOperationsResponse' {Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList :: Maybe [HoursOfOperationSummary]
$sel:hoursOfOperationSummaryList:ListHoursOfOperationsResponse' :: ListHoursOfOperationsResponse -> Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList} -> Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList) (\s :: ListHoursOfOperationsResponse
s@ListHoursOfOperationsResponse' {} Maybe [HoursOfOperationSummary]
a -> ListHoursOfOperationsResponse
s {$sel:hoursOfOperationSummaryList:ListHoursOfOperationsResponse' :: Maybe [HoursOfOperationSummary]
hoursOfOperationSummaryList = Maybe [HoursOfOperationSummary]
a} :: ListHoursOfOperationsResponse) ((Maybe [HoursOfOperationSummary]
  -> f (Maybe [HoursOfOperationSummary]))
 -> ListHoursOfOperationsResponse
 -> f ListHoursOfOperationsResponse)
-> ((Maybe [HoursOfOperationSummary]
     -> f (Maybe [HoursOfOperationSummary]))
    -> Maybe [HoursOfOperationSummary]
    -> f (Maybe [HoursOfOperationSummary]))
-> (Maybe [HoursOfOperationSummary]
    -> f (Maybe [HoursOfOperationSummary]))
-> ListHoursOfOperationsResponse
-> f ListHoursOfOperationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
-> Iso
     (Maybe [HoursOfOperationSummary])
     (Maybe [HoursOfOperationSummary])
     (Maybe [HoursOfOperationSummary])
     (Maybe [HoursOfOperationSummary])
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
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
  [HoursOfOperationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListHoursOfOperationsResponse