{-# 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.DescribeGroup
-- 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)
--
-- Returns the data available for the group.
module Amazonka.WorkMail.DescribeGroup
  ( -- * Creating a Request
    DescribeGroup (..),
    newDescribeGroup,

    -- * Request Lenses
    describeGroup_organizationId,
    describeGroup_groupId,

    -- * Destructuring the Response
    DescribeGroupResponse (..),
    newDescribeGroupResponse,

    -- * Response Lenses
    describeGroupResponse_email,
    describeGroupResponse_state,
    describeGroupResponse_disabledDate,
    describeGroupResponse_name,
    describeGroupResponse_groupId,
    describeGroupResponse_enabledDate,
    describeGroupResponse_httpStatus,
  )
where

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
import Amazonka.WorkMail.Types

-- | /See:/ 'newDescribeGroup' smart constructor.
data DescribeGroup = DescribeGroup'
  { -- | The identifier for the organization under which the group exists.
    DescribeGroup -> Text
organizationId :: Prelude.Text,
    -- | The identifier for the group to be described.
    DescribeGroup -> Text
groupId :: Prelude.Text
  }
  deriving (DescribeGroup -> DescribeGroup -> Bool
(DescribeGroup -> DescribeGroup -> Bool)
-> (DescribeGroup -> DescribeGroup -> Bool) -> Eq DescribeGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGroup -> DescribeGroup -> Bool
$c/= :: DescribeGroup -> DescribeGroup -> Bool
== :: DescribeGroup -> DescribeGroup -> Bool
$c== :: DescribeGroup -> DescribeGroup -> Bool
Prelude.Eq, ReadPrec [DescribeGroup]
ReadPrec DescribeGroup
Int -> ReadS DescribeGroup
ReadS [DescribeGroup]
(Int -> ReadS DescribeGroup)
-> ReadS [DescribeGroup]
-> ReadPrec DescribeGroup
-> ReadPrec [DescribeGroup]
-> Read DescribeGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGroup]
$creadListPrec :: ReadPrec [DescribeGroup]
readPrec :: ReadPrec DescribeGroup
$creadPrec :: ReadPrec DescribeGroup
readList :: ReadS [DescribeGroup]
$creadList :: ReadS [DescribeGroup]
readsPrec :: Int -> ReadS DescribeGroup
$creadsPrec :: Int -> ReadS DescribeGroup
Prelude.Read, Int -> DescribeGroup -> ShowS
[DescribeGroup] -> ShowS
DescribeGroup -> String
(Int -> DescribeGroup -> ShowS)
-> (DescribeGroup -> String)
-> ([DescribeGroup] -> ShowS)
-> Show DescribeGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGroup] -> ShowS
$cshowList :: [DescribeGroup] -> ShowS
show :: DescribeGroup -> String
$cshow :: DescribeGroup -> String
showsPrec :: Int -> DescribeGroup -> ShowS
$cshowsPrec :: Int -> DescribeGroup -> ShowS
Prelude.Show, (forall x. DescribeGroup -> Rep DescribeGroup x)
-> (forall x. Rep DescribeGroup x -> DescribeGroup)
-> Generic DescribeGroup
forall x. Rep DescribeGroup x -> DescribeGroup
forall x. DescribeGroup -> Rep DescribeGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeGroup x -> DescribeGroup
$cfrom :: forall x. DescribeGroup -> Rep DescribeGroup x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGroup' 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:
--
-- 'organizationId', 'describeGroup_organizationId' - The identifier for the organization under which the group exists.
--
-- 'groupId', 'describeGroup_groupId' - The identifier for the group to be described.
newDescribeGroup ::
  -- | 'organizationId'
  Prelude.Text ->
  -- | 'groupId'
  Prelude.Text ->
  DescribeGroup
newDescribeGroup :: Text -> Text -> DescribeGroup
newDescribeGroup Text
pOrganizationId_ Text
pGroupId_ =
  DescribeGroup' :: Text -> Text -> DescribeGroup
DescribeGroup'
    { $sel:organizationId:DescribeGroup' :: Text
organizationId = Text
pOrganizationId_,
      $sel:groupId:DescribeGroup' :: Text
groupId = Text
pGroupId_
    }

