{-# 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.ResourceGroupsTagging.GetComplianceSummary
-- 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 a table that shows counts of resources that are noncompliant
-- with their tag policies.
--
-- For more information on tag policies, see
-- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html Tag Policies>
-- in the /AWS Organizations User Guide./
--
-- You can call this operation only from the organization\'s management
-- account and from the us-east-1 Region.
--
-- This operation supports pagination, where the response can be sent in
-- multiple pages. You should check the @PaginationToken@ response
-- parameter to determine if there are additional results available to
-- return. Repeat the query, passing the @PaginationToken@ response
-- parameter value as an input to the next request until you recieve a
-- @null@ value. A null value for @PaginationToken@ indicates that there
-- are no more results waiting to be returned.
--
-- This operation returns paginated results.
module Amazonka.ResourceGroupsTagging.GetComplianceSummary
  ( -- * Creating a Request
    GetComplianceSummary (..),
    newGetComplianceSummary,

    -- * Request Lenses
    getComplianceSummary_groupBy,
    getComplianceSummary_paginationToken,
    getComplianceSummary_targetIdFilters,
    getComplianceSummary_resourceTypeFilters,
    getComplianceSummary_regionFilters,
    getComplianceSummary_tagKeyFilters,
    getComplianceSummary_maxResults,

    -- * Destructuring the Response
    GetComplianceSummaryResponse (..),
    newGetComplianceSummaryResponse,

    -- * Response Lenses
    getComplianceSummaryResponse_paginationToken,
    getComplianceSummaryResponse_summaryList,
    getComplianceSummaryResponse_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 Amazonka.ResourceGroupsTagging.Types
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetComplianceSummary' smart constructor.
data GetComplianceSummary = GetComplianceSummary'
  { -- | Specifies a list of attributes to group the counts of noncompliant
    -- resources by. If supplied, the counts are sorted by those attributes.
    GetComplianceSummary -> Maybe [GroupByAttribute]
groupBy :: Prelude.Maybe [GroupByAttribute],
    -- | Specifies a @PaginationToken@ response value from a previous request to
    -- indicate that you want the next page of results. Leave this parameter
    -- empty in your initial request.
    GetComplianceSummary -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies target identifiers (usually, specific account IDs) to limit
    -- the output by. If you use this parameter, the count of returned
    -- noncompliant resources includes only resources with the specified target
    -- IDs.
    GetComplianceSummary -> Maybe (NonEmpty Text)
targetIdFilters :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Specifies that you want the response to include information for only
    -- resources of the specified types. The format of each resource type is
    -- @service[:resourceType]@. For example, specifying a resource type of
    -- @ec2@ returns all Amazon EC2 resources (which includes EC2 instances).
    -- Specifying a resource type of @ec2:instance@ returns only EC2 instances.
    --
    -- The string for each service name and resource type is the same as that
    -- embedded in a resource\'s Amazon Resource Name (ARN). Consult the /AWS
    -- General Reference/ for the following:
    --
    -- -   For a list of service name strings, see
    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces>.
    --
    -- -   For resource type strings, see
    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax Example ARNs>.
    --
    -- -   For more information about ARNs, see
    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
    --
    -- You can specify multiple resource types by using a comma separated
    -- array. The array can include up to 100 items. Note that the length
    -- constraint requirement applies to each resource type filter.
    GetComplianceSummary -> Maybe [Text]
resourceTypeFilters :: Prelude.Maybe [Prelude.Text],
    -- | Specifies a list of AWS Regions to limit the output by. If you use this
    -- parameter, the count of returned noncompliant resources includes only
    -- resources in the specified Regions.
    GetComplianceSummary -> Maybe (NonEmpty Text)
regionFilters :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Specifies that you want the response to include information for only
    -- resources that have tags with the specified tag keys. If you use this
    -- parameter, the count of returned noncompliant resources includes only
    -- resources that have the specified tag keys.
    GetComplianceSummary -> Maybe (NonEmpty Text)
tagKeyFilters :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Specifies the maximum number of results to be returned in each page. A
    -- query can return fewer than this maximum, even if there are more results
    -- still to return. You should always check the @PaginationToken@ response
    -- value to see if there are more results. You can specify a minimum of 1
    -- and a maximum value of 100.
    GetComplianceSummary -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (GetComplianceSummary -> GetComplianceSummary -> Bool
(GetComplianceSummary -> GetComplianceSummary -> Bool)
-> (GetComplianceSummary -> GetComplianceSummary -> Bool)
-> Eq GetComplianceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComplianceSummary -> GetComplianceSummary -> Bool
$c/= :: GetComplianceSummary -> GetComplianceSummary -> Bool
== :: GetComplianceSummary -> GetComplianceSummary -> Bool
$c== :: GetComplianceSummary -> GetComplianceSummary -> Bool
Prelude.Eq, ReadPrec [GetComplianceSummary]
ReadPrec GetComplianceSummary
Int -> ReadS GetComplianceSummary
ReadS [GetComplianceSummary]
(Int -> ReadS GetComplianceSummary)
-> ReadS [GetComplianceSummary]
-> ReadPrec GetComplianceSummary
-> ReadPrec [GetComplianceSummary]
-> Read GetComplianceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetComplianceSummary]
$creadListPrec :: ReadPrec [GetComplianceSummary]
readPrec :: ReadPrec GetComplianceSummary
$creadPrec :: ReadPrec GetComplianceSummary
readList :: ReadS [GetComplianceSummary]
$creadList :: ReadS [GetComplianceSummary]
readsPrec :: Int -> ReadS GetComplianceSummary
$creadsPrec :: Int -> ReadS GetComplianceSummary
Prelude.Read, Int -> GetComplianceSummary -> ShowS
[GetComplianceSummary] -> ShowS
GetComplianceSummary -> String
(Int -> GetComplianceSummary -> ShowS)
-> (GetComplianceSummary -> String)
-> ([GetComplianceSummary] -> ShowS)
-> Show GetComplianceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComplianceSummary] -> ShowS
$cshowList :: [GetComplianceSummary] -> ShowS
show :: GetComplianceSummary -> String
$cshow :: GetComplianceSummary -> String
showsPrec :: Int -> GetComplianceSummary -> ShowS
$cshowsPrec :: Int -> GetComplianceSummary -> ShowS
Prelude.Show, (forall x. GetComplianceSummary -> Rep GetComplianceSummary x)
-> (forall x. Rep GetComplianceSummary x -> GetComplianceSummary)
-> Generic GetComplianceSummary
forall x. Rep GetComplianceSummary x -> GetComplianceSummary
forall x. GetComplianceSummary -> Rep GetComplianceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetComplianceSummary x -> GetComplianceSummary
$cfrom :: forall x. GetComplianceSummary -> Rep GetComplianceSummary x
Prelude.Generic)

-- |
-- Create a value of 'GetComplianceSummary' 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:
--
-- 'groupBy', 'getComplianceSummary_groupBy' - Specifies a list of attributes to group the counts of noncompliant
-- resources by. If supplied, the counts are sorted by those attributes.
--
-- 'paginationToken', 'getComplianceSummary_paginationToken' - Specifies a @PaginationToken@ response value from a previous request to
-- indicate that you want the next page of results. Leave this parameter
-- empty in your initial request.
--
-- 'targetIdFilters', 'getComplianceSummary_targetIdFilters' - Specifies target identifiers (usually, specific account IDs) to limit
-- the output by. If you use this parameter, the count of returned
-- noncompliant resources includes only resources with the specified target
-- IDs.
--
-- 'resourceTypeFilters', 'getComplianceSummary_resourceTypeFilters' - Specifies that you want the response to include information for only
-- resources of the specified types. The format of each resource type is
-- @service[:resourceType]@. For example, specifying a resource type of
-- @ec2@ returns all Amazon EC2 resources (which includes EC2 instances).
-- Specifying a resource type of @ec2:instance@ returns only EC2 instances.
--
-- The string for each service name and resource type is the same as that
-- embedded in a resource\'s Amazon Resource Name (ARN). Consult the /AWS
-- General Reference/ for the following:
--
-- -   For a list of service name strings, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces>.
--
-- -   For resource type strings, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax Example ARNs>.
--
-- -   For more information about ARNs, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- You can specify multiple resource types by using a comma separated
-- array. The array can include up to 100 items. Note that the length
-- constraint requirement applies to each resource type filter.
--
-- 'regionFilters', 'getComplianceSummary_regionFilters' - Specifies a list of AWS Regions to limit the output by. If you use this
-- parameter, the count of returned noncompliant resources includes only
-- resources in the specified Regions.
--
-- 'tagKeyFilters', 'getComplianceSummary_tagKeyFilters' - Specifies that you want the response to include information for only
-- resources that have tags with the specified tag keys. If you use this
-- parameter, the count of returned noncompliant resources includes only
-- resources that have the specified tag keys.
--
-- 'maxResults', 'getComplianceSummary_maxResults' - Specifies the maximum number of results to be returned in each page. A
-- query can return fewer than this maximum, even if there are more results
-- still to return. You should always check the @PaginationToken@ response
-- value to see if there are more results. You can specify a minimum of 1
-- and a maximum value of 100.
newGetComplianceSummary ::
  GetComplianceSummary
newGetComplianceSummary :: GetComplianceSummary
newGetComplianceSummary =
  GetComplianceSummary' :: Maybe [GroupByAttribute]
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe [Text]
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> GetComplianceSummary
GetComplianceSummary'
    { $sel:groupBy:GetComplianceSummary' :: Maybe [GroupByAttribute]
groupBy = Maybe [GroupByAttribute]
forall a. Maybe a
Prelude.Nothing,
      $sel:paginationToken:GetComplianceSummary' :: Maybe Text
paginationToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetIdFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
targetIdFilters = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypeFilters:GetComplianceSummary' :: Maybe [Text]
resourceTypeFilters = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:regionFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
regionFilters = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:tagKeyFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
tagKeyFilters = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetComplianceSummary' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies a list of attributes to group the counts of noncompliant
-- resources by. If supplied, the counts are sorted by those attributes.
getComplianceSummary_groupBy :: Lens.Lens' GetComplianceSummary (Prelude.Maybe [GroupByAttribute])
getComplianceSummary_groupBy :: (Maybe [GroupByAttribute] -> f (Maybe [GroupByAttribute]))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_groupBy = (GetComplianceSummary -> Maybe [GroupByAttribute])
-> (GetComplianceSummary
    -> Maybe [GroupByAttribute] -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe [GroupByAttribute])
     (Maybe [GroupByAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe [GroupByAttribute]
groupBy :: Maybe [GroupByAttribute]
$sel:groupBy:GetComplianceSummary' :: GetComplianceSummary -> Maybe [GroupByAttribute]
groupBy} -> Maybe [GroupByAttribute]
groupBy) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe [GroupByAttribute]
a -> GetComplianceSummary
s {$sel:groupBy:GetComplianceSummary' :: Maybe [GroupByAttribute]
groupBy = Maybe [GroupByAttribute]
a} :: GetComplianceSummary) ((Maybe [GroupByAttribute] -> f (Maybe [GroupByAttribute]))
 -> GetComplianceSummary -> f GetComplianceSummary)
-> ((Maybe [GroupByAttribute] -> f (Maybe [GroupByAttribute]))
    -> Maybe [GroupByAttribute] -> f (Maybe [GroupByAttribute]))
-> (Maybe [GroupByAttribute] -> f (Maybe [GroupByAttribute]))
-> GetComplianceSummary
-> f GetComplianceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [GroupByAttribute]
  [GroupByAttribute]
  [GroupByAttribute]
  [GroupByAttribute]
-> Iso
     (Maybe [GroupByAttribute])
     (Maybe [GroupByAttribute])
     (Maybe [GroupByAttribute])
     (Maybe [GroupByAttribute])
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
  [GroupByAttribute]
  [GroupByAttribute]
  [GroupByAttribute]
  [GroupByAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies a @PaginationToken@ response value from a previous request to
-- indicate that you want the next page of results. Leave this parameter
-- empty in your initial request.
getComplianceSummary_paginationToken :: Lens.Lens' GetComplianceSummary (Prelude.Maybe Prelude.Text)
getComplianceSummary_paginationToken :: (Maybe Text -> f (Maybe Text))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_paginationToken = (GetComplianceSummary -> Maybe Text)
-> (GetComplianceSummary -> Maybe Text -> GetComplianceSummary)
-> Lens
     GetComplianceSummary GetComplianceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:GetComplianceSummary' :: GetComplianceSummary -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe Text
a -> GetComplianceSummary
s {$sel:paginationToken:GetComplianceSummary' :: Maybe Text
paginationToken = Maybe Text
a} :: GetComplianceSummary)

-- | Specifies target identifiers (usually, specific account IDs) to limit
-- the output by. If you use this parameter, the count of returned
-- noncompliant resources includes only resources with the specified target
-- IDs.
getComplianceSummary_targetIdFilters :: Lens.Lens' GetComplianceSummary (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
getComplianceSummary_targetIdFilters :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_targetIdFilters = (GetComplianceSummary -> Maybe (NonEmpty Text))
-> (GetComplianceSummary
    -> Maybe (NonEmpty Text) -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe (NonEmpty Text)
targetIdFilters :: Maybe (NonEmpty Text)
$sel:targetIdFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
targetIdFilters} -> Maybe (NonEmpty Text)
targetIdFilters) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe (NonEmpty Text)
a -> GetComplianceSummary
s {$sel:targetIdFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
targetIdFilters = Maybe (NonEmpty Text)
a} :: GetComplianceSummary) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> GetComplianceSummary -> f GetComplianceSummary)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary
-> f GetComplianceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies that you want the response to include information for only
-- resources of the specified types. The format of each resource type is
-- @service[:resourceType]@. For example, specifying a resource type of
-- @ec2@ returns all Amazon EC2 resources (which includes EC2 instances).
-- Specifying a resource type of @ec2:instance@ returns only EC2 instances.
--
-- The string for each service name and resource type is the same as that
-- embedded in a resource\'s Amazon Resource Name (ARN). Consult the /AWS
-- General Reference/ for the following:
--
-- -   For a list of service name strings, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces>.
--
-- -   For resource type strings, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax Example ARNs>.
--
-- -   For more information about ARNs, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- You can specify multiple resource types by using a comma separated
-- array. The array can include up to 100 items. Note that the length
-- constraint requirement applies to each resource type filter.
getComplianceSummary_resourceTypeFilters :: Lens.Lens' GetComplianceSummary (Prelude.Maybe [Prelude.Text])
getComplianceSummary_resourceTypeFilters :: (Maybe [Text] -> f (Maybe [Text]))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_resourceTypeFilters = (GetComplianceSummary -> Maybe [Text])
-> (GetComplianceSummary -> Maybe [Text] -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe [Text]
resourceTypeFilters :: Maybe [Text]
$sel:resourceTypeFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe [Text]
resourceTypeFilters} -> Maybe [Text]
resourceTypeFilters) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe [Text]
a -> GetComplianceSummary
s {$sel:resourceTypeFilters:GetComplianceSummary' :: Maybe [Text]
resourceTypeFilters = Maybe [Text]
a} :: GetComplianceSummary) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetComplianceSummary -> f GetComplianceSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetComplianceSummary
-> f GetComplianceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies a list of AWS Regions to limit the output by. If you use this
-- parameter, the count of returned noncompliant resources includes only
-- resources in the specified Regions.
getComplianceSummary_regionFilters :: Lens.Lens' GetComplianceSummary (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
getComplianceSummary_regionFilters :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_regionFilters = (GetComplianceSummary -> Maybe (NonEmpty Text))
-> (GetComplianceSummary
    -> Maybe (NonEmpty Text) -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe (NonEmpty Text)
regionFilters :: Maybe (NonEmpty Text)
$sel:regionFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
regionFilters} -> Maybe (NonEmpty Text)
regionFilters) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe (NonEmpty Text)
a -> GetComplianceSummary
s {$sel:regionFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
regionFilters = Maybe (NonEmpty Text)
a} :: GetComplianceSummary) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> GetComplianceSummary -> f GetComplianceSummary)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary
-> f GetComplianceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies that you want the response to include information for only
-- resources that have tags with the specified tag keys. If you use this
-- parameter, the count of returned noncompliant resources includes only
-- resources that have the specified tag keys.
getComplianceSummary_tagKeyFilters :: Lens.Lens' GetComplianceSummary (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
getComplianceSummary_tagKeyFilters :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_tagKeyFilters = (GetComplianceSummary -> Maybe (NonEmpty Text))
-> (GetComplianceSummary
    -> Maybe (NonEmpty Text) -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe (NonEmpty Text)
tagKeyFilters :: Maybe (NonEmpty Text)
$sel:tagKeyFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
tagKeyFilters} -> Maybe (NonEmpty Text)
tagKeyFilters) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe (NonEmpty Text)
a -> GetComplianceSummary
s {$sel:tagKeyFilters:GetComplianceSummary' :: Maybe (NonEmpty Text)
tagKeyFilters = Maybe (NonEmpty Text)
a} :: GetComplianceSummary) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> GetComplianceSummary -> f GetComplianceSummary)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> GetComplianceSummary
-> f GetComplianceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the maximum number of results to be returned in each page. A
-- query can return fewer than this maximum, even if there are more results
-- still to return. You should always check the @PaginationToken@ response
-- value to see if there are more results. You can specify a minimum of 1
-- and a maximum value of 100.
getComplianceSummary_maxResults :: Lens.Lens' GetComplianceSummary (Prelude.Maybe Prelude.Natural)
getComplianceSummary_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetComplianceSummary -> f GetComplianceSummary
getComplianceSummary_maxResults = (GetComplianceSummary -> Maybe Natural)
-> (GetComplianceSummary -> Maybe Natural -> GetComplianceSummary)
-> Lens
     GetComplianceSummary
     GetComplianceSummary
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummary' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetComplianceSummary' :: GetComplianceSummary -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetComplianceSummary
s@GetComplianceSummary' {} Maybe Natural
a -> GetComplianceSummary
s {$sel:maxResults:GetComplianceSummary' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetComplianceSummary)

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

instance Prelude.NFData GetComplianceSummary

instance Core.ToHeaders GetComplianceSummary where
  toHeaders :: GetComplianceSummary -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetComplianceSummary -> 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
"ResourceGroupsTaggingAPI_20170126.GetComplianceSummary" ::
                          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 GetComplianceSummary where
  toJSON :: GetComplianceSummary -> Value
toJSON GetComplianceSummary' {Maybe Natural
Maybe [Text]
Maybe [GroupByAttribute]
Maybe (NonEmpty Text)
Maybe Text
maxResults :: Maybe Natural
tagKeyFilters :: Maybe (NonEmpty Text)
regionFilters :: Maybe (NonEmpty Text)
resourceTypeFilters :: Maybe [Text]
targetIdFilters :: Maybe (NonEmpty Text)
paginationToken :: Maybe Text
groupBy :: Maybe [GroupByAttribute]
$sel:maxResults:GetComplianceSummary' :: GetComplianceSummary -> Maybe Natural
$sel:tagKeyFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
$sel:regionFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
$sel:resourceTypeFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe [Text]
$sel:targetIdFilters:GetComplianceSummary' :: GetComplianceSummary -> Maybe (NonEmpty Text)
$sel:paginationToken:GetComplianceSummary' :: GetComplianceSummary -> Maybe Text
$sel:groupBy:GetComplianceSummary' :: GetComplianceSummary -> Maybe [GroupByAttribute]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"GroupBy" Text -> [GroupByAttribute] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([GroupByAttribute] -> Pair)
-> Maybe [GroupByAttribute] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GroupByAttribute]
groupBy,
            (Text
"PaginationToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
paginationToken,
            (Text
"TargetIdFilters" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
targetIdFilters,
            (Text
"ResourceTypeFilters" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceTypeFilters,
            (Text
"RegionFilters" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
regionFilters,
            (Text
"TagKeyFilters" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
tagKeyFilters,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newGetComplianceSummaryResponse' smart constructor.
data GetComplianceSummaryResponse = GetComplianceSummaryResponse'
  { -- | A string that indicates that there is more data available than this
    -- response contains. To receive the next part of the response, specify
    -- this response value as the @PaginationToken@ value in the request for
    -- the next page.
    GetComplianceSummaryResponse -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | A table that shows counts of noncompliant resources.
    GetComplianceSummaryResponse -> Maybe [Summary]
summaryList :: Prelude.Maybe [Summary],
    -- | The response's http status code.
    GetComplianceSummaryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetComplianceSummaryResponse
-> GetComplianceSummaryResponse -> Bool
(GetComplianceSummaryResponse
 -> GetComplianceSummaryResponse -> Bool)
-> (GetComplianceSummaryResponse
    -> GetComplianceSummaryResponse -> Bool)
-> Eq GetComplianceSummaryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComplianceSummaryResponse
-> GetComplianceSummaryResponse -> Bool
$c/= :: GetComplianceSummaryResponse
-> GetComplianceSummaryResponse -> Bool
== :: GetComplianceSummaryResponse
-> GetComplianceSummaryResponse -> Bool
$c== :: GetComplianceSummaryResponse
-> GetComplianceSummaryResponse -> Bool
Prelude.Eq, ReadPrec [GetComplianceSummaryResponse]
ReadPrec GetComplianceSummaryResponse
Int -> ReadS GetComplianceSummaryResponse
ReadS [GetComplianceSummaryResponse]
(Int -> ReadS GetComplianceSummaryResponse)
-> ReadS [GetComplianceSummaryResponse]
-> ReadPrec GetComplianceSummaryResponse
-> ReadPrec [GetComplianceSummaryResponse]
-> Read GetComplianceSummaryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetComplianceSummaryResponse]
$creadListPrec :: ReadPrec [GetComplianceSummaryResponse]
readPrec :: ReadPrec GetComplianceSummaryResponse
$creadPrec :: ReadPrec GetComplianceSummaryResponse
readList :: ReadS [GetComplianceSummaryResponse]
$creadList :: ReadS [GetComplianceSummaryResponse]
readsPrec :: Int -> ReadS GetComplianceSummaryResponse
$creadsPrec :: Int -> ReadS GetComplianceSummaryResponse
Prelude.Read, Int -> GetComplianceSummaryResponse -> ShowS
[GetComplianceSummaryResponse] -> ShowS
GetComplianceSummaryResponse -> String
(Int -> GetComplianceSummaryResponse -> ShowS)
-> (GetComplianceSummaryResponse -> String)
-> ([GetComplianceSummaryResponse] -> ShowS)
-> Show GetComplianceSummaryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComplianceSummaryResponse] -> ShowS
$cshowList :: [GetComplianceSummaryResponse] -> ShowS
show :: GetComplianceSummaryResponse -> String
$cshow :: GetComplianceSummaryResponse -> String
showsPrec :: Int -> GetComplianceSummaryResponse -> ShowS
$cshowsPrec :: Int -> GetComplianceSummaryResponse -> ShowS
Prelude.Show, (forall x.
 GetComplianceSummaryResponse -> Rep GetComplianceSummaryResponse x)
-> (forall x.
    Rep GetComplianceSummaryResponse x -> GetComplianceSummaryResponse)
-> Generic GetComplianceSummaryResponse
forall x.
Rep GetComplianceSummaryResponse x -> GetComplianceSummaryResponse
forall x.
GetComplianceSummaryResponse -> Rep GetComplianceSummaryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetComplianceSummaryResponse x -> GetComplianceSummaryResponse
$cfrom :: forall x.
GetComplianceSummaryResponse -> Rep GetComplianceSummaryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetComplianceSummaryResponse' 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:
--
-- 'paginationToken', 'getComplianceSummaryResponse_paginationToken' - A string that indicates that there is more data available than this
-- response contains. To receive the next part of the response, specify
-- this response value as the @PaginationToken@ value in the request for
-- the next page.
--
-- 'summaryList', 'getComplianceSummaryResponse_summaryList' - A table that shows counts of noncompliant resources.
--
-- 'httpStatus', 'getComplianceSummaryResponse_httpStatus' - The response's http status code.
newGetComplianceSummaryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetComplianceSummaryResponse
newGetComplianceSummaryResponse :: Int -> GetComplianceSummaryResponse
newGetComplianceSummaryResponse Int
pHttpStatus_ =
  GetComplianceSummaryResponse' :: Maybe Text
-> Maybe [Summary] -> Int -> GetComplianceSummaryResponse
GetComplianceSummaryResponse'
    { $sel:paginationToken:GetComplianceSummaryResponse' :: Maybe Text
paginationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:summaryList:GetComplianceSummaryResponse' :: Maybe [Summary]
summaryList = Maybe [Summary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetComplianceSummaryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A string that indicates that there is more data available than this
-- response contains. To receive the next part of the response, specify
-- this response value as the @PaginationToken@ value in the request for
-- the next page.
getComplianceSummaryResponse_paginationToken :: Lens.Lens' GetComplianceSummaryResponse (Prelude.Maybe Prelude.Text)
getComplianceSummaryResponse_paginationToken :: (Maybe Text -> f (Maybe Text))
-> GetComplianceSummaryResponse -> f GetComplianceSummaryResponse
getComplianceSummaryResponse_paginationToken = (GetComplianceSummaryResponse -> Maybe Text)
-> (GetComplianceSummaryResponse
    -> Maybe Text -> GetComplianceSummaryResponse)
-> Lens' GetComplianceSummaryResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummaryResponse' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:GetComplianceSummaryResponse' :: GetComplianceSummaryResponse -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: GetComplianceSummaryResponse
s@GetComplianceSummaryResponse' {} Maybe Text
a -> GetComplianceSummaryResponse
s {$sel:paginationToken:GetComplianceSummaryResponse' :: Maybe Text
paginationToken = Maybe Text
a} :: GetComplianceSummaryResponse)

-- | A table that shows counts of noncompliant resources.
getComplianceSummaryResponse_summaryList :: Lens.Lens' GetComplianceSummaryResponse (Prelude.Maybe [Summary])
getComplianceSummaryResponse_summaryList :: (Maybe [Summary] -> f (Maybe [Summary]))
-> GetComplianceSummaryResponse -> f GetComplianceSummaryResponse
getComplianceSummaryResponse_summaryList = (GetComplianceSummaryResponse -> Maybe [Summary])
-> (GetComplianceSummaryResponse
    -> Maybe [Summary] -> GetComplianceSummaryResponse)
-> Lens' GetComplianceSummaryResponse (Maybe [Summary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceSummaryResponse' {Maybe [Summary]
summaryList :: Maybe [Summary]
$sel:summaryList:GetComplianceSummaryResponse' :: GetComplianceSummaryResponse -> Maybe [Summary]
summaryList} -> Maybe [Summary]
summaryList) (\s :: GetComplianceSummaryResponse
s@GetComplianceSummaryResponse' {} Maybe [Summary]
a -> GetComplianceSummaryResponse
s {$sel:summaryList:GetComplianceSummaryResponse' :: Maybe [Summary]
summaryList = Maybe [Summary]
a} :: GetComplianceSummaryResponse) ((Maybe [Summary] -> f (Maybe [Summary]))
 -> GetComplianceSummaryResponse -> f GetComplianceSummaryResponse)
-> ((Maybe [Summary] -> f (Maybe [Summary]))
    -> Maybe [Summary] -> f (Maybe [Summary]))
-> (Maybe [Summary] -> f (Maybe [Summary]))
-> GetComplianceSummaryResponse
-> f GetComplianceSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Summary] [Summary] [Summary] [Summary]
-> Iso
     (Maybe [Summary])
     (Maybe [Summary])
     (Maybe [Summary])
     (Maybe [Summary])
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 [Summary] [Summary] [Summary] [Summary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetComplianceSummaryResponse