{-# 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.Lightsail.Types.RelationalDatabaseBundle -- 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.Lightsail.Types.RelationalDatabaseBundle 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 -- | Describes a database bundle. A bundle describes the performance -- specifications of the database. -- -- /See:/ 'newRelationalDatabaseBundle' smart constructor. data RelationalDatabaseBundle = RelationalDatabaseBundle' { -- | The ID for the database bundle. bundleId :: Prelude.Maybe Prelude.Text, -- | The number of virtual CPUs (vCPUs) for the database bundle. cpuCount :: Prelude.Maybe Prelude.Int, -- | The size of the disk for the database bundle. diskSizeInGb :: Prelude.Maybe Prelude.Int, -- | A Boolean value indicating whether the database bundle is active. isActive :: Prelude.Maybe Prelude.Bool, -- | A Boolean value indicating whether the database bundle is encrypted. isEncrypted :: Prelude.Maybe Prelude.Bool, -- | The name for the database bundle. name :: Prelude.Maybe Prelude.Text, -- | The cost of the database bundle in US currency. price :: Prelude.Maybe Prelude.Double, -- | The amount of RAM in GB (for example, @2.0@) for the database bundle. ramSizeInGb :: Prelude.Maybe Prelude.Double, -- | The data transfer rate per month in GB for the database bundle. transferPerMonthInGb :: Prelude.Maybe Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'RelationalDatabaseBundle' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'bundleId', 'relationalDatabaseBundle_bundleId' - The ID for the database bundle. -- -- 'cpuCount', 'relationalDatabaseBundle_cpuCount' - The number of virtual CPUs (vCPUs) for the database bundle. -- -- 'diskSizeInGb', 'relationalDatabaseBundle_diskSizeInGb' - The size of the disk for the database bundle. -- -- 'isActive', 'relationalDatabaseBundle_isActive' - A Boolean value indicating whether the database bundle is active. -- -- 'isEncrypted', 'relationalDatabaseBundle_isEncrypted' - A Boolean value indicating whether the database bundle is encrypted. -- -- 'name', 'relationalDatabaseBundle_name' - The name for the database bundle. -- -- 'price', 'relationalDatabaseBundle_price' - The cost of the database bundle in US currency. -- -- 'ramSizeInGb', 'relationalDatabaseBundle_ramSizeInGb' - The amount of RAM in GB (for example, @2.0@) for the database bundle. -- -- 'transferPerMonthInGb', 'relationalDatabaseBundle_transferPerMonthInGb' - The data transfer rate per month in GB for the database bundle. newRelationalDatabaseBundle :: RelationalDatabaseBundle newRelationalDatabaseBundle = RelationalDatabaseBundle' { bundleId = Prelude.Nothing, cpuCount = Prelude.Nothing, diskSizeInGb = Prelude.Nothing, isActive = Prelude.Nothing, isEncrypted = Prelude.Nothing, name = Prelude.Nothing, price = Prelude.Nothing, ramSizeInGb = Prelude.Nothing, transferPerMonthInGb = Prelude.Nothing } -- | The ID for the database bundle. relationalDatabaseBundle_bundleId :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Text) relationalDatabaseBundle_bundleId = Lens.lens (\RelationalDatabaseBundle' {bundleId} -> bundleId) (\s@RelationalDatabaseBundle' {} a -> s {bundleId = a} :: RelationalDatabaseBundle) -- | The number of virtual CPUs (vCPUs) for the database bundle. relationalDatabaseBundle_cpuCount :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Int) relationalDatabaseBundle_cpuCount = Lens.lens (\RelationalDatabaseBundle' {cpuCount} -> cpuCount) (\s@RelationalDatabaseBundle' {} a -> s {cpuCount = a} :: RelationalDatabaseBundle) -- | The size of the disk for the database bundle. relationalDatabaseBundle_diskSizeInGb :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Int) relationalDatabaseBundle_diskSizeInGb = Lens.lens (\RelationalDatabaseBundle' {diskSizeInGb} -> diskSizeInGb) (\s@RelationalDatabaseBundle' {} a -> s {diskSizeInGb = a} :: RelationalDatabaseBundle) -- | A Boolean value indicating whether the database bundle is active. relationalDatabaseBundle_isActive :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Bool) relationalDatabaseBundle_isActive = Lens.lens (\RelationalDatabaseBundle' {isActive} -> isActive) (\s@RelationalDatabaseBundle' {} a -> s {isActive = a} :: RelationalDatabaseBundle) -- | A Boolean value indicating whether the database bundle is encrypted. relationalDatabaseBundle_isEncrypted :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Bool) relationalDatabaseBundle_isEncrypted = Lens.lens (\RelationalDatabaseBundle' {isEncrypted} -> isEncrypted) (\s@RelationalDatabaseBundle' {} a -> s {isEncrypted = a} :: RelationalDatabaseBundle) -- | The name for the database bundle. relationalDatabaseBundle_name :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Text) relationalDatabaseBundle_name = Lens.lens (\RelationalDatabaseBundle' {name} -> name) (\s@RelationalDatabaseBundle' {} a -> s {name = a} :: RelationalDatabaseBundle) -- | The cost of the database bundle in US currency. relationalDatabaseBundle_price :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Double) relationalDatabaseBundle_price = Lens.lens (\RelationalDatabaseBundle' {price} -> price) (\s@RelationalDatabaseBundle' {} a -> s {price = a} :: RelationalDatabaseBundle) -- | The amount of RAM in GB (for example, @2.0@) for the database bundle. relationalDatabaseBundle_ramSizeInGb :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Double) relationalDatabaseBundle_ramSizeInGb = Lens.lens (\RelationalDatabaseBundle' {ramSizeInGb} -> ramSizeInGb) (\s@RelationalDatabaseBundle' {} a -> s {ramSizeInGb = a} :: RelationalDatabaseBundle) -- | The data transfer rate per month in GB for the database bundle. relationalDatabaseBundle_transferPerMonthInGb :: Lens.Lens' RelationalDatabaseBundle (Prelude.Maybe Prelude.Int) relationalDatabaseBundle_transferPerMonthInGb = Lens.lens (\RelationalDatabaseBundle' {transferPerMonthInGb} -> transferPerMonthInGb) (\s@RelationalDatabaseBundle' {} a -> s {transferPerMonthInGb = a} :: RelationalDatabaseBundle) instance Data.FromJSON RelationalDatabaseBundle where parseJSON = Data.withObject "RelationalDatabaseBundle" ( \x -> RelationalDatabaseBundle' Prelude.<$> (x Data..:? "bundleId") Prelude.<*> (x Data..:? "cpuCount") Prelude.<*> (x Data..:? "diskSizeInGb") Prelude.<*> (x Data..:? "isActive") Prelude.<*> (x Data..:? "isEncrypted") Prelude.<*> (x Data..:? "name") Prelude.<*> (x Data..:? "price") Prelude.<*> (x Data..:? "ramSizeInGb") Prelude.<*> (x Data..:? "transferPerMonthInGb") ) instance Prelude.Hashable RelationalDatabaseBundle where hashWithSalt _salt RelationalDatabaseBundle' {..} = _salt `Prelude.hashWithSalt` bundleId `Prelude.hashWithSalt` cpuCount `Prelude.hashWithSalt` diskSizeInGb `Prelude.hashWithSalt` isActive `Prelude.hashWithSalt` isEncrypted `Prelude.hashWithSalt` name `Prelude.hashWithSalt` price `Prelude.hashWithSalt` ramSizeInGb `Prelude.hashWithSalt` transferPerMonthInGb instance Prelude.NFData RelationalDatabaseBundle where rnf RelationalDatabaseBundle' {..} = Prelude.rnf bundleId `Prelude.seq` Prelude.rnf cpuCount `Prelude.seq` Prelude.rnf diskSizeInGb `Prelude.seq` Prelude.rnf isActive `Prelude.seq` Prelude.rnf isEncrypted `Prelude.seq` Prelude.rnf name `Prelude.seq` Prelude.rnf price `Prelude.seq` Prelude.rnf ramSizeInGb `Prelude.seq` Prelude.rnf transferPerMonthInGb