{-# 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.SavingsPlans.Types.SavingsPlanOffering
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SavingsPlans.Types.SavingsPlanOffering where

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 Amazonka.SavingsPlans.Types.CurrencyCode
import Amazonka.SavingsPlans.Types.SavingsPlanOfferingProperty
import Amazonka.SavingsPlans.Types.SavingsPlanPaymentOption
import Amazonka.SavingsPlans.Types.SavingsPlanProductType
import Amazonka.SavingsPlans.Types.SavingsPlanType

-- | Information about a Savings Plan offering.
--
-- /See:/ 'newSavingsPlanOffering' smart constructor.
data SavingsPlanOffering = SavingsPlanOffering'
  { -- | The currency.
    SavingsPlanOffering -> Maybe CurrencyCode
currency :: Prelude.Maybe CurrencyCode,
    -- | The description.
    SavingsPlanOffering -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The duration, in seconds.
    SavingsPlanOffering -> Maybe Natural
durationSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the offering.
    SavingsPlanOffering -> Maybe Text
offeringId :: Prelude.Maybe Prelude.Text,
    -- | The specific AWS operation for the line item in the billing report.
    SavingsPlanOffering -> Maybe Text
operation :: Prelude.Maybe Prelude.Text,
    -- | The payment option.
    SavingsPlanOffering -> Maybe SavingsPlanPaymentOption
paymentOption :: Prelude.Maybe SavingsPlanPaymentOption,
    -- | The plan type.
    SavingsPlanOffering -> Maybe SavingsPlanType
planType :: Prelude.Maybe SavingsPlanType,
    -- | The product type.
    SavingsPlanOffering -> Maybe [SavingsPlanProductType]
productTypes :: Prelude.Maybe [SavingsPlanProductType],
    -- | The properties.
    SavingsPlanOffering -> Maybe [SavingsPlanOfferingProperty]
properties :: Prelude.Maybe [SavingsPlanOfferingProperty],
    -- | The service.
    SavingsPlanOffering -> Maybe Text
serviceCode :: Prelude.Maybe Prelude.Text,
    -- | The usage details of the line item in the billing report.
    SavingsPlanOffering -> Maybe Text
usageType :: Prelude.Maybe Prelude.Text
  }
  deriving (SavingsPlanOffering -> SavingsPlanOffering -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavingsPlanOffering -> SavingsPlanOffering -> Bool
$c/= :: SavingsPlanOffering -> SavingsPlanOffering -> Bool
== :: SavingsPlanOffering -> SavingsPlanOffering -> Bool
$c== :: SavingsPlanOffering -> SavingsPlanOffering -> Bool
Prelude.Eq, ReadPrec [SavingsPlanOffering]
ReadPrec SavingsPlanOffering
Int -> ReadS SavingsPlanOffering
ReadS [SavingsPlanOffering]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SavingsPlanOffering]
$creadListPrec :: ReadPrec [SavingsPlanOffering]
readPrec :: ReadPrec SavingsPlanOffering
$creadPrec :: ReadPrec SavingsPlanOffering
readList :: ReadS [SavingsPlanOffering]
$creadList :: ReadS [SavingsPlanOffering]
readsPrec :: Int -> ReadS SavingsPlanOffering
$creadsPrec :: Int -> ReadS SavingsPlanOffering
Prelude.Read, Int -> SavingsPlanOffering -> ShowS
[SavingsPlanOffering] -> ShowS
SavingsPlanOffering -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SavingsPlanOffering] -> ShowS
$cshowList :: [SavingsPlanOffering] -> ShowS
show :: SavingsPlanOffering -> String
$cshow :: SavingsPlanOffering -> String
showsPrec :: Int -> SavingsPlanOffering -> ShowS
$cshowsPrec :: Int -> SavingsPlanOffering -> ShowS
Prelude.Show, forall x. Rep SavingsPlanOffering x -> SavingsPlanOffering
forall x. SavingsPlanOffering -> Rep SavingsPlanOffering x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SavingsPlanOffering x -> SavingsPlanOffering
$cfrom :: forall x. SavingsPlanOffering -> Rep SavingsPlanOffering x
Prelude.Generic)

