{-# 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.EC2.Types.ProvisionedBandwidth
-- 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.EC2.Types.ProvisionedBandwidth where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
--
-- /See:/ 'newProvisionedBandwidth' smart constructor.
data ProvisionedBandwidth = ProvisionedBandwidth'
  { -- | Reserved. If you need to sustain traffic greater than the
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
    -- contact us through the
    -- <https://console.aws.amazon.com/support/home? Support Center>.
    ProvisionedBandwidth -> Maybe ISO8601
provisionTime :: Prelude.Maybe Data.ISO8601,
    -- | Reserved. If you need to sustain traffic greater than the
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
    -- contact us through the
    -- <https://console.aws.amazon.com/support/home? Support Center>.
    ProvisionedBandwidth -> Maybe Text
provisioned :: Prelude.Maybe Prelude.Text,
    -- | Reserved. If you need to sustain traffic greater than the
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
    -- contact us through the
    -- <https://console.aws.amazon.com/support/home? Support Center>.
    ProvisionedBandwidth -> Maybe ISO8601
requestTime :: Prelude.Maybe Data.ISO8601,
    -- | Reserved. If you need to sustain traffic greater than the
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
    -- contact us through the
    -- <https://console.aws.amazon.com/support/home? Support Center>.
    ProvisionedBandwidth -> Maybe Text
requested :: Prelude.Maybe Prelude.Text,
    -- | Reserved. If you need to sustain traffic greater than the
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
    -- contact us through the
    -- <https://console.aws.amazon.com/support/home? Support Center>.
    ProvisionedBandwidth -> Maybe Text
status :: Prelude.Maybe Prelude.Text
  }
  deriving (ProvisionedBandwidth -> ProvisionedBandwidth -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisionedBandwidth -> ProvisionedBandwidth -> Bool
$c/= :: ProvisionedBandwidth -> ProvisionedBandwidth -> Bool
== :: ProvisionedBandwidth -> ProvisionedBandwidth -> Bool
$c== :: ProvisionedBandwidth -> ProvisionedBandwidth -> Bool
Prelude.Eq, ReadPrec [ProvisionedBandwidth]
ReadPrec ProvisionedBandwidth
Int -> ReadS ProvisionedBandwidth
ReadS [ProvisionedBandwidth]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisionedBandwidth]
$creadListPrec :: ReadPrec [ProvisionedBandwidth]
readPrec :: ReadPrec ProvisionedBandwidth
$creadPrec :: ReadPrec ProvisionedBandwidth
readList :: ReadS [ProvisionedBandwidth]
$creadList :: ReadS [ProvisionedBandwidth]
readsPrec :: Int -> ReadS ProvisionedBandwidth
$creadsPrec :: Int -> ReadS ProvisionedBandwidth
Prelude.Read, Int -> ProvisionedBandwidth -> ShowS
[ProvisionedBandwidth] -> ShowS
ProvisionedBandwidth -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisionedBandwidth] -> ShowS
$cshowList :: [ProvisionedBandwidth] -> ShowS
show :: ProvisionedBandwidth -> String
$cshow :: ProvisionedBandwidth -> String
showsPrec :: Int -> ProvisionedBandwidth -> ShowS
$cshowsPrec :: Int -> ProvisionedBandwidth -> ShowS
Prelude.Show, forall x. Rep ProvisionedBandwidth x -> ProvisionedBandwidth
forall x. ProvisionedBandwidth -> Rep ProvisionedBandwidth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProvisionedBandwidth x -> ProvisionedBandwidth
$cfrom :: forall x. ProvisionedBandwidth -> Rep ProvisionedBandwidth x
Prelude.Generic)

-- |
-- Create a value of 'ProvisionedBandwidth' 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:
--
-- 'provisionTime', 'provisionedBandwidth_provisionTime' - Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
--
-- 'provisioned', 'provisionedBandwidth_provisioned' - Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
--
-- 'requestTime', 'provisionedBandwidth_requestTime' - Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
--
-- 'requested', 'provisionedBandwidth_requested' - Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
--
-- 'status', 'provisionedBandwidth_status' - Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
newProvisionedBandwidth ::
  ProvisionedBandwidth
