{-# 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.ComputeOptimizer.GetEnrollmentStatus
-- 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 enrollment (opt in) status of an account to the Compute
-- Optimizer service.
--
-- If the account is the management account of an organization, this action
-- also confirms the enrollment status of member accounts of the
-- organization. Use the GetEnrollmentStatusesForOrganization action to get
-- detailed information about the enrollment status of member accounts of
-- an organization.
module Amazonka.ComputeOptimizer.GetEnrollmentStatus
  ( -- * Creating a Request
    GetEnrollmentStatus (..),
    newGetEnrollmentStatus,

    -- * Destructuring the Response
    GetEnrollmentStatusResponse (..),
    newGetEnrollmentStatusResponse,

    -- * Response Lenses
    getEnrollmentStatusResponse_status,
    getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn,
    getEnrollmentStatusResponse_memberAccountsEnrolled,
    getEnrollmentStatusResponse_statusReason,
    getEnrollmentStatusResponse_lastUpdatedTimestamp,
    getEnrollmentStatusResponse_httpStatus,
  )
where

import Amazonka.ComputeOptimizer.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:/ 'newGetEnrollmentStatus' smart constructor.
data GetEnrollmentStatus = GetEnrollmentStatus'
  {
  }
  deriving (GetEnrollmentStatus -> GetEnrollmentStatus -> Bool
(GetEnrollmentStatus -> GetEnrollmentStatus -> Bool)
-> (GetEnrollmentStatus -> GetEnrollmentStatus -> Bool)
-> Eq GetEnrollmentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEnrollmentStatus -> GetEnrollmentStatus -> Bool
$c/= :: GetEnrollmentStatus -> GetEnrollmentStatus -> Bool
== :: GetEnrollmentStatus -> GetEnrollmentStatus -> Bool
$c== :: GetEnrollmentStatus -> GetEnrollmentStatus -> Bool
Prelude.Eq, ReadPrec [GetEnrollmentStatus]
ReadPrec GetEnrollmentStatus
Int -> ReadS GetEnrollmentStatus
ReadS [GetEnrollmentStatus]
(Int -> ReadS GetEnrollmentStatus)
-> ReadS [GetEnrollmentStatus]
-> ReadPrec GetEnrollmentStatus
-> ReadPrec [GetEnrollmentStatus]
-> Read GetEnrollmentStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEnrollmentStatus]
$creadListPrec :: ReadPrec [GetEnrollmentStatus]
readPrec :: ReadPrec GetEnrollmentStatus
$creadPrec :: ReadPrec GetEnrollmentStatus
readList :: ReadS [GetEnrollmentStatus]
$creadList :: ReadS [GetEnrollmentStatus]
readsPrec :: Int -> ReadS GetEnrollmentStatus
$creadsPrec :: Int -> ReadS GetEnrollmentStatus
Prelude.Read, Int -> GetEnrollmentStatus -> ShowS
[GetEnrollmentStatus] -> ShowS
GetEnrollmentStatus -> String
(Int -> GetEnrollmentStatus -> ShowS)
-> (GetEnrollmentStatus -> String)
-> ([GetEnrollmentStatus] -> ShowS)
-> Show GetEnrollmentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEnrollmentStatus] -> ShowS
$cshowList :: [GetEnrollmentStatus] -> ShowS
show :: GetEnrollmentStatus -> String
$cshow :: GetEnrollmentStatus -> String
showsPrec :: Int -> GetEnrollmentStatus -> ShowS
$cshowsPrec :: Int -> GetEnrollmentStatus -> ShowS
Prelude.Show, (forall x. GetEnrollmentStatus -> Rep GetEnrollmentStatus x)
-> (forall x. Rep GetEnrollmentStatus x -> GetEnrollmentStatus)
-> Generic GetEnrollmentStatus
forall x. Rep GetEnrollmentStatus x -> GetEnrollmentStatus
forall x. GetEnrollmentStatus -> Rep GetEnrollmentStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEnrollmentStatus x -> GetEnrollmentStatus
$cfrom :: forall x. GetEnrollmentStatus -> Rep GetEnrollmentStatus x
Prelude.Generic)

-- |
-- Create a value of 'GetEnrollmentStatus' 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.
newGetEnrollmentStatus ::
  GetEnrollmentStatus
newGetEnrollmentStatus :: GetEnrollmentStatus
newGetEnrollmentStatus = GetEnrollmentStatus
GetEnrollmentStatus'

