{-# 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.DAX.Types.Subnet -- 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.DAX.Types.Subnet 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 -- | Represents the subnet associated with a DAX cluster. This parameter -- refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) -- and used with DAX. -- -- /See:/ 'newSubnet' smart constructor. data Subnet = Subnet' { -- | The Availability Zone (AZ) for the subnet. subnetAvailabilityZone :: Prelude.Maybe Prelude.Text, -- | The system-assigned identifier for the subnet. subnetIdentifier :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'Subnet' 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: -- -- 'subnetAvailabilityZone', 'subnet_subnetAvailabilityZone' - The Availability Zone (AZ) for the subnet. -- -- 'subnetIdentifier', 'subnet_subnetIdentifier' - The system-assigned identifier for the subnet. newSubnet :: Subnet newSubnet = Subnet' { subnetAvailabilityZone = Prelude.Nothing, subnetIdentifier = Prelude.Nothing } -- | The Availability Zone (AZ) for the subnet. subnet_subnetAvailabilityZone :: Lens.Lens' Subnet (Prelude.Maybe Prelude.Text) subnet_subnetAvailabilityZone = Lens.lens (\Subnet' {subnetAvailabilityZone} -> subnetAvailabilityZone) (\s@Subnet' {} a -> s {subnetAvailabilityZone = a} :: Subnet) -- | The system-assigned identifier for the subnet. subnet_subnetIdentifier :: Lens.Lens' Subnet (Prelude.Maybe Prelude.Text) subnet_subnetIdentifier = Lens.lens (\Subnet' {subnetIdentifier} -> subnetIdentifier) (\s@Subnet' {} a -> s {subnetIdentifier = a} :: Subnet) instance Data.FromJSON Subnet where parseJSON = Data.withObject "Subnet" ( \x -> Subnet' Prelude.<$> (x Data..:? "SubnetAvailabilityZone") Prelude.<*> (x Data..:? "SubnetIdentifier") ) instance Prelude.Hashable Subnet where hashWithSalt _salt Subnet' {..} = _salt `Prelude.hashWithSalt` subnetAvailabilityZone `Prelude.hashWithSalt` subnetIdentifier instance Prelude.NFData Subnet where rnf Subnet' {..} = Prelude.rnf subnetAvailabilityZone `Prelude.seq` Prelude.rnf subnetIdentifier