-- | The identifier for the organization under which the group exists.
describeGroup_organizationId :: Lens.Lens' DescribeGroup Prelude.Text
describeGroup_organizationId :: (Text -> f Text) -> DescribeGroup -> f DescribeGroup
describeGroup_organizationId = (DescribeGroup -> Text)
-> (DescribeGroup -> Text -> DescribeGroup)
-> Lens DescribeGroup DescribeGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroup' {Text
organizationId :: Text
$sel:organizationId:DescribeGroup' :: DescribeGroup -> Text
organizationId} -> Text
organizationId) (\s :: DescribeGroup
s@DescribeGroup' {} Text
a -> DescribeGroup
s {$sel:organizationId:DescribeGroup' :: Text
organizationId = Text
a} :: DescribeGroup)

-- | The identifier for the group to be described.
describeGroup_groupId :: Lens.Lens' DescribeGroup Prelude.Text
describeGroup_groupId :: (Text -> f Text) -> DescribeGroup -> f DescribeGroup
describeGroup_groupId = (DescribeGroup -> Text)
-> (DescribeGroup -> Text -> DescribeGroup)
-> Lens DescribeGroup DescribeGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroup' {Text
groupId :: Text
$sel:groupId:DescribeGroup' :: DescribeGroup -> Text
groupId} -> Text
groupId) (\s :: DescribeGroup
s@DescribeGroup' {} Text
a -> DescribeGroup
s {$sel:groupId:DescribeGroup' :: Text
groupId = Text
a} :: DescribeGroup)

instance Core.AWSRequest DescribeGroup where
  type
    AWSResponse DescribeGroup =
      DescribeGroupResponse
  request :: DescribeGroup -> Request DescribeGroup
request = Service -> DescribeGroup -> Request DescribeGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeGroup))
-> Logger
-> Service
-> Proxy DescribeGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeGroup)))
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 EntityState
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeGroupResponse
DescribeGroupResponse'
            (Maybe Text
 -> Maybe EntityState
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> DescribeGroupResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe EntityState
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeGroupResponse)
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
"Email")
            Either
  String
  (Maybe EntityState
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeGroupResponse)
-> Either String (Maybe EntityState)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> DescribeGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe EntityState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"State")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> DescribeGroupResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> Int -> DescribeGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DisabledDate")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> Int -> DescribeGroupResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe POSIX -> Int -> DescribeGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String (Maybe Text -> Maybe POSIX -> Int -> DescribeGroupResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> DescribeGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GroupId")
            Either String (Maybe POSIX -> Int -> DescribeGroupResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DescribeGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EnabledDate")
            Either String (Int -> DescribeGroupResponse)
-> Either String Int -> Either String DescribeGroupResponse
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 DescribeGroup

instance Prelude.NFData DescribeGroup

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

instance Core.ToJSON DescribeGroup where
  toJSON :: DescribeGroup -> Value
toJSON DescribeGroup' {Text
groupId :: Text
organizationId :: Text
$sel:groupId:DescribeGroup' :: DescribeGroup -> Text
$sel:organizationId:DescribeGroup' :: DescribeGroup -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OrganizationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
groupId)
          ]
      )

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

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

-- | /See:/ 'newDescribeGroupResponse' smart constructor.
data DescribeGroupResponse = DescribeGroupResponse'
  { -- | The email of the described group.
    DescribeGroupResponse -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
    -- | The state of the user: enabled (registered to Amazon WorkMail) or
    -- disabled (deregistered or never registered to WorkMail).
    DescribeGroupResponse -> Maybe EntityState
state :: Prelude.Maybe EntityState,
    -- | The date and time when a user was deregistered from WorkMail, in UNIX
    -- epoch time format.
    DescribeGroupResponse -> Maybe POSIX
disabledDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the described group.
    DescribeGroupResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the described group.
    DescribeGroupResponse -> Maybe Text
groupId :: Prelude.Maybe Prelude.Text,
    -- | The date and time when a user was registered to WorkMail, in UNIX epoch
    -- time format.
    DescribeGroupResponse -> Maybe POSIX
enabledDate :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeGroupResponse -> DescribeGroupResponse -> Bool
(DescribeGroupResponse -> DescribeGroupResponse -> Bool)
-> (DescribeGroupResponse -> DescribeGroupResponse -> Bool)
-> Eq DescribeGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGroupResponse -> DescribeGroupResponse -> Bool
$c/= :: DescribeGroupResponse -> DescribeGroupResponse -> Bool
== :: DescribeGroupResponse -> DescribeGroupResponse -> Bool
$c== :: DescribeGroupResponse -> DescribeGroupResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGroupResponse]
ReadPrec DescribeGroupResponse
Int -> ReadS DescribeGroupResponse
ReadS [DescribeGroupResponse]
(Int -> ReadS DescribeGroupResponse)
-> ReadS [DescribeGroupResponse]
-> ReadPrec DescribeGroupResponse
-> ReadPrec [DescribeGroupResponse]
-> Read DescribeGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGroupResponse]
$creadListPrec :: ReadPrec [DescribeGroupResponse]
readPrec :: ReadPrec DescribeGroupResponse
$creadPrec :: ReadPrec DescribeGroupResponse
readList :: ReadS [DescribeGroupResponse]
$creadList :: ReadS [DescribeGroupResponse]
readsPrec :: Int -> ReadS DescribeGroupResponse
$creadsPrec :: Int -> ReadS DescribeGroupResponse
Prelude.Read, Int -> DescribeGroupResponse -> ShowS
[DescribeGroupResponse] -> ShowS
DescribeGroupResponse -> String
(Int -> DescribeGroupResponse -> ShowS)
-> (DescribeGroupResponse -> String)
-> ([DescribeGroupResponse] -> ShowS)
-> Show DescribeGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGroupResponse] -> ShowS
$cshowList :: [DescribeGroupResponse] -> ShowS
show :: DescribeGroupResponse -> String
$cshow :: DescribeGroupResponse -> String
showsPrec :: Int -> DescribeGroupResponse -> ShowS
$cshowsPrec :: Int -> DescribeGroupResponse -> ShowS
Prelude.Show, (forall x. DescribeGroupResponse -> Rep DescribeGroupResponse x)
-> (forall x. Rep DescribeGroupResponse x -> DescribeGroupResponse)
-> Generic DescribeGroupResponse
forall x. Rep DescribeGroupResponse x -> DescribeGroupResponse
forall x. DescribeGroupResponse -> Rep DescribeGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeGroupResponse x -> DescribeGroupResponse
$cfrom :: forall x. DescribeGroupResponse -> Rep DescribeGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGroupResponse' 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:
--
-- 'email', 'describeGroupResponse_email' - The email of the described group.
--
-- 'state', 'describeGroupResponse_state' - The state of the user: enabled (registered to Amazon WorkMail) or
-- disabled (deregistered or never registered to WorkMail).
--
-- 'disabledDate', 'describeGroupResponse_disabledDate' - The date and time when a user was deregistered from WorkMail, in UNIX
-- epoch time format.
--
-- 'name', 'describeGroupResponse_name' - The name of the described group.
--
-- 'groupId', 'describeGroupResponse_groupId' - The identifier of the described group.
--
-- 'enabledDate', 'describeGroupResponse_enabledDate' - The date and time when a user was registered to WorkMail, in UNIX epoch
-- time format.
--
-- 'httpStatus', 'describeGroupResponse_httpStatus' - The response's http status code.
newDescribeGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeGroupResponse
newDescribeGroupResponse :: Int -> DescribeGroupResponse
newDescribeGroupResponse Int
pHttpStatus_ =
  DescribeGroupResponse' :: Maybe Text
-> Maybe EntityState
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DescribeGroupResponse
DescribeGroupResponse'
    { $sel:email:DescribeGroupResponse' :: Maybe Text
email = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:DescribeGroupResponse' :: Maybe EntityState
state = Maybe EntityState
forall a. Maybe a
Prelude.Nothing,
      $sel:disabledDate:DescribeGroupResponse' :: Maybe POSIX
disabledDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeGroupResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:groupId:DescribeGroupResponse' :: Maybe Text
groupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabledDate:DescribeGroupResponse' :: Maybe POSIX
enabledDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The email of the described group.
describeGroupResponse_email :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe Prelude.Text)
describeGroupResponse_email :: (Maybe Text -> f (Maybe Text))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_email = (DescribeGroupResponse -> Maybe Text)
-> (DescribeGroupResponse -> Maybe Text -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe Text
email :: Maybe Text
$sel:email:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe Text
email} -> Maybe Text
email) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe Text
a -> DescribeGroupResponse
s {$sel:email:DescribeGroupResponse' :: Maybe Text
email = Maybe Text
a} :: DescribeGroupResponse)

