{-# 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.ExportAutoScalingGroupRecommendations
-- 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)
--
-- Exports optimization recommendations for Auto Scaling groups.
--
-- Recommendations are exported in a comma-separated values (.csv) file,
-- and its metadata in a JavaScript Object Notation (JSON) (.json) file, to
-- an existing Amazon Simple Storage Service (Amazon S3) bucket that you
-- specify. For more information, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>
-- in the /Compute Optimizer User Guide/.
--
-- You can have only one Auto Scaling group export job in progress per
-- Amazon Web Services Region.
module Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations
  ( -- * Creating a Request
    ExportAutoScalingGroupRecommendations (..),
    newExportAutoScalingGroupRecommendations,

    -- * Request Lenses
    exportAutoScalingGroupRecommendations_accountIds,
    exportAutoScalingGroupRecommendations_fileFormat,
    exportAutoScalingGroupRecommendations_filters,
    exportAutoScalingGroupRecommendations_fieldsToExport,
    exportAutoScalingGroupRecommendations_includeMemberAccounts,
    exportAutoScalingGroupRecommendations_recommendationPreferences,
    exportAutoScalingGroupRecommendations_s3DestinationConfig,

    -- * Destructuring the Response
    ExportAutoScalingGroupRecommendationsResponse (..),
    newExportAutoScalingGroupRecommendationsResponse,

    -- * Response Lenses
    exportAutoScalingGroupRecommendationsResponse_jobId,
    exportAutoScalingGroupRecommendationsResponse_s3Destination,
    exportAutoScalingGroupRecommendationsResponse_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:/ 'newExportAutoScalingGroupRecommendations' smart constructor.
data ExportAutoScalingGroupRecommendations = ExportAutoScalingGroupRecommendations'
  { -- | The IDs of the Amazon Web Services accounts for which to export Auto
    -- Scaling group recommendations.
    --
    -- If your account is the management account of an organization, use this
    -- parameter to specify the member account for which you want to export
    -- recommendations.
    --
    -- This parameter cannot be specified together with the include member
    -- accounts parameter. The parameters are mutually exclusive.
    --
    -- Recommendations for member accounts are not included in the export if
    -- this parameter, or the include member accounts parameter, is omitted.
    --
    -- You can specify multiple account IDs per request.
    ExportAutoScalingGroupRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
    -- | The format of the export file.
    --
    -- The only export file format currently supported is @Csv@.
    ExportAutoScalingGroupRecommendations -> Maybe FileFormat
fileFormat :: Prelude.Maybe FileFormat,
    -- | An array of objects to specify a filter that exports a more specific set
    -- of Auto Scaling group recommendations.
    ExportAutoScalingGroupRecommendations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The recommendations data to include in the export file. For more
    -- information about the fields that can be exported, see
    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>
    -- in the /Compute Optimizer User Guide/.
    ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
fieldsToExport :: Prelude.Maybe [ExportableAutoScalingGroupField],
    -- | Indicates whether to include recommendations for resources in all member
    -- accounts of the organization if your account is the management account
    -- of an organization.
    --
    -- The member accounts must also be opted in to Compute Optimizer, and
    -- trusted access for Compute Optimizer must be enabled in the organization
    -- account. For more information, see
    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>
    -- in the /Compute Optimizer User Guide/.
    --
    -- Recommendations for member accounts of the organization are not included
    -- in the export file if this parameter is omitted.
    --
    -- This parameter cannot be specified together with the account IDs
    -- parameter. The parameters are mutually exclusive.
    --
    -- Recommendations for member accounts are not included in the export if
    -- this parameter, or the account IDs parameter, is omitted.
    ExportAutoScalingGroupRecommendations -> Maybe Bool
includeMemberAccounts :: Prelude.Maybe Prelude.Bool,
    -- | An object to specify the preferences for the Auto Scaling group
    -- recommendations to export.
    ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
recommendationPreferences :: Prelude.Maybe RecommendationPreferences,
    -- | An object to specify the destination Amazon Simple Storage Service
    -- (Amazon S3) bucket name and key prefix for the export job.
    --
    -- You must create the destination Amazon S3 bucket for your
    -- recommendations export before you create the export job. Compute
    -- Optimizer does not create the S3 bucket for you. After you create the S3
    -- bucket, ensure that it has the required permissions policy to allow
    -- Compute Optimizer to write the export file to it. If you plan to specify
    -- an object prefix when you create the export job, you must include the
    -- object prefix in the policy that you add to the S3 bucket. For more
    -- information, see
    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>
    -- in the /Compute Optimizer User Guide/.
    ExportAutoScalingGroupRecommendations -> S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
  }
  deriving (ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
(ExportAutoScalingGroupRecommendations
 -> ExportAutoScalingGroupRecommendations -> Bool)
-> (ExportAutoScalingGroupRecommendations
    -> ExportAutoScalingGroupRecommendations -> Bool)
-> Eq ExportAutoScalingGroupRecommendations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
$c/= :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
== :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
$c== :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
Prelude.Eq, ReadPrec [ExportAutoScalingGroupRecommendations]
ReadPrec ExportAutoScalingGroupRecommendations
Int -> ReadS ExportAutoScalingGroupRecommendations
ReadS [ExportAutoScalingGroupRecommendations]
(Int -> ReadS ExportAutoScalingGroupRecommendations)
-> ReadS [ExportAutoScalingGroupRecommendations]
-> ReadPrec ExportAutoScalingGroupRecommendations
-> ReadPrec [ExportAutoScalingGroupRecommendations]
-> Read ExportAutoScalingGroupRecommendations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAutoScalingGroupRecommendations]
$creadListPrec :: ReadPrec [ExportAutoScalingGroupRecommendations]
readPrec :: ReadPrec ExportAutoScalingGroupRecommendations
$creadPrec :: ReadPrec ExportAutoScalingGroupRecommendations
readList :: ReadS [ExportAutoScalingGroupRecommendations]
$creadList :: ReadS [ExportAutoScalingGroupRecommendations]
readsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendations
$creadsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendations
Prelude.Read, Int -> ExportAutoScalingGroupRecommendations -> ShowS
[ExportAutoScalingGroupRecommendations] -> ShowS
ExportAutoScalingGroupRecommendations -> String
(Int -> ExportAutoScalingGroupRecommendations -> ShowS)
-> (ExportAutoScalingGroupRecommendations -> String)
-> ([ExportAutoScalingGroupRecommendations] -> ShowS)
-> Show ExportAutoScalingGroupRecommendations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAutoScalingGroupRecommendations] -> ShowS
$cshowList :: [ExportAutoScalingGroupRecommendations] -> ShowS
show :: ExportAutoScalingGroupRecommendations -> String
$cshow :: ExportAutoScalingGroupRecommendations -> String
showsPrec :: Int -> ExportAutoScalingGroupRecommendations -> ShowS
$cshowsPrec :: Int -> ExportAutoScalingGroupRecommendations -> ShowS
Prelude.Show, (forall x.
 ExportAutoScalingGroupRecommendations
 -> Rep ExportAutoScalingGroupRecommendations x)
