{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SecurityHub.Types.AwsAutoScalingAutoScalingGroupDetails
-- 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)
module Amazonka.SecurityHub.Types.AwsAutoScalingAutoScalingGroupDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides details about an auto scaling group.
--
-- /See:/ 'newAwsAutoScalingAutoScalingGroupDetails' smart constructor.
data AwsAutoScalingAutoScalingGroupDetails = AwsAutoScalingAutoScalingGroupDetails'
  { -- | Indicates when the auto scaling group was created.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
    -- | The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
    -- before it checks the health status of an EC2 instance that has come into
    -- service.
    AwsAutoScalingAutoScalingGroupDetails -> Maybe Int
healthCheckGracePeriod :: Prelude.Maybe Prelude.Int,
    -- | The name of the launch configuration.
    AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
launchConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | The service to use for the health checks.
    AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
healthCheckType :: Prelude.Maybe Prelude.Text,
    -- | The list of load balancers associated with the group.
    AwsAutoScalingAutoScalingGroupDetails -> Maybe [Text]
loadBalancerNames :: Prelude.Maybe [Prelude.Text]
  }
  deriving (AwsAutoScalingAutoScalingGroupDetails
-> AwsAutoScalingAutoScalingGroupDetails -> Bool
(AwsAutoScalingAutoScalingGroupDetails
 -> AwsAutoScalingAutoScalingGroupDetails -> Bool)
-> (AwsAutoScalingAutoScalingGroupDetails
    -> AwsAutoScalingAutoScalingGroupDetails -> Bool)
-> Eq AwsAutoScalingAutoScalingGroupDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsAutoScalingAutoScalingGroupDetails
-> AwsAutoScalingAutoScalingGroupDetails -> Bool
$c/= :: AwsAutoScalingAutoScalingGroupDetails
-> AwsAutoScalingAutoScalingGroupDetails -> Bool
== :: AwsAutoScalingAutoScalingGroupDetails
-> AwsAutoScalingAutoScalingGroupDetails -> Bool
$c== :: AwsAutoScalingAutoScalingGroupDetails
-> AwsAutoScalingAutoScalingGroupDetails -> Bool
Prelude.Eq, ReadPrec [AwsAutoScalingAutoScalingGroupDetails]
ReadPrec AwsAutoScalingAutoScalingGroupDetails
Int -> ReadS AwsAutoScalingAutoScalingGroupDetails
ReadS [AwsAutoScalingAutoScalingGroupDetails]
(Int -> ReadS AwsAutoScalingAutoScalingGroupDetails)
-> ReadS [AwsAutoScalingAutoScalingGroupDetails]
-> ReadPrec AwsAutoScalingAutoScalingGroupDetails
-> ReadPrec [AwsAutoScalingAutoScalingGroupDetails]
-> Read AwsAutoScalingAutoScalingGroupDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsAutoScalingAutoScalingGroupDetails]
$creadListPrec :: ReadPrec [AwsAutoScalingAutoScalingGroupDetails]
readPrec :: ReadPrec AwsAutoScalingAutoScalingGroupDetails
$creadPrec :: ReadPrec AwsAutoScalingAutoScalingGroupDetails
readList :: ReadS [AwsAutoScalingAutoScalingGroupDetails]
$creadList :: ReadS [AwsAutoScalingAutoScalingGroupDetails]
readsPrec :: Int -> ReadS AwsAutoScalingAutoScalingGroupDetails
$creadsPrec :: Int -> ReadS AwsAutoScalingAutoScalingGroupDetails
Prelude.Read, Int -> AwsAutoScalingAutoScalingGroupDetails -> ShowS
[AwsAutoScalingAutoScalingGroupDetails] -> ShowS
AwsAutoScalingAutoScalingGroupDetails -> String
(Int -> AwsAutoScalingAutoScalingGroupDetails -> ShowS)
-> (AwsAutoScalingAutoScalingGroupDetails -> String)
-> ([AwsAutoScalingAutoScalingGroupDetails] -> ShowS)
-> Show AwsAutoScalingAutoScalingGroupDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsAutoScalingAutoScalingGroupDetails] -> ShowS
$cshowList :: [AwsAutoScalingAutoScalingGroupDetails] -> ShowS
show :: AwsAutoScalingAutoScalingGroupDetails -> String
$cshow :: AwsAutoScalingAutoScalingGroupDetails -> String
showsPrec :: Int -> AwsAutoScalingAutoScalingGroupDetails -> ShowS
$cshowsPrec :: Int -> AwsAutoScalingAutoScalingGroupDetails -> ShowS
Prelude.Show, (forall x.
 AwsAutoScalingAutoScalingGroupDetails
 -> Rep AwsAutoScalingAutoScalingGroupDetails x)