-- |
-- Create a value of 'SavingsPlanOffering' 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:
--
-- 'currency', 'savingsPlanOffering_currency' - The currency.
--
-- 'description', 'savingsPlanOffering_description' - The description.
--
-- 'durationSeconds', 'savingsPlanOffering_durationSeconds' - The duration, in seconds.
--
-- 'offeringId', 'savingsPlanOffering_offeringId' - The ID of the offering.
--
-- 'operation', 'savingsPlanOffering_operation' - The specific AWS operation for the line item in the billing report.
--
-- 'paymentOption', 'savingsPlanOffering_paymentOption' - The payment option.
--
-- 'planType', 'savingsPlanOffering_planType' - The plan type.
--
-- 'productTypes', 'savingsPlanOffering_productTypes' - The product type.
--
-- 'properties', 'savingsPlanOffering_properties' - The properties.
--
-- 'serviceCode', 'savingsPlanOffering_serviceCode' - The service.
--
-- 'usageType', 'savingsPlanOffering_usageType' - The usage details of the line item in the billing report.
newSavingsPlanOffering ::
  SavingsPlanOffering
newSavingsPlanOffering :: SavingsPlanOffering
newSavingsPlanOffering =
  SavingsPlanOffering'
    { $sel:currency:SavingsPlanOffering' :: Maybe CurrencyCode
currency = forall a. Maybe a
Prelude.Nothing,
      $sel:description:SavingsPlanOffering' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:durationSeconds:SavingsPlanOffering' :: Maybe Natural
durationSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:offeringId:SavingsPlanOffering' :: Maybe Text
offeringId = forall a. Maybe a
Prelude.Nothing,
      $sel:operation:SavingsPlanOffering' :: Maybe Text
operation = forall a. Maybe a
Prelude.Nothing,
      $sel:paymentOption:SavingsPlanOffering' :: Maybe SavingsPlanPaymentOption
paymentOption = forall a. Maybe a
Prelude.Nothing,
      $sel:planType:SavingsPlanOffering' :: Maybe SavingsPlanType
planType = forall a. Maybe a
Prelude.Nothing,
      $sel:productTypes:SavingsPlanOffering' :: Maybe [SavingsPlanProductType]
productTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:properties:SavingsPlanOffering' :: Maybe [SavingsPlanOfferingProperty]
properties = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceCode:SavingsPlanOffering' :: Maybe Text
serviceCode = forall a. Maybe a
Prelude.Nothing,
      $sel:usageType:SavingsPlanOffering' :: Maybe Text
usageType = forall a. Maybe a
Prelude.Nothing
    }

-- | The currency.
savingsPlanOffering_currency :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe CurrencyCode)
savingsPlanOffering_currency :: Lens' SavingsPlanOffering (Maybe CurrencyCode)
savingsPlanOffering_currency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe CurrencyCode
currency :: Maybe CurrencyCode
$sel:currency:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe CurrencyCode
currency} -> Maybe CurrencyCode
currency) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe CurrencyCode
a -> SavingsPlanOffering
s {$sel:currency:SavingsPlanOffering' :: Maybe CurrencyCode
currency = Maybe CurrencyCode
a} :: SavingsPlanOffering)

-- | The description.
savingsPlanOffering_description :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Text)
savingsPlanOffering_description :: Lens' SavingsPlanOffering (Maybe Text)
savingsPlanOffering_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Text
description :: Maybe Text
$sel:description:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
description} -> Maybe Text
description) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Text
a -> SavingsPlanOffering
s {$sel:description:SavingsPlanOffering' :: Maybe Text
description = Maybe Text
a} :: SavingsPlanOffering)

-- | The duration, in seconds.
savingsPlanOffering_durationSeconds :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Natural)
savingsPlanOffering_durationSeconds :: Lens' SavingsPlanOffering (Maybe Natural)
savingsPlanOffering_durationSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Natural
durationSeconds :: Maybe Natural
$sel:durationSeconds:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Natural
durationSeconds} -> Maybe Natural
durationSeconds) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Natural
a -> SavingsPlanOffering
s {$sel:durationSeconds:SavingsPlanOffering' :: Maybe Natural
durationSeconds = Maybe Natural
a} :: SavingsPlanOffering)