-> (forall x.
    Rep ExportAutoScalingGroupRecommendations x
    -> ExportAutoScalingGroupRecommendations)
-> Generic ExportAutoScalingGroupRecommendations
forall x.
Rep ExportAutoScalingGroupRecommendations x
-> ExportAutoScalingGroupRecommendations
forall x.
ExportAutoScalingGroupRecommendations
-> Rep ExportAutoScalingGroupRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAutoScalingGroupRecommendations x
-> ExportAutoScalingGroupRecommendations
$cfrom :: forall x.
ExportAutoScalingGroupRecommendations
-> Rep ExportAutoScalingGroupRecommendations x
Prelude.Generic)

-- |
-- Create a value of 'ExportAutoScalingGroupRecommendations' 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:
--
-- 'accountIds', 'exportAutoScalingGroupRecommendations_accountIds' - The IDs of the Amazon Web Services accounts for which to export Auto
-- Scaling group recommendations.
--
-- If your account is the management account of an organization, use this
-- parameter to specify the member account for which you want to export
-- recommendations.
--
-- This parameter cannot be specified together with the include member
-- accounts parameter. The parameters are mutually exclusive.
--
-- Recommendations for member accounts are not included in the export if
-- this parameter, or the include member accounts parameter, is omitted.
--
-- You can specify multiple account IDs per request.
--
-- 'fileFormat', 'exportAutoScalingGroupRecommendations_fileFormat' - The format of the export file.
--
-- The only export file format currently supported is @Csv@.
--
-- 'filters', 'exportAutoScalingGroupRecommendations_filters' - An array of objects to specify a filter that exports a more specific set
-- of Auto Scaling group recommendations.
--
-- 'fieldsToExport', 'exportAutoScalingGroupRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more
-- information about the fields that can be exported, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>
-- in the /Compute Optimizer User Guide/.
--
-- 'includeMemberAccounts', 'exportAutoScalingGroupRecommendations_includeMemberAccounts' - Indicates whether to include recommendations for resources in all member
-- accounts of the organization if your account is the management account
-- of an organization.
--
-- The member accounts must also be opted in to Compute Optimizer, and
-- trusted access for Compute Optimizer must be enabled in the organization
-- account. For more information, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>
-- in the /Compute Optimizer User Guide/.
--
-- Recommendations for member accounts of the organization are not included
-- in the export file if this parameter is omitted.
--
-- This parameter cannot be specified together with the account IDs
-- parameter. The parameters are mutually exclusive.
--
-- Recommendations for member accounts are not included in the export if
-- this parameter, or the account IDs parameter, is omitted.
--
-- 'recommendationPreferences', 'exportAutoScalingGroupRecommendations_recommendationPreferences' - An object to specify the preferences for the Auto Scaling group
-- recommendations to export.
--
-- 's3DestinationConfig', 'exportAutoScalingGroupRecommendations_s3DestinationConfig' - An object to specify the destination Amazon Simple Storage Service
-- (Amazon S3) bucket name and key prefix for the export job.
--
-- You must create the destination Amazon S3 bucket for your
-- recommendations export before you create the export job. Compute
-- Optimizer does not create the S3 bucket for you. After you create the S3
-- bucket, ensure that it has the required permissions policy to allow
-- Compute Optimizer to write the export file to it. If you plan to specify
-- an object prefix when you create the export job, you must include the
-- object prefix in the policy that you add to the S3 bucket. For more
-- information, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>
-- in the /Compute Optimizer User Guide/.
newExportAutoScalingGroupRecommendations ::
  -- | 's3DestinationConfig'
  S3DestinationConfig ->
  ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations :: S3DestinationConfig -> ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations
  S3DestinationConfig