-> (forall x.
    Rep AwsAutoScalingAutoScalingGroupDetails x
    -> AwsAutoScalingAutoScalingGroupDetails)
-> Generic AwsAutoScalingAutoScalingGroupDetails
forall x.
Rep AwsAutoScalingAutoScalingGroupDetails x
-> AwsAutoScalingAutoScalingGroupDetails
forall x.
AwsAutoScalingAutoScalingGroupDetails
-> Rep AwsAutoScalingAutoScalingGroupDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsAutoScalingAutoScalingGroupDetails x
-> AwsAutoScalingAutoScalingGroupDetails
$cfrom :: forall x.
AwsAutoScalingAutoScalingGroupDetails
-> Rep AwsAutoScalingAutoScalingGroupDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsAutoScalingAutoScalingGroupDetails' 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:
--
-- 'createdTime', 'awsAutoScalingAutoScalingGroupDetails_createdTime' - Indicates when the auto scaling group was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
--
-- 'healthCheckGracePeriod', 'awsAutoScalingAutoScalingGroupDetails_healthCheckGracePeriod' - The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
-- before it checks the health status of an EC2 instance that has come into
-- service.
--
-- 'launchConfigurationName', 'awsAutoScalingAutoScalingGroupDetails_launchConfigurationName' - The name of the launch configuration.
--
-- 'healthCheckType', 'awsAutoScalingAutoScalingGroupDetails_healthCheckType' - The service to use for the health checks.
--
-- 'loadBalancerNames', 'awsAutoScalingAutoScalingGroupDetails_loadBalancerNames' - The list of load balancers associated with the group.
newAwsAutoScalingAutoScalingGroupDetails ::
  AwsAutoScalingAutoScalingGroupDetails
newAwsAutoScalingAutoScalingGroupDetails :: AwsAutoScalingAutoScalingGroupDetails
newAwsAutoScalingAutoScalingGroupDetails =
  AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> AwsAutoScalingAutoScalingGroupDetails
AwsAutoScalingAutoScalingGroupDetails'
    { $sel:createdTime:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
createdTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckGracePeriod:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Int
healthCheckGracePeriod =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:launchConfigurationName:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
launchConfigurationName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckType:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
healthCheckType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:loadBalancerNames:AwsAutoScalingAutoScalingGroupDetails' :: Maybe [Text]
loadBalancerNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates when the auto scaling group was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsAutoScalingAutoScalingGroupDetails_createdTime :: Lens.Lens' AwsAutoScalingAutoScalingGroupDetails (Prelude.Maybe Prelude.Text)
awsAutoScalingAutoScalingGroupDetails_createdTime :: (Maybe Text -> f (Maybe Text))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
awsAutoScalingAutoScalingGroupDetails_createdTime = (AwsAutoScalingAutoScalingGroupDetails -> Maybe Text)
-> (AwsAutoScalingAutoScalingGroupDetails
    -> Maybe Text -> AwsAutoScalingAutoScalingGroupDetails)
-> Lens
     AwsAutoScalingAutoScalingGroupDetails
     AwsAutoScalingAutoScalingGroupDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsAutoScalingAutoScalingGroupDetails' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: AwsAutoScalingAutoScalingGroupDetails
s@AwsAutoScalingAutoScalingGroupDetails' {} Maybe Text
a -> AwsAutoScalingAutoScalingGroupDetails
s {$sel:createdTime:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
createdTime = Maybe Text
a} :: AwsAutoScalingAutoScalingGroupDetails)