-- | The ID of the offering.
savingsPlanOffering_offeringId :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Text)
savingsPlanOffering_offeringId :: Lens' SavingsPlanOffering (Maybe Text)
savingsPlanOffering_offeringId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Text
offeringId :: Maybe Text
$sel:offeringId:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
offeringId} -> Maybe Text
offeringId) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Text
a -> SavingsPlanOffering
s {$sel:offeringId:SavingsPlanOffering' :: Maybe Text
offeringId = Maybe Text
a} :: SavingsPlanOffering)

-- | The specific AWS operation for the line item in the billing report.
savingsPlanOffering_operation :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Text)
savingsPlanOffering_operation :: Lens' SavingsPlanOffering (Maybe Text)
savingsPlanOffering_operation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Text
operation :: Maybe Text
$sel:operation:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
operation} -> Maybe Text
operation) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Text
a -> SavingsPlanOffering
s {$sel:operation:SavingsPlanOffering' :: Maybe Text
operation = Maybe Text
a} :: SavingsPlanOffering)

-- | The payment option.
savingsPlanOffering_paymentOption :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe SavingsPlanPaymentOption)
savingsPlanOffering_paymentOption :: Lens' SavingsPlanOffering (Maybe SavingsPlanPaymentOption)
savingsPlanOffering_paymentOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe SavingsPlanPaymentOption
paymentOption :: Maybe SavingsPlanPaymentOption
$sel:paymentOption:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanPaymentOption
paymentOption} -> Maybe SavingsPlanPaymentOption
paymentOption) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe SavingsPlanPaymentOption
a -> SavingsPlanOffering
s {$sel:paymentOption:SavingsPlanOffering' :: Maybe SavingsPlanPaymentOption
paymentOption = Maybe SavingsPlanPaymentOption
a} :: SavingsPlanOffering)

-- | The plan type.
savingsPlanOffering_planType :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe SavingsPlanType)
savingsPlanOffering_planType :: Lens' SavingsPlanOffering (Maybe SavingsPlanType)
savingsPlanOffering_planType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe SavingsPlanType
planType :: Maybe SavingsPlanType
$sel:planType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanType
planType} -> Maybe SavingsPlanType
planType) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe SavingsPlanType
a -> SavingsPlanOffering
s {$sel:planType:SavingsPlanOffering' :: Maybe SavingsPlanType
planType = Maybe SavingsPlanType
a} :: SavingsPlanOffering)

-- | The product type.
savingsPlanOffering_productTypes :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe [SavingsPlanProductType])
savingsPlanOffering_productTypes :: Lens' SavingsPlanOffering (Maybe [SavingsPlanProductType])
savingsPlanOffering_productTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe [SavingsPlanProductType]
productTypes :: Maybe [SavingsPlanProductType]
$sel:productTypes:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanProductType]
productTypes} -> Maybe [SavingsPlanProductType]
productTypes) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe [SavingsPlanProductType]
a -> SavingsPlanOffering
s {$sel:productTypes:SavingsPlanOffering' :: Maybe [SavingsPlanProductType]
productTypes = Maybe [SavingsPlanProductType]
a} :: SavingsPlanOffering) 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

-- | The properties.
savingsPlanOffering_properties :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe [SavingsPlanOfferingProperty])
savingsPlanOffering_properties :: Lens' SavingsPlanOffering (Maybe [SavingsPlanOfferingProperty])
savingsPlanOffering_properties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe [SavingsPlanOfferingProperty]
properties :: Maybe [SavingsPlanOfferingProperty]
$sel:properties:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanOfferingProperty]
properties} -> Maybe [SavingsPlanOfferingProperty]
properties) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe [SavingsPlanOfferingProperty]
a -> SavingsPlanOffering
s {$sel:properties:SavingsPlanOffering' :: Maybe [SavingsPlanOfferingProperty]
properties = Maybe [SavingsPlanOfferingProperty]
a} :: SavingsPlanOffering) 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

-- | The service.
savingsPlanOffering_serviceCode :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Text)
savingsPlanOffering_serviceCode :: Lens' SavingsPlanOffering (Maybe Text)
savingsPlanOffering_serviceCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Text
serviceCode :: Maybe Text
$sel:serviceCode:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
serviceCode} -> Maybe Text
serviceCode) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Text
a -> SavingsPlanOffering
s {$sel:serviceCode:SavingsPlanOffering' :: Maybe Text
serviceCode = Maybe Text
a} :: SavingsPlanOffering)