pS3DestinationConfig_ =
    ExportAutoScalingGroupRecommendations' :: Maybe [Text]
-> Maybe FileFormat
-> Maybe [Filter]
-> Maybe [ExportableAutoScalingGroupField]
-> Maybe Bool
-> Maybe RecommendationPreferences
-> S3DestinationConfig
-> ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations'
      { $sel:accountIds:ExportAutoScalingGroupRecommendations' :: Maybe [Text]
accountIds =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:fileFormat:ExportAutoScalingGroupRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
forall a. Maybe a
Prelude.Nothing,
        $sel:filters:ExportAutoScalingGroupRecommendations' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
        $sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: Maybe [ExportableAutoScalingGroupField]
fieldsToExport = Maybe [ExportableAutoScalingGroupField]
forall a. Maybe a
Prelude.Nothing,
        $sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: Maybe Bool
includeMemberAccounts =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: Maybe RecommendationPreferences
recommendationPreferences =
          Maybe RecommendationPreferences
forall a. Maybe a
Prelude.Nothing,
        $sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: S3DestinationConfig
s3DestinationConfig =
          S3DestinationConfig
pS3DestinationConfig_
      }

-- | The IDs of the Amazon Web Services accounts for which to export Auto
-- Scaling group recommendations.
--
-- If your account is the management account of an organization, use this
-- parameter to specify the member account for which you want to export
-- recommendations.
--
-- This parameter cannot be specified together with the include member
-- accounts parameter. The parameters are mutually exclusive.
--
-- Recommendations for member accounts are not included in the export if
-- this parameter, or the include member accounts parameter, is omitted.
--
-- You can specify multiple account IDs per request.
exportAutoScalingGroupRecommendations_accountIds :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])
exportAutoScalingGroupRecommendations_accountIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_accountIds = (ExportAutoScalingGroupRecommendations -> Maybe [Text])
-> (ExportAutoScalingGroupRecommendations
    -> Maybe [Text] -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [Text]
a -> ExportAutoScalingGroupRecommendations
s {$sel:accountIds:ExportAutoScalingGroupRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [Text] -> f (Maybe [Text]))
 -> ExportAutoScalingGroupRecommendations
 -> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
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

-- | The format of the export file.
--
-- The only export file format currently supported is @Csv@.
exportAutoScalingGroupRecommendations_fileFormat :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe FileFormat)
exportAutoScalingGroupRecommendations_fileFormat :: (Maybe FileFormat -> f (Maybe FileFormat))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_fileFormat = (ExportAutoScalingGroupRecommendations -> Maybe FileFormat)
-> (ExportAutoScalingGroupRecommendations
    -> Maybe FileFormat -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe FileFormat)
     (Maybe FileFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe FileFormat
fileFormat :: Maybe FileFormat
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
fileFormat} -> Maybe FileFormat
fileFormat) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe FileFormat
a -> ExportAutoScalingGroupRecommendations
s {$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
a} :: ExportAutoScalingGroupRecommendations)

-- | An array of objects to specify a filter that exports a more specific set
-- of Auto Scaling group recommendations.
exportAutoScalingGroupRecommendations_filters :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Filter])
exportAutoScalingGroupRecommendations_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_filters = (ExportAutoScalingGroupRecommendations -> Maybe [Filter])
-> (ExportAutoScalingGroupRecommendations
    -> Maybe [Filter] -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [Filter]
a -> ExportAutoScalingGroupRecommendations
s {$sel:filters:ExportAutoScalingGroupRecommendations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ExportAutoScalingGroupRecommendations
 -> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The recommendations data to include in the export file. For more
-- information about the fields that can be exported, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>
-- in the /Compute Optimizer User Guide/.
exportAutoScalingGroupRecommendations_fieldsToExport :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [ExportableAutoScalingGroupField])
exportAutoScalingGroupRecommendations_fieldsToExport :: (Maybe [ExportableAutoScalingGroupField]
 -> f (Maybe [ExportableAutoScalingGroupField]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_fieldsToExport = (ExportAutoScalingGroupRecommendations
 -> Maybe [ExportableAutoScalingGroupField])
-> (ExportAutoScalingGroupRecommendations
    -> Maybe [ExportableAutoScalingGroupField]
    -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe [ExportableAutoScalingGroupField])
     (Maybe [ExportableAutoScalingGroupField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [ExportableAutoScalingGroupField]
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
fieldsToExport} -> Maybe [ExportableAutoScalingGroupField]
fieldsToExport) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [ExportableAutoScalingGroupField]
a -> ExportAutoScalingGroupRecommendations
s {$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: Maybe [ExportableAutoScalingGroupField]
fieldsToExport = Maybe [ExportableAutoScalingGroupField]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [ExportableAutoScalingGroupField]
  -> f (Maybe [ExportableAutoScalingGroupField]))
 -> ExportAutoScalingGroupRecommendations
 -> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [ExportableAutoScalingGroupField]
     -> f (Maybe [ExportableAutoScalingGroupField]))
    -> Maybe [ExportableAutoScalingGroupField]
    -> f (Maybe [ExportableAutoScalingGroupField]))
-> (Maybe [ExportableAutoScalingGroupField]
    -> f (Maybe [ExportableAutoScalingGroupField]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
-> Iso
     (Maybe [ExportableAutoScalingGroupField])
     (Maybe [ExportableAutoScalingGroupField])
     (Maybe [ExportableAutoScalingGroupField])
     (Maybe [ExportableAutoScalingGroupField])
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
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
  [ExportableAutoScalingGroupField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates whether to include recommendations for resources in all member
-- accounts of the organization if your account is the management account
-- of an organization.
--
-- The member accounts must also be opted in to Compute Optimizer, and
-- trusted access for Compute Optimizer must be enabled in the organization
-- account. For more information, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>
-- in the /Compute Optimizer User Guide/.
--
-- Recommendations for member accounts of the organization are not included
-- in the export file if this parameter is omitted.
--
-- This parameter cannot be specified together with the account IDs
-- parameter. The parameters are mutually exclusive.
--
-- Recommendations for member accounts are not included in the export if
-- this parameter, or the account IDs parameter, is omitted.
exportAutoScalingGroupRecommendations_includeMemberAccounts :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Bool)
exportAutoScalingGroupRecommendations_includeMemberAccounts :: (Maybe Bool -> f (Maybe Bool))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_includeMemberAccounts = (ExportAutoScalingGroupRecommendations -> Maybe Bool)
-> (ExportAutoScalingGroupRecommendations
    -> Maybe Bool -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe Bool
includeMemberAccounts :: Maybe Bool
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
includeMemberAccounts} -> Maybe Bool
includeMemberAccounts) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe Bool
a -> ExportAutoScalingGroupRecommendations
s {$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: Maybe Bool
includeMemberAccounts = Maybe Bool
a} :: ExportAutoScalingGroupRecommendations)

-- | An object to specify the preferences for the Auto Scaling group
-- recommendations to export.
exportAutoScalingGroupRecommendations_recommendationPreferences :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe RecommendationPreferences)
exportAutoScalingGroupRecommendations_recommendationPreferences :: (Maybe RecommendationPreferences
 -> f (Maybe RecommendationPreferences))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_recommendationPreferences = (ExportAutoScalingGroupRecommendations
 -> Maybe RecommendationPreferences)
-> (ExportAutoScalingGroupRecommendations
    -> Maybe RecommendationPreferences
    -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     (Maybe RecommendationPreferences)
     (Maybe RecommendationPreferences)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe RecommendationPreferences
recommendationPreferences :: Maybe RecommendationPreferences
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
recommendationPreferences} -> Maybe RecommendationPreferences
recommendationPreferences) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe RecommendationPreferences
a -> ExportAutoScalingGroupRecommendations
s {$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: Maybe RecommendationPreferences
recommendationPreferences = Maybe RecommendationPreferences
a} :: ExportAutoScalingGroupRecommendations)

-- | An object to specify the destination Amazon Simple Storage Service
-- (Amazon S3) bucket name and key prefix for the export job.
--
-- You must create the destination Amazon S3 bucket for your
-- recommendations export before you create the export job. Compute
-- Optimizer does not create the S3 bucket for you. After you create the S3
-- bucket, ensure that it has the required permissions policy to allow
-- Compute Optimizer to write the export file to it. If you plan to specify
-- an object prefix when you create the export job, you must include the
-- object prefix in the policy that you add to the S3 bucket. For more
-- information, see
-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>
-- in the /Compute Optimizer User Guide/.
exportAutoScalingGroupRecommendations_s3DestinationConfig :: Lens.Lens' ExportAutoScalingGroupRecommendations S3DestinationConfig
exportAutoScalingGroupRecommendations_s3DestinationConfig :: (S3DestinationConfig -> f S3DestinationConfig)
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_s3DestinationConfig = (ExportAutoScalingGroupRecommendations -> S3DestinationConfig)
-> (ExportAutoScalingGroupRecommendations
    -> S3DestinationConfig -> ExportAutoScalingGroupRecommendations)
-> Lens
     ExportAutoScalingGroupRecommendations
     ExportAutoScalingGroupRecommendations
     S3DestinationConfig
     S3DestinationConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
s3DestinationConfig} -> S3DestinationConfig
s3DestinationConfig) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} S3DestinationConfig
a -> ExportAutoScalingGroupRecommendations
s {$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: S3DestinationConfig
s3DestinationConfig = S3DestinationConfig
a} :: ExportAutoScalingGroupRecommendations)

instance
  Core.AWSRequest
    ExportAutoScalingGroupRecommendations
  where
  type
    AWSResponse
      ExportAutoScalingGroupRecommendations =
      ExportAutoScalingGroupRecommendationsResponse
  request :: ExportAutoScalingGroupRecommendations
-> Request ExportAutoScalingGroupRecommendations
request = Service
-> ExportAutoScalingGroupRecommendations
-> Request ExportAutoScalingGroupRecommendations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ExportAutoScalingGroupRecommendations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ExportAutoScalingGroupRecommendations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse ExportAutoScalingGroupRecommendations))
-> Logger
-> Service
-> Proxy ExportAutoScalingGroupRecommendations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ExportAutoScalingGroupRecommendations)))
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 S3Destination
-> Int
-> ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse'
            (Maybe Text
 -> Maybe S3Destination
 -> Int
 -> ExportAutoScalingGroupRecommendationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe S3Destination
      -> Int -> ExportAutoScalingGroupRecommendationsResponse)
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
"jobId")
              Either
  String
  (Maybe S3Destination
   -> Int -> ExportAutoScalingGroupRecommendationsResponse)