instance Core.AWSRequest GetEnrollmentStatus where
  type
    AWSResponse GetEnrollmentStatus =
      GetEnrollmentStatusResponse
  request :: GetEnrollmentStatus -> Request GetEnrollmentStatus
request = Service -> GetEnrollmentStatus -> Request GetEnrollmentStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetEnrollmentStatus
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetEnrollmentStatus)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetEnrollmentStatus))
-> Logger
-> Service
-> Proxy GetEnrollmentStatus
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetEnrollmentStatus)))
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 Status
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Int
-> GetEnrollmentStatusResponse
GetEnrollmentStatusResponse'
            (Maybe Status
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> GetEnrollmentStatusResponse)
-> Either String (Maybe Status)
-> Either
     String
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> GetEnrollmentStatusResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Status)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> GetEnrollmentStatusResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Bool
      -> Maybe Text -> Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"numberOfMemberAccountsOptedIn")
            Either
  String
  (Maybe Bool
   -> Maybe Text -> Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text -> Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"memberAccountsEnrolled")
            Either
  String
  (Maybe Text -> Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
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
"statusReason")
            Either String (Maybe POSIX -> Int -> GetEnrollmentStatusResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> GetEnrollmentStatusResponse)
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
"lastUpdatedTimestamp")
            Either String (Int -> GetEnrollmentStatusResponse)
-> Either String Int -> Either String GetEnrollmentStatusResponse
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 GetEnrollmentStatus

instance Prelude.NFData GetEnrollmentStatus

instance Core.ToHeaders GetEnrollmentStatus where
  toHeaders :: GetEnrollmentStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetEnrollmentStatus -> 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
"ComputeOptimizerService.GetEnrollmentStatus" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetEnrollmentStatus where
  toJSON :: GetEnrollmentStatus -> Value
toJSON = Value -> GetEnrollmentStatus -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

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

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

-- | /See:/ 'newGetEnrollmentStatusResponse' smart constructor.
data GetEnrollmentStatusResponse = GetEnrollmentStatusResponse'
  { -- | The enrollment status of the account.
    GetEnrollmentStatusResponse -> Maybe Status
status :: Prelude.Maybe Status,
    -- | The count of organization member accounts that are opted in to the
    -- service, if your account is an organization management account.
    GetEnrollmentStatusResponse -> Maybe Int
numberOfMemberAccountsOptedIn :: Prelude.Maybe Prelude.Int,
    -- | Confirms the enrollment status of member accounts of the organization,
    -- if the account is a management account of an organization.
    GetEnrollmentStatusResponse -> Maybe Bool
memberAccountsEnrolled :: Prelude.Maybe Prelude.Bool,
    -- | The reason for the enrollment status of the account.
    --
    -- For example, an account might show a status of @Pending@ because member
    -- accounts of an organization require more time to be enrolled in the
    -- service.
    GetEnrollmentStatusResponse -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
    -- | The Unix epoch timestamp, in seconds, of when the account enrollment
    -- status was last updated.
    GetEnrollmentStatusResponse -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    GetEnrollmentStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEnrollmentStatusResponse -> GetEnrollmentStatusResponse -> Bool
(GetEnrollmentStatusResponse
 -> GetEnrollmentStatusResponse -> Bool)
-> (GetEnrollmentStatusResponse
    -> GetEnrollmentStatusResponse -> Bool)
-> Eq GetEnrollmentStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEnrollmentStatusResponse -> GetEnrollmentStatusResponse -> Bool
$c/= :: GetEnrollmentStatusResponse -> GetEnrollmentStatusResponse -> Bool
== :: GetEnrollmentStatusResponse -> GetEnrollmentStatusResponse -> Bool
$c== :: GetEnrollmentStatusResponse -> GetEnrollmentStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetEnrollmentStatusResponse]
ReadPrec GetEnrollmentStatusResponse
Int -> ReadS GetEnrollmentStatusResponse
ReadS [GetEnrollmentStatusResponse]
(Int -> ReadS GetEnrollmentStatusResponse)
-> ReadS [GetEnrollmentStatusResponse]
-> ReadPrec GetEnrollmentStatusResponse
-> ReadPrec [GetEnrollmentStatusResponse]
-> Read GetEnrollmentStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEnrollmentStatusResponse]
$creadListPrec :: ReadPrec [GetEnrollmentStatusResponse]
readPrec :: ReadPrec GetEnrollmentStatusResponse
$creadPrec :: ReadPrec GetEnrollmentStatusResponse
readList :: ReadS [GetEnrollmentStatusResponse]
$creadList :: ReadS [GetEnrollmentStatusResponse]
readsPrec :: Int -> ReadS GetEnrollmentStatusResponse
$creadsPrec :: Int -> ReadS GetEnrollmentStatusResponse
Prelude.Read, Int -> GetEnrollmentStatusResponse -> ShowS
[GetEnrollmentStatusResponse] -> ShowS
GetEnrollmentStatusResponse -> String
(Int -> GetEnrollmentStatusResponse -> ShowS)
-> (GetEnrollmentStatusResponse -> String)
-> ([GetEnrollmentStatusResponse] -> ShowS)
-> Show GetEnrollmentStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEnrollmentStatusResponse] -> ShowS
$cshowList :: [GetEnrollmentStatusResponse] -> ShowS
show :: GetEnrollmentStatusResponse -> String
$cshow :: GetEnrollmentStatusResponse -> String
showsPrec :: Int -> GetEnrollmentStatusResponse -> ShowS
$cshowsPrec :: Int -> GetEnrollmentStatusResponse -> ShowS
Prelude.Show, (forall x.
 GetEnrollmentStatusResponse -> Rep GetEnrollmentStatusResponse x)