-- | The usage details of the line item in the billing report.
savingsPlanOffering_usageType :: Lens.Lens' SavingsPlanOffering (Prelude.Maybe Prelude.Text)
savingsPlanOffering_usageType :: Lens' SavingsPlanOffering (Maybe Text)
savingsPlanOffering_usageType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlanOffering' {Maybe Text
usageType :: Maybe Text
$sel:usageType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
usageType} -> Maybe Text
usageType) (\s :: SavingsPlanOffering
s@SavingsPlanOffering' {} Maybe Text
a -> SavingsPlanOffering
s {$sel:usageType:SavingsPlanOffering' :: Maybe Text
usageType = Maybe Text
a} :: SavingsPlanOffering)

instance Data.FromJSON SavingsPlanOffering where
  parseJSON :: Value -> Parser SavingsPlanOffering
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SavingsPlanOffering"
      ( \Object
x ->
          Maybe CurrencyCode
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe SavingsPlanPaymentOption
-> Maybe SavingsPlanType
-> Maybe [SavingsPlanProductType]
-> Maybe [SavingsPlanOfferingProperty]
-> Maybe Text
-> Maybe Text
-> SavingsPlanOffering
SavingsPlanOffering'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"currency")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"durationSeconds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"offeringId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"operation")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"paymentOption")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"planType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"productTypes" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"properties" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serviceCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"usageType")
      )

instance Prelude.Hashable SavingsPlanOffering where
  hashWithSalt :: Int -> SavingsPlanOffering -> Int
hashWithSalt Int
_salt SavingsPlanOffering' {Maybe Natural
Maybe [SavingsPlanOfferingProperty]
Maybe [SavingsPlanProductType]
Maybe Text
Maybe CurrencyCode
Maybe SavingsPlanPaymentOption
Maybe SavingsPlanType
usageType :: Maybe Text
serviceCode :: Maybe Text
properties :: Maybe [SavingsPlanOfferingProperty]
productTypes :: Maybe [SavingsPlanProductType]
planType :: Maybe SavingsPlanType
paymentOption :: Maybe SavingsPlanPaymentOption
operation :: Maybe Text
offeringId :: Maybe Text
durationSeconds :: Maybe Natural
description :: Maybe Text
currency :: Maybe CurrencyCode
$sel:usageType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:serviceCode:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:properties:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanOfferingProperty]
$sel:productTypes:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanProductType]
$sel:planType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanType
$sel:paymentOption:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanPaymentOption
$sel:operation:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:offeringId:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:durationSeconds:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Natural
$sel:description:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:currency:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe CurrencyCode
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CurrencyCode
currency
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
durationSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
offeringId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SavingsPlanPaymentOption
paymentOption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SavingsPlanType
planType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SavingsPlanProductType]
productTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SavingsPlanOfferingProperty]
properties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
usageType

instance Prelude.NFData SavingsPlanOffering where
  rnf :: SavingsPlanOffering -> ()
rnf SavingsPlanOffering' {Maybe Natural
Maybe [SavingsPlanOfferingProperty]
Maybe [SavingsPlanProductType]
Maybe Text
Maybe CurrencyCode
Maybe SavingsPlanPaymentOption
Maybe SavingsPlanType
usageType :: Maybe Text
serviceCode :: Maybe Text
properties :: Maybe [SavingsPlanOfferingProperty]
productTypes :: Maybe [SavingsPlanProductType]
planType :: Maybe SavingsPlanType
paymentOption :: Maybe SavingsPlanPaymentOption
operation :: Maybe Text
offeringId :: Maybe Text
durationSeconds :: Maybe Natural
description :: Maybe Text
currency :: Maybe CurrencyCode
$sel:usageType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:serviceCode:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:properties:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanOfferingProperty]
$sel:productTypes:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe [SavingsPlanProductType]
$sel:planType:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanType
$sel:paymentOption:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe SavingsPlanPaymentOption
$sel:operation:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:offeringId:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:durationSeconds:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Natural
$sel:description:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe Text
$sel:currency:SavingsPlanOffering' :: SavingsPlanOffering -> Maybe CurrencyCode
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CurrencyCode
currency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
durationSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
offeringId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SavingsPlanPaymentOption
paymentOption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SavingsPlanType
planType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanProductType]
productTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanOfferingProperty]
properties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
usageType