-- | The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
-- before it checks the health status of an EC2 instance that has come into
-- service.
awsAutoScalingAutoScalingGroupDetails_healthCheckGracePeriod :: Lens.Lens' AwsAutoScalingAutoScalingGroupDetails (Prelude.Maybe Prelude.Int)
awsAutoScalingAutoScalingGroupDetails_healthCheckGracePeriod :: (Maybe Int -> f (Maybe Int))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
awsAutoScalingAutoScalingGroupDetails_healthCheckGracePeriod = (AwsAutoScalingAutoScalingGroupDetails -> Maybe Int)
-> (AwsAutoScalingAutoScalingGroupDetails
    -> Maybe Int -> AwsAutoScalingAutoScalingGroupDetails)
-> Lens
     AwsAutoScalingAutoScalingGroupDetails
     AwsAutoScalingAutoScalingGroupDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsAutoScalingAutoScalingGroupDetails' {Maybe Int
healthCheckGracePeriod :: Maybe Int
$sel:healthCheckGracePeriod:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Int
healthCheckGracePeriod} -> Maybe Int
healthCheckGracePeriod) (\s :: AwsAutoScalingAutoScalingGroupDetails
s@AwsAutoScalingAutoScalingGroupDetails' {} Maybe Int
a -> AwsAutoScalingAutoScalingGroupDetails
s {$sel:healthCheckGracePeriod:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Int
healthCheckGracePeriod = Maybe Int
a} :: AwsAutoScalingAutoScalingGroupDetails)

-- | The name of the launch configuration.
awsAutoScalingAutoScalingGroupDetails_launchConfigurationName :: Lens.Lens' AwsAutoScalingAutoScalingGroupDetails (Prelude.Maybe Prelude.Text)
awsAutoScalingAutoScalingGroupDetails_launchConfigurationName :: (Maybe Text -> f (Maybe Text))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
awsAutoScalingAutoScalingGroupDetails_launchConfigurationName = (AwsAutoScalingAutoScalingGroupDetails -> Maybe Text)
-> (AwsAutoScalingAutoScalingGroupDetails
    -> Maybe Text -> AwsAutoScalingAutoScalingGroupDetails)
-> Lens
     AwsAutoScalingAutoScalingGroupDetails
     AwsAutoScalingAutoScalingGroupDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsAutoScalingAutoScalingGroupDetails' {Maybe Text
launchConfigurationName :: Maybe Text
$sel:launchConfigurationName:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
launchConfigurationName} -> Maybe Text
launchConfigurationName) (\s :: AwsAutoScalingAutoScalingGroupDetails
s@AwsAutoScalingAutoScalingGroupDetails' {} Maybe Text
a -> AwsAutoScalingAutoScalingGroupDetails
s {$sel:launchConfigurationName:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
launchConfigurationName = Maybe Text
a} :: AwsAutoScalingAutoScalingGroupDetails)

-- | The service to use for the health checks.
awsAutoScalingAutoScalingGroupDetails_healthCheckType :: Lens.Lens' AwsAutoScalingAutoScalingGroupDetails (Prelude.Maybe Prelude.Text)
awsAutoScalingAutoScalingGroupDetails_healthCheckType :: (Maybe Text -> f (Maybe Text))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
awsAutoScalingAutoScalingGroupDetails_healthCheckType = (AwsAutoScalingAutoScalingGroupDetails -> Maybe Text)
-> (AwsAutoScalingAutoScalingGroupDetails
    -> Maybe Text -> AwsAutoScalingAutoScalingGroupDetails)
-> Lens
     AwsAutoScalingAutoScalingGroupDetails
     AwsAutoScalingAutoScalingGroupDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsAutoScalingAutoScalingGroupDetails' {Maybe Text
healthCheckType :: Maybe Text
$sel:healthCheckType:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
healthCheckType} -> Maybe Text
healthCheckType) (\s :: AwsAutoScalingAutoScalingGroupDetails
s@AwsAutoScalingAutoScalingGroupDetails' {} Maybe Text
a -> AwsAutoScalingAutoScalingGroupDetails
s {$sel:healthCheckType:AwsAutoScalingAutoScalingGroupDetails' :: Maybe Text
healthCheckType = Maybe Text
a} :: AwsAutoScalingAutoScalingGroupDetails)

