{-# 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.ServerlessApplicationRepository.Types.Tag -- 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.ServerlessApplicationRepository.Types.Tag 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 -- | This property corresponds to the /AWS CloudFormation -- / -- Data Type. -- -- /See:/ 'newTag' smart constructor. data Tag = Tag' { -- | This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. value :: Prelude.Text, -- | This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. key :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'Tag' 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: -- -- 'value', 'tag_value' - This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. -- -- 'key', 'tag_key' - This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. newTag :: -- | 'value' Prelude.Text -> -- | 'key' Prelude.Text -> Tag newTag pValue_ pKey_ = Tag' {value = pValue_, key = pKey_} -- | This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. tag_value :: Lens.Lens' Tag Prelude.Text tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag) -- | This property corresponds to the content of the same name for the /AWS -- CloudFormation -- / -- Data Type. tag_key :: Lens.Lens' Tag Prelude.Text tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag) instance Prelude.Hashable Tag where hashWithSalt _salt Tag' {..} = _salt `Prelude.hashWithSalt` value `Prelude.hashWithSalt` key instance Prelude.NFData Tag where rnf Tag' {..} = Prelude.rnf value `Prelude.seq` Prelude.rnf key instance Data.ToJSON Tag where toJSON Tag' {..} = Data.object ( Prelude.catMaybes [ Prelude.Just ("value" Data..= value), Prelude.Just ("key" Data..= key) ] )