-> (forall x.
    Rep GetEnrollmentStatusResponse x -> GetEnrollmentStatusResponse)
-> Generic GetEnrollmentStatusResponse
forall x.
Rep GetEnrollmentStatusResponse x -> GetEnrollmentStatusResponse
forall x.
GetEnrollmentStatusResponse -> Rep GetEnrollmentStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEnrollmentStatusResponse x -> GetEnrollmentStatusResponse
$cfrom :: forall x.
GetEnrollmentStatusResponse -> Rep GetEnrollmentStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEnrollmentStatusResponse' 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:
--
-- 'status', 'getEnrollmentStatusResponse_status' - The enrollment status of the account.
--
-- 'numberOfMemberAccountsOptedIn', 'getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn' - The count of organization member accounts that are opted in to the
-- service, if your account is an organization management account.
--
-- 'memberAccountsEnrolled', 'getEnrollmentStatusResponse_memberAccountsEnrolled' - Confirms the enrollment status of member accounts of the organization,
-- if the account is a management account of an organization.
--
-- 'statusReason', 'getEnrollmentStatusResponse_statusReason' - The reason for the enrollment status of the account.
--
-- For example, an account might show a status of @Pending@ because member
-- accounts of an organization require more time to be enrolled in the
-- service.
--
-- 'lastUpdatedTimestamp', 'getEnrollmentStatusResponse_lastUpdatedTimestamp' - The Unix epoch timestamp, in seconds, of when the account enrollment
-- status was last updated.
--
-- 'httpStatus', 'getEnrollmentStatusResponse_httpStatus' - The response's http status code.
newGetEnrollmentStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEnrollmentStatusResponse
newGetEnrollmentStatusResponse :: Int -> GetEnrollmentStatusResponse
newGetEnrollmentStatusResponse Int
pHttpStatus_ =
  GetEnrollmentStatusResponse' :: Maybe Status
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Int
-> GetEnrollmentStatusResponse
GetEnrollmentStatusResponse'
    { $sel:status:GetEnrollmentStatusResponse' :: Maybe Status
status =
        Maybe Status
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfMemberAccountsOptedIn:GetEnrollmentStatusResponse' :: Maybe Int
numberOfMemberAccountsOptedIn =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:memberAccountsEnrolled:GetEnrollmentStatusResponse' :: Maybe Bool
memberAccountsEnrolled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:statusReason:GetEnrollmentStatusResponse' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetEnrollmentStatusResponse' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetEnrollmentStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The enrollment status of the account.
getEnrollmentStatusResponse_status :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Status)
getEnrollmentStatusResponse_status :: (Maybe Status -> f (Maybe Status))
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_status = (GetEnrollmentStatusResponse -> Maybe Status)
-> (GetEnrollmentStatusResponse
    -> Maybe Status -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse
     GetEnrollmentStatusResponse
     (Maybe Status)
     (Maybe Status)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Maybe Status
status :: Maybe Status
$sel:status:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Maybe Status
status} -> Maybe Status
status) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Maybe Status
a -> GetEnrollmentStatusResponse
s {$sel:status:GetEnrollmentStatusResponse' :: Maybe Status
status = Maybe Status
a} :: GetEnrollmentStatusResponse)