-- | The list of load balancers associated with the group.
awsAutoScalingAutoScalingGroupDetails_loadBalancerNames :: Lens.Lens' AwsAutoScalingAutoScalingGroupDetails (Prelude.Maybe [Prelude.Text])
awsAutoScalingAutoScalingGroupDetails_loadBalancerNames :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
awsAutoScalingAutoScalingGroupDetails_loadBalancerNames = (AwsAutoScalingAutoScalingGroupDetails -> Maybe [Text])
-> (AwsAutoScalingAutoScalingGroupDetails
    -> Maybe [Text] -> AwsAutoScalingAutoScalingGroupDetails)
-> Lens
     AwsAutoScalingAutoScalingGroupDetails
     AwsAutoScalingAutoScalingGroupDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsAutoScalingAutoScalingGroupDetails' {Maybe [Text]
loadBalancerNames :: Maybe [Text]
$sel:loadBalancerNames:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe [Text]
loadBalancerNames} -> Maybe [Text]
loadBalancerNames) (\s :: AwsAutoScalingAutoScalingGroupDetails
s@AwsAutoScalingAutoScalingGroupDetails' {} Maybe [Text]
a -> AwsAutoScalingAutoScalingGroupDetails
s {$sel:loadBalancerNames:AwsAutoScalingAutoScalingGroupDetails' :: Maybe [Text]
loadBalancerNames = Maybe [Text]
a} :: AwsAutoScalingAutoScalingGroupDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsAutoScalingAutoScalingGroupDetails
 -> f AwsAutoScalingAutoScalingGroupDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsAutoScalingAutoScalingGroupDetails
-> f AwsAutoScalingAutoScalingGroupDetails
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

instance
  Core.FromJSON
    AwsAutoScalingAutoScalingGroupDetails
  where
  parseJSON :: Value -> Parser AwsAutoScalingAutoScalingGroupDetails
parseJSON =
    String
-> (Object -> Parser AwsAutoScalingAutoScalingGroupDetails)
-> Value
-> Parser AwsAutoScalingAutoScalingGroupDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsAutoScalingAutoScalingGroupDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> AwsAutoScalingAutoScalingGroupDetails
AwsAutoScalingAutoScalingGroupDetails'
            (Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> AwsAutoScalingAutoScalingGroupDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> AwsAutoScalingAutoScalingGroupDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> AwsAutoScalingAutoScalingGroupDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> AwsAutoScalingAutoScalingGroupDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HealthCheckGracePeriod")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> AwsAutoScalingAutoScalingGroupDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text] -> AwsAutoScalingAutoScalingGroupDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LaunchConfigurationName")
            Parser
  (Maybe Text
   -> Maybe [Text] -> AwsAutoScalingAutoScalingGroupDetails)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> AwsAutoScalingAutoScalingGroupDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HealthCheckType")
            Parser (Maybe [Text] -> AwsAutoScalingAutoScalingGroupDetails)
-> Parser (Maybe [Text])
-> Parser AwsAutoScalingAutoScalingGroupDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoadBalancerNames"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    AwsAutoScalingAutoScalingGroupDetails

instance
  Prelude.NFData
    AwsAutoScalingAutoScalingGroupDetails

instance
  Core.ToJSON
    AwsAutoScalingAutoScalingGroupDetails
  where
  toJSON :: AwsAutoScalingAutoScalingGroupDetails -> Value
toJSON AwsAutoScalingAutoScalingGroupDetails' {Maybe Int
Maybe [Text]
Maybe Text
loadBalancerNames :: Maybe [Text]
healthCheckType :: Maybe Text
launchConfigurationName :: Maybe Text
healthCheckGracePeriod :: Maybe Int
createdTime :: Maybe Text
$sel:loadBalancerNames:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe [Text]
$sel:healthCheckType:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
$sel:launchConfigurationName:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
$sel:healthCheckGracePeriod:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Int
$sel:createdTime:AwsAutoScalingAutoScalingGroupDetails' :: AwsAutoScalingAutoScalingGroupDetails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CreatedTime" 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
createdTime,
            (Text
"HealthCheckGracePeriod" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
healthCheckGracePeriod,
            (Text
"LaunchConfigurationName" 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
launchConfigurationName,
            (Text
"HealthCheckType" 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
healthCheckType,
            (Text
"LoadBalancerNames" 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]
loadBalancerNames
          ]
      )