{-# 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 #-}
module Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations
(
ExportAutoScalingGroupRecommendations (..),
newExportAutoScalingGroupRecommendations,
exportAutoScalingGroupRecommendations_accountIds,
exportAutoScalingGroupRecommendations_fieldsToExport,
exportAutoScalingGroupRecommendations_fileFormat,
exportAutoScalingGroupRecommendations_filters,
exportAutoScalingGroupRecommendations_includeMemberAccounts,
exportAutoScalingGroupRecommendations_recommendationPreferences,
exportAutoScalingGroupRecommendations_s3DestinationConfig,
ExportAutoScalingGroupRecommendationsResponse (..),
newExportAutoScalingGroupRecommendationsResponse,
exportAutoScalingGroupRecommendationsResponse_jobId,
exportAutoScalingGroupRecommendationsResponse_s3Destination,
exportAutoScalingGroupRecommendationsResponse_httpStatus,
)
where
import Amazonka.ComputeOptimizer.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ExportAutoScalingGroupRecommendations = ExportAutoScalingGroupRecommendations'
{
ExportAutoScalingGroupRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
fieldsToExport :: Prelude.Maybe [ExportableAutoScalingGroupField],
ExportAutoScalingGroupRecommendations -> Maybe FileFormat
fileFormat :: Prelude.Maybe FileFormat,
ExportAutoScalingGroupRecommendations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
ExportAutoScalingGroupRecommendations -> Maybe Bool
includeMemberAccounts :: Prelude.Maybe Prelude.Bool,
ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
recommendationPreferences :: Prelude.Maybe RecommendationPreferences,
ExportAutoScalingGroupRecommendations -> S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
}
deriving (ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
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]
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
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.
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)
newExportAutoScalingGroupRecommendations ::
S3DestinationConfig ->
ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations :: S3DestinationConfig -> ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations
S3DestinationConfig
pS3DestinationConfig_ =
ExportAutoScalingGroupRecommendations'
{ $sel:accountIds:ExportAutoScalingGroupRecommendations' :: Maybe [Text]
accountIds =
forall a. Maybe a
Prelude.Nothing,
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: Maybe [ExportableAutoScalingGroupField]
fieldsToExport = forall a. Maybe a
Prelude.Nothing,
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: Maybe FileFormat
fileFormat = forall a. Maybe a
Prelude.Nothing,
$sel:filters:ExportAutoScalingGroupRecommendations' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: Maybe Bool
includeMemberAccounts =
forall a. Maybe a
Prelude.Nothing,
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: Maybe RecommendationPreferences
recommendationPreferences =
forall a. Maybe a
Prelude.Nothing,
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: S3DestinationConfig
s3DestinationConfig =
S3DestinationConfig
pS3DestinationConfig_
}
exportAutoScalingGroupRecommendations_accountIds :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])
exportAutoScalingGroupRecommendations_accountIds :: Lens' ExportAutoScalingGroupRecommendations (Maybe [Text])
exportAutoScalingGroupRecommendations_accountIds = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_fieldsToExport :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [ExportableAutoScalingGroupField])
exportAutoScalingGroupRecommendations_fieldsToExport :: Lens'
ExportAutoScalingGroupRecommendations
(Maybe [ExportableAutoScalingGroupField])
exportAutoScalingGroupRecommendations_fieldsToExport = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_fileFormat :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe FileFormat)
exportAutoScalingGroupRecommendations_fileFormat :: Lens' ExportAutoScalingGroupRecommendations (Maybe FileFormat)
exportAutoScalingGroupRecommendations_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)
exportAutoScalingGroupRecommendations_filters :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Filter])
exportAutoScalingGroupRecommendations_filters :: Lens' ExportAutoScalingGroupRecommendations (Maybe [Filter])
exportAutoScalingGroupRecommendations_filters = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_includeMemberAccounts :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Bool)
exportAutoScalingGroupRecommendations_includeMemberAccounts :: Lens' ExportAutoScalingGroupRecommendations (Maybe Bool)
exportAutoScalingGroupRecommendations_includeMemberAccounts = 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)
exportAutoScalingGroupRecommendations_recommendationPreferences :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe RecommendationPreferences)
exportAutoScalingGroupRecommendations_recommendationPreferences :: Lens'
ExportAutoScalingGroupRecommendations
(Maybe RecommendationPreferences)
exportAutoScalingGroupRecommendations_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)
exportAutoScalingGroupRecommendations_s3DestinationConfig :: Lens.Lens' ExportAutoScalingGroupRecommendations S3DestinationConfig
exportAutoScalingGroupRecommendations_s3DestinationConfig :: Lens' ExportAutoScalingGroupRecommendations S3DestinationConfig
exportAutoScalingGroupRecommendations_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 :: (Service -> Service)
-> ExportAutoScalingGroupRecommendations
-> Request ExportAutoScalingGroupRecommendations
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ExportAutoScalingGroupRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ExportAutoScalingGroupRecommendations)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"jobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"s3Destination")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
ExportAutoScalingGroupRecommendations
where
hashWithSalt :: Int -> ExportAutoScalingGroupRecommendations -> Int
hashWithSalt
Int
_salt
ExportAutoScalingGroupRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableAutoScalingGroupField]
Maybe [Filter]
Maybe FileFormat
Maybe RecommendationPreferences
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
recommendationPreferences :: Maybe RecommendationPreferences
includeMemberAccounts :: Maybe Bool
filters :: Maybe [Filter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
accountIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ExportableAutoScalingGroupField]
fieldsToExport
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileFormat
fileFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeMemberAccounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecommendationPreferences
recommendationPreferences
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` S3DestinationConfig
s3DestinationConfig
instance
Prelude.NFData
ExportAutoScalingGroupRecommendations
where
rnf :: ExportAutoScalingGroupRecommendations -> ()
rnf ExportAutoScalingGroupRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableAutoScalingGroupField]
Maybe [Filter]
Maybe FileFormat
Maybe RecommendationPreferences
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
recommendationPreferences :: Maybe RecommendationPreferences
includeMemberAccounts :: Maybe Bool
filters :: Maybe [Filter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
accountIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExportableAutoScalingGroupField]
fieldsToExport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileFormat
fileFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeMemberAccounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecommendationPreferences
recommendationPreferences
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf S3DestinationConfig
s3DestinationConfig
instance
Data.ToHeaders
ExportAutoScalingGroupRecommendations
where
toHeaders :: ExportAutoScalingGroupRecommendations -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"ComputeOptimizerService.ExportAutoScalingGroupRecommendations" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Data.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
filters :: Maybe [Filter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"accountIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
accountIds,
(Key
"fieldsToExport" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportableAutoScalingGroupField]
fieldsToExport,
(Key
"fileFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileFormat
fileFormat,
(Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
(Key
"includeMemberAccounts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeMemberAccounts,
(Key
"recommendationPreferences" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecommendationPreferences
recommendationPreferences,
forall a. a -> Maybe a
Prelude.Just
(Key
"s3DestinationConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= S3DestinationConfig
s3DestinationConfig)
]
)
instance
Data.ToPath
ExportAutoScalingGroupRecommendations
where
toPath :: ExportAutoScalingGroupRecommendations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
ExportAutoScalingGroupRecommendations
where
toQuery :: ExportAutoScalingGroupRecommendations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ExportAutoScalingGroupRecommendationsResponse = ExportAutoScalingGroupRecommendationsResponse'
{
ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
ExportAutoScalingGroupRecommendationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
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]
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
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.
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)
newExportAutoScalingGroupRecommendationsResponse ::
Prelude.Int ->
ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse :: Int -> ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse
Int
pHttpStatus_ =
ExportAutoScalingGroupRecommendationsResponse'
{ $sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
jobId =
forall a. Maybe a
Prelude.Nothing,
$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: Maybe S3Destination
s3Destination =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
exportAutoScalingGroupRecommendationsResponse_jobId :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe Prelude.Text)
exportAutoScalingGroupRecommendationsResponse_jobId :: Lens' ExportAutoScalingGroupRecommendationsResponse (Maybe Text)
exportAutoScalingGroupRecommendationsResponse_jobId = 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)
exportAutoScalingGroupRecommendationsResponse_s3Destination :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe S3Destination)
exportAutoScalingGroupRecommendationsResponse_s3Destination :: Lens'
ExportAutoScalingGroupRecommendationsResponse (Maybe S3Destination)
exportAutoScalingGroupRecommendationsResponse_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)
exportAutoScalingGroupRecommendationsResponse_httpStatus :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse Prelude.Int
exportAutoScalingGroupRecommendationsResponse_httpStatus :: Lens' ExportAutoScalingGroupRecommendationsResponse Int
exportAutoScalingGroupRecommendationsResponse_httpStatus = 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
where
rnf :: ExportAutoScalingGroupRecommendationsResponse -> ()
rnf
ExportAutoScalingGroupRecommendationsResponse' {Int
Maybe Text
Maybe S3Destination
httpStatus :: Int
s3Destination :: Maybe S3Destination
jobId :: Maybe Text
$sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse -> Int
$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
$sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Destination
s3Destination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus