{-# 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.ElasticInference.Types.Filter -- 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.ElasticInference.Types.Filter 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 -- | A filter expression for the Elastic Inference Accelerator list. -- -- /See:/ 'newFilter' smart constructor. data Filter = Filter' { -- | The filter name for the Elastic Inference Accelerator list. It can -- assume the following values: accelerator-type: the type of Elastic -- Inference Accelerator to filter for. instance-id: an EC2 instance id to -- filter for. name :: Prelude.Maybe Prelude.Text, -- | The values for the filter of the Elastic Inference Accelerator list. values :: Prelude.Maybe [Prelude.Text] } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'Filter' 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: -- -- 'name', 'filter_name' - The filter name for the Elastic Inference Accelerator list. It can -- assume the following values: accelerator-type: the type of Elastic -- Inference Accelerator to filter for. instance-id: an EC2 instance id to -- filter for. -- -- 'values', 'filter_values' - The values for the filter of the Elastic Inference Accelerator list. newFilter :: Filter newFilter = Filter' { name = Prelude.Nothing, values = Prelude.Nothing } -- | The filter name for the Elastic Inference Accelerator list. It can -- assume the following values: accelerator-type: the type of Elastic -- Inference Accelerator to filter for. instance-id: an EC2 instance id to -- filter for. filter_name :: Lens.Lens' Filter (Prelude.Maybe Prelude.Text) filter_name = Lens.lens (\Filter' {name} -> name) (\s@Filter' {} a -> s {name = a} :: Filter) -- | The values for the filter of the Elastic Inference Accelerator list. filter_values :: Lens.Lens' Filter (Prelude.Maybe [Prelude.Text]) filter_values = Lens.lens (\Filter' {values} -> values) (\s@Filter' {} a -> s {values = a} :: Filter) Prelude.. Lens.mapping Lens.coerced instance Prelude.Hashable Filter where hashWithSalt _salt Filter' {..} = _salt `Prelude.hashWithSalt` name `Prelude.hashWithSalt` values instance Prelude.NFData Filter where rnf Filter' {..} = Prelude.rnf name `Prelude.seq` Prelude.rnf values instance Data.ToJSON Filter where toJSON Filter' {..} = Data.object ( Prelude.catMaybes [ ("name" Data..=) Prelude.<$> name, ("values" Data..=) Prelude.<$> values ] )