-> Either String (Maybe S3Destination)
-> Either
     String (Int -> ExportAutoScalingGroupRecommendationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe S3Destination)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"s3Destination")
              Either
  String (Int -> ExportAutoScalingGroupRecommendationsResponse)
-> Either String Int
-> Either String ExportAutoScalingGroupRecommendationsResponse
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
    ExportAutoScalingGroupRecommendations

instance
  Prelude.NFData
    ExportAutoScalingGroupRecommendations

instance
  Core.ToHeaders
    ExportAutoScalingGroupRecommendations
  where
  toHeaders :: ExportAutoScalingGroupRecommendations -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ExportAutoScalingGroupRecommendations -> 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.ExportAutoScalingGroupRecommendations" ::
                          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
    ExportAutoScalingGroupRecommendations
  where
  toJSON :: ExportAutoScalingGroupRecommendations -> Value
toJSON ExportAutoScalingGroupRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableAutoScalingGroupField]
Maybe [Filter]
Maybe FileFormat
Maybe RecommendationPreferences
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
recommendationPreferences :: Maybe RecommendationPreferences
includeMemberAccounts :: Maybe Bool
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
filters :: Maybe [Filter]
fileFormat :: Maybe FileFormat
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"accountIds" 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]
accountIds,
            (Text
"fileFormat" Text -> FileFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FileFormat -> Pair) -> Maybe FileFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileFormat
fileFormat,
            (Text
"filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"fieldsToExport" Text -> [ExportableAutoScalingGroupField] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ExportableAutoScalingGroupField] -> Pair)
-> Maybe [ExportableAutoScalingGroupField] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportableAutoScalingGroupField]
fieldsToExport,
            (Text
"includeMemberAccounts" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeMemberAccounts,
            (Text
"recommendationPreferences" Text -> RecommendationPreferences -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RecommendationPreferences -> Pair)
-> Maybe RecommendationPreferences -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecommendationPreferences
recommendationPreferences,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"s3DestinationConfig" Text -> S3DestinationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3DestinationConfig
s3DestinationConfig)
          ]
      )

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

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

-- | /See:/ 'newExportAutoScalingGroupRecommendationsResponse' smart constructor.
data ExportAutoScalingGroupRecommendationsResponse = ExportAutoScalingGroupRecommendationsResponse'
  { -- | The identification number of the export job.
    --
    -- Use the DescribeRecommendationExportJobs action, and specify the job ID
    -- to view the status of an export job.
    ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | An object that describes the destination Amazon S3 bucket of a
    -- recommendations export file.
    ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
    -- | The response's http status code.
    ExportAutoScalingGroupRecommendationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
(ExportAutoScalingGroupRecommendationsResponse
 -> ExportAutoScalingGroupRecommendationsResponse -> Bool)
-> (ExportAutoScalingGroupRecommendationsResponse
    -> ExportAutoScalingGroupRecommendationsResponse -> Bool)
-> Eq ExportAutoScalingGroupRecommendationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
$c/= :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
== :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
$c== :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
ReadPrec ExportAutoScalingGroupRecommendationsResponse
Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
ReadS [ExportAutoScalingGroupRecommendationsResponse]
(Int -> ReadS ExportAutoScalingGroupRecommendationsResponse)
-> ReadS [ExportAutoScalingGroupRecommendationsResponse]
-> ReadPrec ExportAutoScalingGroupRecommendationsResponse
-> ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
-> Read ExportAutoScalingGroupRecommendationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
$creadListPrec :: ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
readPrec :: ReadPrec ExportAutoScalingGroupRecommendationsResponse
$creadPrec :: ReadPrec ExportAutoScalingGroupRecommendationsResponse
readList :: ReadS [ExportAutoScalingGroupRecommendationsResponse]
$creadList :: ReadS [ExportAutoScalingGroupRecommendationsResponse]
readsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
$creadsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
Prelude.Read, Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
[ExportAutoScalingGroupRecommendationsResponse] -> ShowS
ExportAutoScalingGroupRecommendationsResponse -> String
(Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS)
-> (ExportAutoScalingGroupRecommendationsResponse -> String)
-> ([ExportAutoScalingGroupRecommendationsResponse] -> ShowS)
-> Show ExportAutoScalingGroupRecommendationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAutoScalingGroupRecommendationsResponse] -> ShowS
$cshowList :: [ExportAutoScalingGroupRecommendationsResponse] -> ShowS
show :: ExportAutoScalingGroupRecommendationsResponse -> String
$cshow :: ExportAutoScalingGroupRecommendationsResponse -> String
showsPrec :: Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
Prelude.Show, (forall x.
 ExportAutoScalingGroupRecommendationsResponse
 -> Rep ExportAutoScalingGroupRecommendationsResponse x)