-- | The count of organization member accounts that are opted in to the
-- service, if your account is an organization management account.
getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Int)
getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn :: (Maybe Int -> f (Maybe Int))
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn = (GetEnrollmentStatusResponse -> Maybe Int)
-> (GetEnrollmentStatusResponse
    -> Maybe Int -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse
     GetEnrollmentStatusResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Maybe Int
numberOfMemberAccountsOptedIn :: Maybe Int
$sel:numberOfMemberAccountsOptedIn:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Maybe Int
numberOfMemberAccountsOptedIn} -> Maybe Int
numberOfMemberAccountsOptedIn) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Maybe Int
a -> GetEnrollmentStatusResponse
s {$sel:numberOfMemberAccountsOptedIn:GetEnrollmentStatusResponse' :: Maybe Int
numberOfMemberAccountsOptedIn = Maybe Int
a} :: GetEnrollmentStatusResponse)

-- | Confirms the enrollment status of member accounts of the organization,
-- if the account is a management account of an organization.
getEnrollmentStatusResponse_memberAccountsEnrolled :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Bool)
getEnrollmentStatusResponse_memberAccountsEnrolled :: (Maybe Bool -> f (Maybe Bool))
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_memberAccountsEnrolled = (GetEnrollmentStatusResponse -> Maybe Bool)
-> (GetEnrollmentStatusResponse
    -> Maybe Bool -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse
     GetEnrollmentStatusResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Maybe Bool
memberAccountsEnrolled :: Maybe Bool
$sel:memberAccountsEnrolled:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Maybe Bool
memberAccountsEnrolled} -> Maybe Bool
memberAccountsEnrolled) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Maybe Bool
a -> GetEnrollmentStatusResponse
s {$sel:memberAccountsEnrolled:GetEnrollmentStatusResponse' :: Maybe Bool
memberAccountsEnrolled = Maybe Bool
a} :: GetEnrollmentStatusResponse)

-- | The reason for the enrollment status of the account.
--
-- For example, an account might show a status of @Pending@ because member
-- accounts of an organization require more time to be enrolled in the
-- service.
getEnrollmentStatusResponse_statusReason :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Text)
getEnrollmentStatusResponse_statusReason :: (Maybe Text -> f (Maybe Text))
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_statusReason = (GetEnrollmentStatusResponse -> Maybe Text)
-> (GetEnrollmentStatusResponse
    -> Maybe Text -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse
     GetEnrollmentStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Maybe Text
a -> GetEnrollmentStatusResponse
s {$sel:statusReason:GetEnrollmentStatusResponse' :: Maybe Text
statusReason = Maybe Text
a} :: GetEnrollmentStatusResponse)

-- | The Unix epoch timestamp, in seconds, of when the account enrollment
-- status was last updated.
getEnrollmentStatusResponse_lastUpdatedTimestamp :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.UTCTime)
getEnrollmentStatusResponse_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_lastUpdatedTimestamp = (GetEnrollmentStatusResponse -> Maybe POSIX)
-> (GetEnrollmentStatusResponse
    -> Maybe POSIX -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse
     GetEnrollmentStatusResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Maybe POSIX
a -> GetEnrollmentStatusResponse
s {$sel:lastUpdatedTimestamp:GetEnrollmentStatusResponse' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: GetEnrollmentStatusResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetEnrollmentStatusResponse
-> f GetEnrollmentStatusResponse
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.
getEnrollmentStatusResponse_httpStatus :: Lens.Lens' GetEnrollmentStatusResponse Prelude.Int
getEnrollmentStatusResponse_httpStatus :: (Int -> f Int)
-> GetEnrollmentStatusResponse -> f GetEnrollmentStatusResponse
getEnrollmentStatusResponse_httpStatus = (GetEnrollmentStatusResponse -> Int)
-> (GetEnrollmentStatusResponse
    -> Int -> GetEnrollmentStatusResponse)
-> Lens
     GetEnrollmentStatusResponse GetEnrollmentStatusResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetEnrollmentStatusResponse' :: GetEnrollmentStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetEnrollmentStatusResponse
s@GetEnrollmentStatusResponse' {} Int
a -> GetEnrollmentStatusResponse
s {$sel:httpStatus:GetEnrollmentStatusResponse' :: Int
httpStatus = Int
a} :: GetEnrollmentStatusResponse)

instance Prelude.NFData GetEnrollmentStatusResponse