{-# 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.SES.Types.MessageTag -- 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.SES.Types.MessageTag 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 -- | Contains the name and value of a tag that you can provide to @SendEmail@ -- or @SendRawEmail@ to apply to an email. -- -- Message tags, which you use with configuration sets, enable you to -- publish email sending events. For information about using configuration -- sets, see the -- . -- -- /See:/ 'newMessageTag' smart constructor. data MessageTag = MessageTag' { -- | The name of the tag. The name must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. name :: Prelude.Text, -- | The value of the tag. The value must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. value :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'MessageTag' 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', 'messageTag_name' - The name of the tag. The name must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. -- -- 'value', 'messageTag_value' - The value of the tag. The value must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. newMessageTag :: -- | 'name' Prelude.Text -> -- | 'value' Prelude.Text -> MessageTag newMessageTag pName_ pValue_ = MessageTag' {name = pName_, value = pValue_} -- | The name of the tag. The name must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. messageTag_name :: Lens.Lens' MessageTag Prelude.Text messageTag_name = Lens.lens (\MessageTag' {name} -> name) (\s@MessageTag' {} a -> s {name = a} :: MessageTag) -- | The value of the tag. The value must: -- -- - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), -- underscores (_), or dashes (-). -- -- - Contain less than 256 characters. messageTag_value :: Lens.Lens' MessageTag Prelude.Text messageTag_value = Lens.lens (\MessageTag' {value} -> value) (\s@MessageTag' {} a -> s {value = a} :: MessageTag) instance Prelude.Hashable MessageTag where hashWithSalt _salt MessageTag' {..} = _salt `Prelude.hashWithSalt` name `Prelude.hashWithSalt` value instance Prelude.NFData MessageTag where rnf MessageTag' {..} = Prelude.rnf name `Prelude.seq` Prelude.rnf value instance Data.ToQuery MessageTag where toQuery MessageTag' {..} = Prelude.mconcat ["Name" Data.=: name, "Value" Data.=: value]