-- | The state of the user: enabled (registered to Amazon WorkMail) or
-- disabled (deregistered or never registered to WorkMail).
describeGroupResponse_state :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe EntityState)
describeGroupResponse_state :: (Maybe EntityState -> f (Maybe EntityState))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_state = (DescribeGroupResponse -> Maybe EntityState)
-> (DescribeGroupResponse
    -> Maybe EntityState -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe EntityState)
     (Maybe EntityState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe EntityState
state :: Maybe EntityState
$sel:state:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe EntityState
state} -> Maybe EntityState
state) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe EntityState
a -> DescribeGroupResponse
s {$sel:state:DescribeGroupResponse' :: Maybe EntityState
state = Maybe EntityState
a} :: DescribeGroupResponse)

-- | The date and time when a user was deregistered from WorkMail, in UNIX
-- epoch time format.
describeGroupResponse_disabledDate :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe Prelude.UTCTime)
describeGroupResponse_disabledDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_disabledDate = (DescribeGroupResponse -> Maybe POSIX)
-> (DescribeGroupResponse -> Maybe POSIX -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe POSIX
disabledDate :: Maybe POSIX
$sel:disabledDate:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe POSIX
disabledDate} -> Maybe POSIX
disabledDate) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe POSIX
a -> DescribeGroupResponse
s {$sel:disabledDate:DescribeGroupResponse' :: Maybe POSIX
disabledDate = Maybe POSIX
a} :: DescribeGroupResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeGroupResponse -> f DescribeGroupResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeGroupResponse
-> f DescribeGroupResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the described group.
describeGroupResponse_name :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe Prelude.Text)
describeGroupResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_name = (DescribeGroupResponse -> Maybe Text)
-> (DescribeGroupResponse -> Maybe Text -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe Text
a -> DescribeGroupResponse
s {$sel:name:DescribeGroupResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeGroupResponse)

-- | The identifier of the described group.
describeGroupResponse_groupId :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe Prelude.Text)
describeGroupResponse_groupId :: (Maybe Text -> f (Maybe Text))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_groupId = (DescribeGroupResponse -> Maybe Text)
-> (DescribeGroupResponse -> Maybe Text -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe Text
groupId :: Maybe Text
$sel:groupId:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe Text
groupId} -> Maybe Text
groupId) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe Text
a -> DescribeGroupResponse
s {$sel:groupId:DescribeGroupResponse' :: Maybe Text
groupId = Maybe Text
a} :: DescribeGroupResponse)

-- | The date and time when a user was registered to WorkMail, in UNIX epoch
-- time format.
describeGroupResponse_enabledDate :: Lens.Lens' DescribeGroupResponse (Prelude.Maybe Prelude.UTCTime)
describeGroupResponse_enabledDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeGroupResponse -> f DescribeGroupResponse
describeGroupResponse_enabledDate = (DescribeGroupResponse -> Maybe POSIX)
-> (DescribeGroupResponse -> Maybe POSIX -> DescribeGroupResponse)
-> Lens
     DescribeGroupResponse
     DescribeGroupResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGroupResponse' {Maybe POSIX
enabledDate :: Maybe POSIX
$sel:enabledDate:DescribeGroupResponse' :: DescribeGroupResponse -> Maybe POSIX
enabledDate} -> Maybe POSIX
enabledDate) (\s :: DescribeGroupResponse
s@DescribeGroupResponse' {} Maybe POSIX
a -> DescribeGroupResponse
s {$sel:enabledDate:DescribeGroupResponse' :: Maybe POSIX
enabledDate = Maybe POSIX
a} :: DescribeGroupResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeGroupResponse -> f DescribeGroupResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeGroupResponse
-> f DescribeGroupResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance Prelude.NFData DescribeGroupResponse