{-# 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.SecurityHub.Types.VulnerabilityVendor -- 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.SecurityHub.Types.VulnerabilityVendor 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 vendor that generates a vulnerability report. -- -- /See:/ 'newVulnerabilityVendor' smart constructor. data VulnerabilityVendor = VulnerabilityVendor' { -- | The URL of the vulnerability advisory. url :: Prelude.Maybe Prelude.Text, -- | Indicates when the vulnerability advisory was created. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. vendorCreatedAt :: Prelude.Maybe Prelude.Text, -- | The severity that the vendor assigned to the vulnerability. vendorSeverity :: Prelude.Maybe Prelude.Text, -- | Indicates when the vulnerability advisory was last updated. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. vendorUpdatedAt :: Prelude.Maybe Prelude.Text, -- | The name of the vendor. name :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'VulnerabilityVendor' 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: -- -- 'url', 'vulnerabilityVendor_url' - The URL of the vulnerability advisory. -- -- 'vendorCreatedAt', 'vulnerabilityVendor_vendorCreatedAt' - Indicates when the vulnerability advisory was created. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. -- -- 'vendorSeverity', 'vulnerabilityVendor_vendorSeverity' - The severity that the vendor assigned to the vulnerability. -- -- 'vendorUpdatedAt', 'vulnerabilityVendor_vendorUpdatedAt' - Indicates when the vulnerability advisory was last updated. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. -- -- 'name', 'vulnerabilityVendor_name' - The name of the vendor. newVulnerabilityVendor :: -- | 'name' Prelude.Text -> VulnerabilityVendor newVulnerabilityVendor pName_ = VulnerabilityVendor' { url = Prelude.Nothing, vendorCreatedAt = Prelude.Nothing, vendorSeverity = Prelude.Nothing, vendorUpdatedAt = Prelude.Nothing, name = pName_ } -- | The URL of the vulnerability advisory. vulnerabilityVendor_url :: Lens.Lens' VulnerabilityVendor (Prelude.Maybe Prelude.Text) vulnerabilityVendor_url = Lens.lens (\VulnerabilityVendor' {url} -> url) (\s@VulnerabilityVendor' {} a -> s {url = a} :: VulnerabilityVendor) -- | Indicates when the vulnerability advisory was created. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. vulnerabilityVendor_vendorCreatedAt :: Lens.Lens' VulnerabilityVendor (Prelude.Maybe Prelude.Text) vulnerabilityVendor_vendorCreatedAt = Lens.lens (\VulnerabilityVendor' {vendorCreatedAt} -> vendorCreatedAt) (\s@VulnerabilityVendor' {} a -> s {vendorCreatedAt = a} :: VulnerabilityVendor) -- | The severity that the vendor assigned to the vulnerability. vulnerabilityVendor_vendorSeverity :: Lens.Lens' VulnerabilityVendor (Prelude.Maybe Prelude.Text) vulnerabilityVendor_vendorSeverity = Lens.lens (\VulnerabilityVendor' {vendorSeverity} -> vendorSeverity) (\s@VulnerabilityVendor' {} a -> s {vendorSeverity = a} :: VulnerabilityVendor) -- | Indicates when the vulnerability advisory was last updated. -- -- Uses the @date-time@ format specified in -- . -- The value cannot contain spaces. For example, -- @2020-03-22T13:22:13.933Z@. vulnerabilityVendor_vendorUpdatedAt :: Lens.Lens' VulnerabilityVendor (Prelude.Maybe Prelude.Text) vulnerabilityVendor_vendorUpdatedAt = Lens.lens (\VulnerabilityVendor' {vendorUpdatedAt} -> vendorUpdatedAt) (\s@VulnerabilityVendor' {} a -> s {vendorUpdatedAt = a} :: VulnerabilityVendor) -- | The name of the vendor. vulnerabilityVendor_name :: Lens.Lens' VulnerabilityVendor Prelude.Text vulnerabilityVendor_name = Lens.lens (\VulnerabilityVendor' {name} -> name) (\s@VulnerabilityVendor' {} a -> s {name = a} :: VulnerabilityVendor) instance Data.FromJSON VulnerabilityVendor where parseJSON = Data.withObject "VulnerabilityVendor" ( \x -> VulnerabilityVendor' Prelude.<$> (x Data..:? "Url") Prelude.<*> (x Data..:? "VendorCreatedAt") Prelude.<*> (x Data..:? "VendorSeverity") Prelude.<*> (x Data..:? "VendorUpdatedAt") Prelude.<*> (x Data..: "Name") ) instance Prelude.Hashable VulnerabilityVendor where hashWithSalt _salt VulnerabilityVendor' {..} = _salt `Prelude.hashWithSalt` url `Prelude.hashWithSalt` vendorCreatedAt `Prelude.hashWithSalt` vendorSeverity `Prelude.hashWithSalt` vendorUpdatedAt `Prelude.hashWithSalt` name instance Prelude.NFData VulnerabilityVendor where rnf VulnerabilityVendor' {..} = Prelude.rnf url `Prelude.seq` Prelude.rnf vendorCreatedAt `Prelude.seq` Prelude.rnf vendorSeverity `Prelude.seq` Prelude.rnf vendorUpdatedAt `Prelude.seq` Prelude.rnf name instance Data.ToJSON VulnerabilityVendor where toJSON VulnerabilityVendor' {..} = Data.object ( Prelude.catMaybes [ ("Url" Data..=) Prelude.<$> url, ("VendorCreatedAt" Data..=) Prelude.<$> vendorCreatedAt, ("VendorSeverity" Data..=) Prelude.<$> vendorSeverity, ("VendorUpdatedAt" Data..=) Prelude.<$> vendorUpdatedAt, Prelude.Just ("Name" Data..= name) ] )