-> (forall x.
    Rep ExportAutoScalingGroupRecommendationsResponse x
    -> ExportAutoScalingGroupRecommendationsResponse)
-> Generic ExportAutoScalingGroupRecommendationsResponse
forall x.
Rep ExportAutoScalingGroupRecommendationsResponse x
-> ExportAutoScalingGroupRecommendationsResponse
forall x.
ExportAutoScalingGroupRecommendationsResponse
-> Rep ExportAutoScalingGroupRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAutoScalingGroupRecommendationsResponse x
-> ExportAutoScalingGroupRecommendationsResponse
$cfrom :: forall x.
ExportAutoScalingGroupRecommendationsResponse
-> Rep ExportAutoScalingGroupRecommendationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ExportAutoScalingGroupRecommendationsResponse' 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:
--
-- 'jobId', 'exportAutoScalingGroupRecommendationsResponse_jobId' - The identification number of the export job.
--
-- Use the DescribeRecommendationExportJobs action, and specify the job ID
-- to view the status of an export job.
--
-- 's3Destination', 'exportAutoScalingGroupRecommendationsResponse_s3Destination' - An object that describes the destination Amazon S3 bucket of a
-- recommendations export file.
--
-- 'httpStatus', 'exportAutoScalingGroupRecommendationsResponse_httpStatus' - The response's http status code.
newExportAutoScalingGroupRecommendationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse :: Int -> ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse
  Int
pHttpStatus_ =
    ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
-> Maybe S3Destination
-> Int
-> ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse'
      { $sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
jobId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: Maybe S3Destination
s3Destination =
          Maybe S3Destination
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The identification number of the export job.
--
-- Use the DescribeRecommendationExportJobs action, and specify the job ID
-- to view the status of an export job.
exportAutoScalingGroupRecommendationsResponse_jobId :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe Prelude.Text)
exportAutoScalingGroupRecommendationsResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> ExportAutoScalingGroupRecommendationsResponse
-> f ExportAutoScalingGroupRecommendationsResponse
exportAutoScalingGroupRecommendationsResponse_jobId = (ExportAutoScalingGroupRecommendationsResponse -> Maybe Text)
-> (ExportAutoScalingGroupRecommendationsResponse
    -> Maybe Text -> ExportAutoScalingGroupRecommendationsResponse)
-> Lens
     ExportAutoScalingGroupRecommendationsResponse
     ExportAutoScalingGroupRecommendationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ExportAutoScalingGroupRecommendationsResponse
s@ExportAutoScalingGroupRecommendationsResponse' {} Maybe Text
a -> ExportAutoScalingGroupRecommendationsResponse
s {$sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
jobId = Maybe Text
a} :: ExportAutoScalingGroupRecommendationsResponse)

-- | An object that describes the destination Amazon S3 bucket of a
-- recommendations export file.
exportAutoScalingGroupRecommendationsResponse_s3Destination :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe S3Destination)
exportAutoScalingGroupRecommendationsResponse_s3Destination :: (Maybe S3Destination -> f (Maybe S3Destination))
-> ExportAutoScalingGroupRecommendationsResponse
-> f ExportAutoScalingGroupRecommendationsResponse
exportAutoScalingGroupRecommendationsResponse_s3Destination = (ExportAutoScalingGroupRecommendationsResponse
 -> Maybe S3Destination)
-> (ExportAutoScalingGroupRecommendationsResponse
    -> Maybe S3Destination
    -> ExportAutoScalingGroupRecommendationsResponse)
-> Lens
     ExportAutoScalingGroupRecommendationsResponse
     ExportAutoScalingGroupRecommendationsResponse
     (Maybe S3Destination)
     (Maybe S3Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: ExportAutoScalingGroupRecommendationsResponse
s@ExportAutoScalingGroupRecommendationsResponse' {} Maybe S3Destination
a -> ExportAutoScalingGroupRecommendationsResponse
s {$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: ExportAutoScalingGroupRecommendationsResponse)

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

instance
  Prelude.NFData
    ExportAutoScalingGroupRecommendationsResponse