newProvisionedBandwidth :: ProvisionedBandwidth
newProvisionedBandwidth =
  ProvisionedBandwidth'
    { $sel:provisionTime:ProvisionedBandwidth' :: Maybe ISO8601
provisionTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:provisioned:ProvisionedBandwidth' :: Maybe Text
provisioned = forall a. Maybe a
Prelude.Nothing,
      $sel:requestTime:ProvisionedBandwidth' :: Maybe ISO8601
requestTime = forall a. Maybe a
Prelude.Nothing,
      $sel:requested:ProvisionedBandwidth' :: Maybe Text
requested = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ProvisionedBandwidth' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
    }

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
provisionedBandwidth_provisionTime :: Lens.Lens' ProvisionedBandwidth (Prelude.Maybe Prelude.UTCTime)
provisionedBandwidth_provisionTime :: Lens' ProvisionedBandwidth (Maybe UTCTime)
provisionedBandwidth_provisionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedBandwidth' {Maybe ISO8601
provisionTime :: Maybe ISO8601
$sel:provisionTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
provisionTime} -> Maybe ISO8601
provisionTime) (\s :: ProvisionedBandwidth
s@ProvisionedBandwidth' {} Maybe ISO8601
a -> ProvisionedBandwidth
s {$sel:provisionTime:ProvisionedBandwidth' :: Maybe ISO8601
provisionTime = Maybe ISO8601
a} :: ProvisionedBandwidth) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
provisionedBandwidth_provisioned :: Lens.Lens' ProvisionedBandwidth (Prelude.Maybe Prelude.Text)
provisionedBandwidth_provisioned :: Lens' ProvisionedBandwidth (Maybe Text)
provisionedBandwidth_provisioned = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedBandwidth' {Maybe Text
provisioned :: Maybe Text
$sel:provisioned:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
provisioned} -> Maybe Text
provisioned) (\s :: ProvisionedBandwidth
s@ProvisionedBandwidth' {} Maybe Text
a -> ProvisionedBandwidth
s {$sel:provisioned:ProvisionedBandwidth' :: Maybe Text
provisioned = Maybe Text
a} :: ProvisionedBandwidth)

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
provisionedBandwidth_requestTime :: Lens.Lens' ProvisionedBandwidth (Prelude.Maybe Prelude.UTCTime)
provisionedBandwidth_requestTime :: Lens' ProvisionedBandwidth (Maybe UTCTime)
provisionedBandwidth_requestTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedBandwidth' {Maybe ISO8601
requestTime :: Maybe ISO8601
$sel:requestTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
requestTime} -> Maybe ISO8601
requestTime) (\s :: ProvisionedBandwidth
s@ProvisionedBandwidth' {} Maybe ISO8601
a -> ProvisionedBandwidth
s {$sel:requestTime:ProvisionedBandwidth' :: Maybe ISO8601
requestTime = Maybe ISO8601
a} :: ProvisionedBandwidth) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
provisionedBandwidth_requested :: Lens.Lens' ProvisionedBandwidth (Prelude.Maybe Prelude.Text)
provisionedBandwidth_requested :: Lens' ProvisionedBandwidth (Maybe Text)
provisionedBandwidth_requested = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedBandwidth' {Maybe Text
requested :: Maybe Text
$sel:requested:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
requested} -> Maybe Text
requested) (\s :: ProvisionedBandwidth
s@ProvisionedBandwidth' {} Maybe Text
a -> ProvisionedBandwidth
s {$sel:requested:ProvisionedBandwidth' :: Maybe Text
requested = Maybe Text
a} :: ProvisionedBandwidth)

-- | Reserved. If you need to sustain traffic greater than the
-- <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html documented limits>,
-- contact us through the
-- <https://console.aws.amazon.com/support/home? Support Center>.
provisionedBandwidth_status :: Lens.Lens' ProvisionedBandwidth (Prelude.Maybe Prelude.Text)
provisionedBandwidth_status :: Lens' ProvisionedBandwidth (Maybe Text)
provisionedBandwidth_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedBandwidth' {Maybe Text
status :: Maybe Text
$sel:status:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
status} -> Maybe Text
status) (\s :: ProvisionedBandwidth
s@ProvisionedBandwidth' {} Maybe Text
a -> ProvisionedBandwidth
s {$sel:status:ProvisionedBandwidth' :: Maybe Text
status = Maybe Text
a} :: ProvisionedBandwidth)

instance Data.FromXML ProvisionedBandwidth where
  parseXML :: [Node] -> Either String ProvisionedBandwidth
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> ProvisionedBandwidth
ProvisionedBandwidth'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"provisionTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"provisioned")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"requestTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"requested")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"status")

instance Prelude.Hashable ProvisionedBandwidth where
  hashWithSalt :: Int -> ProvisionedBandwidth -> Int
hashWithSalt Int
_salt ProvisionedBandwidth' {Maybe Text
Maybe ISO8601
status :: Maybe Text
requested :: Maybe Text
requestTime :: Maybe ISO8601
provisioned :: Maybe Text
provisionTime :: Maybe ISO8601
$sel:status:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:requested:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:requestTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
$sel:provisioned:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:provisionTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
provisionTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
provisioned
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
requestTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requested
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status

instance Prelude.NFData ProvisionedBandwidth where
  rnf :: ProvisionedBandwidth -> ()
rnf ProvisionedBandwidth' {Maybe Text
Maybe ISO8601
status :: Maybe Text
requested :: Maybe Text
requestTime :: Maybe ISO8601
provisioned :: Maybe Text
provisionTime :: Maybe ISO8601
$sel:status:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:requested:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:requestTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
$sel:provisioned:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe Text
$sel:provisionTime:ProvisionedBandwidth' :: ProvisionedBandwidth -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
provisionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
provisioned
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
requestTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requested
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status