{-# 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.AwsCodeBuildProjectArtifactsDetails
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SecurityHub.Types.AwsCodeBuildProjectArtifactsDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the build artifacts for the CodeBuild project.
--
-- /See:/ 'newAwsCodeBuildProjectArtifactsDetails' smart constructor.
data AwsCodeBuildProjectArtifactsDetails = AwsCodeBuildProjectArtifactsDetails'
  { -- | Only used when @Type@ is @S3@. The type of output artifact to create.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
packaging :: Prelude.Maybe Prelude.Text,
    -- | Only used when @Type@ is @S3@. The name of the S3 bucket where the
    -- artifact is located.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | Only used when @Type@ is @S3@. The path to the artifact. Used with
    -- @Name@ and @NamespaceType@ to determine the pattern for storing the
    -- artifact.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether to disable encryption on the artifact. Only valid when
    -- @Type@ is @S3@.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
encryptionDisabled :: Prelude.Maybe Prelude.Bool,
    -- | Only used when Type is S3. The name of the artifact. Used with
    -- @NamepaceType@ and @Path@ to determine the pattern for storing the
    -- artifact.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Whether the name specified in the buildspec file overrides the artifact
    -- name.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
overrideArtifactName :: Prelude.Maybe Prelude.Bool,
    -- | An identifier for the artifact definition.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
artifactIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The type of build artifact.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | Only used when @Type@ is @S3@. The value to use for the namespace. Used
    -- with @Name@ and @Path@ to determine the pattern for storing the
    -- artifact.
    AwsCodeBuildProjectArtifactsDetails -> Maybe Text
namespaceType :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsCodeBuildProjectArtifactsDetails
-> AwsCodeBuildProjectArtifactsDetails -> Bool
(AwsCodeBuildProjectArtifactsDetails
 -> AwsCodeBuildProjectArtifactsDetails -> Bool)
-> (AwsCodeBuildProjectArtifactsDetails
    -> AwsCodeBuildProjectArtifactsDetails -> Bool)
-> Eq AwsCodeBuildProjectArtifactsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCodeBuildProjectArtifactsDetails
-> AwsCodeBuildProjectArtifactsDetails -> Bool
$c/= :: AwsCodeBuildProjectArtifactsDetails
-> AwsCodeBuildProjectArtifactsDetails -> Bool
== :: AwsCodeBuildProjectArtifactsDetails
-> AwsCodeBuildProjectArtifactsDetails -> Bool
$c== :: AwsCodeBuildProjectArtifactsDetails
-> AwsCodeBuildProjectArtifactsDetails -> Bool
Prelude.Eq, ReadPrec [AwsCodeBuildProjectArtifactsDetails]
ReadPrec AwsCodeBuildProjectArtifactsDetails
Int -> ReadS AwsCodeBuildProjectArtifactsDetails
ReadS [AwsCodeBuildProjectArtifactsDetails]
(Int -> ReadS AwsCodeBuildProjectArtifactsDetails)
-> ReadS [AwsCodeBuildProjectArtifactsDetails]
-> ReadPrec AwsCodeBuildProjectArtifactsDetails
-> ReadPrec [AwsCodeBuildProjectArtifactsDetails]
-> Read AwsCodeBuildProjectArtifactsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCodeBuildProjectArtifactsDetails]
$creadListPrec :: ReadPrec [AwsCodeBuildProjectArtifactsDetails]
readPrec :: ReadPrec AwsCodeBuildProjectArtifactsDetails
$creadPrec :: ReadPrec AwsCodeBuildProjectArtifactsDetails
readList :: ReadS [AwsCodeBuildProjectArtifactsDetails]
$creadList :: ReadS [AwsCodeBuildProjectArtifactsDetails]
readsPrec :: Int -> ReadS AwsCodeBuildProjectArtifactsDetails
$creadsPrec :: Int -> ReadS AwsCodeBuildProjectArtifactsDetails
Prelude.Read, Int -> AwsCodeBuildProjectArtifactsDetails -> ShowS
[AwsCodeBuildProjectArtifactsDetails] -> ShowS
AwsCodeBuildProjectArtifactsDetails -> String
(Int -> AwsCodeBuildProjectArtifactsDetails -> ShowS)
-> (AwsCodeBuildProjectArtifactsDetails -> String)
-> ([AwsCodeBuildProjectArtifactsDetails] -> ShowS)
-> Show AwsCodeBuildProjectArtifactsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCodeBuildProjectArtifactsDetails] -> ShowS
$cshowList :: [AwsCodeBuildProjectArtifactsDetails] -> ShowS
show :: AwsCodeBuildProjectArtifactsDetails -> String
$cshow :: AwsCodeBuildProjectArtifactsDetails -> String
showsPrec :: Int -> AwsCodeBuildProjectArtifactsDetails -> ShowS
$cshowsPrec :: Int -> AwsCodeBuildProjectArtifactsDetails -> ShowS
Prelude.Show, (forall x.
 AwsCodeBuildProjectArtifactsDetails
 -> Rep AwsCodeBuildProjectArtifactsDetails x)
-> (forall x.
    Rep AwsCodeBuildProjectArtifactsDetails x
    -> AwsCodeBuildProjectArtifactsDetails)
-> Generic AwsCodeBuildProjectArtifactsDetails
forall x.
Rep AwsCodeBuildProjectArtifactsDetails x
-> AwsCodeBuildProjectArtifactsDetails
forall x.
AwsCodeBuildProjectArtifactsDetails
-> Rep AwsCodeBuildProjectArtifactsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCodeBuildProjectArtifactsDetails x
-> AwsCodeBuildProjectArtifactsDetails
$cfrom :: forall x.
AwsCodeBuildProjectArtifactsDetails
-> Rep AwsCodeBuildProjectArtifactsDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsCodeBuildProjectArtifactsDetails' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'packaging', 'awsCodeBuildProjectArtifactsDetails_packaging' - Only used when @Type@ is @S3@. The type of output artifact to create.
--
-- 'location', 'awsCodeBuildProjectArtifactsDetails_location' - Only used when @Type@ is @S3@. The name of the S3 bucket where the
-- artifact is located.
--
-- 'path', 'awsCodeBuildProjectArtifactsDetails_path' - Only used when @Type@ is @S3@. The path to the artifact. Used with
-- @Name@ and @NamespaceType@ to determine the pattern for storing the
-- artifact.
--
-- 'encryptionDisabled', 'awsCodeBuildProjectArtifactsDetails_encryptionDisabled' - Indicates whether to disable encryption on the artifact. Only valid when
-- @Type@ is @S3@.
--
-- 'name', 'awsCodeBuildProjectArtifactsDetails_name' - Only used when Type is S3. The name of the artifact. Used with
-- @NamepaceType@ and @Path@ to determine the pattern for storing the
-- artifact.
--
-- 'overrideArtifactName', 'awsCodeBuildProjectArtifactsDetails_overrideArtifactName' - Whether the name specified in the buildspec file overrides the artifact
-- name.
--
-- 'artifactIdentifier', 'awsCodeBuildProjectArtifactsDetails_artifactIdentifier' - An identifier for the artifact definition.
--
-- 'type'', 'awsCodeBuildProjectArtifactsDetails_type' - The type of build artifact.
--
-- 'namespaceType', 'awsCodeBuildProjectArtifactsDetails_namespaceType' - Only used when @Type@ is @S3@. The value to use for the namespace. Used
-- with @Name@ and @Path@ to determine the pattern for storing the
-- artifact.
newAwsCodeBuildProjectArtifactsDetails ::
  AwsCodeBuildProjectArtifactsDetails
newAwsCodeBuildProjectArtifactsDetails :: AwsCodeBuildProjectArtifactsDetails
newAwsCodeBuildProjectArtifactsDetails =
  AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsCodeBuildProjectArtifactsDetails
AwsCodeBuildProjectArtifactsDetails'
    { $sel:packaging:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
packaging =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:location:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:path:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionDisabled:AwsCodeBuildProjectArtifactsDetails' :: Maybe Bool
encryptionDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:overrideArtifactName:AwsCodeBuildProjectArtifactsDetails' :: Maybe Bool
overrideArtifactName = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactIdentifier:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
artifactIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:namespaceType:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
namespaceType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Only used when @Type@ is @S3@. The type of output artifact to create.
awsCodeBuildProjectArtifactsDetails_packaging :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_packaging :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_packaging = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
packaging :: Maybe Text
$sel:packaging:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
packaging} -> Maybe Text
packaging) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:packaging:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
packaging = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Only used when @Type@ is @S3@. The name of the S3 bucket where the
-- artifact is located.
awsCodeBuildProjectArtifactsDetails_location :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_location :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_location = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
location :: Maybe Text
$sel:location:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
location} -> Maybe Text
location) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:location:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
location = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Only used when @Type@ is @S3@. The path to the artifact. Used with
-- @Name@ and @NamespaceType@ to determine the pattern for storing the
-- artifact.
awsCodeBuildProjectArtifactsDetails_path :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_path :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_path = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
path :: Maybe Text
$sel:path:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
path} -> Maybe Text
path) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:path:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
path = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Indicates whether to disable encryption on the artifact. Only valid when
-- @Type@ is @S3@.
awsCodeBuildProjectArtifactsDetails_encryptionDisabled :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Bool)
awsCodeBuildProjectArtifactsDetails_encryptionDisabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_encryptionDisabled = (AwsCodeBuildProjectArtifactsDetails -> Maybe Bool)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Bool -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Bool
encryptionDisabled :: Maybe Bool
$sel:encryptionDisabled:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
encryptionDisabled} -> Maybe Bool
encryptionDisabled) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Bool
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:encryptionDisabled:AwsCodeBuildProjectArtifactsDetails' :: Maybe Bool
encryptionDisabled = Maybe Bool
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Only used when Type is S3. The name of the artifact. Used with
-- @NamepaceType@ and @Path@ to determine the pattern for storing the
-- artifact.
awsCodeBuildProjectArtifactsDetails_name :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_name :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_name = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
name :: Maybe Text
$sel:name:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:name:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
name = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Whether the name specified in the buildspec file overrides the artifact
-- name.
awsCodeBuildProjectArtifactsDetails_overrideArtifactName :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Bool)
awsCodeBuildProjectArtifactsDetails_overrideArtifactName :: (Maybe Bool -> f (Maybe Bool))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_overrideArtifactName = (AwsCodeBuildProjectArtifactsDetails -> Maybe Bool)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Bool -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Bool
overrideArtifactName :: Maybe Bool
$sel:overrideArtifactName:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
overrideArtifactName} -> Maybe Bool
overrideArtifactName) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Bool
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:overrideArtifactName:AwsCodeBuildProjectArtifactsDetails' :: Maybe Bool
overrideArtifactName = Maybe Bool
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | An identifier for the artifact definition.
awsCodeBuildProjectArtifactsDetails_artifactIdentifier :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_artifactIdentifier :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_artifactIdentifier = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
artifactIdentifier :: Maybe Text
$sel:artifactIdentifier:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
artifactIdentifier} -> Maybe Text
artifactIdentifier) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:artifactIdentifier:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
artifactIdentifier = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | The type of build artifact.
awsCodeBuildProjectArtifactsDetails_type :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_type :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_type = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
type' :: Maybe Text
$sel:type':AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
type'} -> Maybe Text
type') (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:type':AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
type' = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

-- | Only used when @Type@ is @S3@. The value to use for the namespace. Used
-- with @Name@ and @Path@ to determine the pattern for storing the
-- artifact.
awsCodeBuildProjectArtifactsDetails_namespaceType :: Lens.Lens' AwsCodeBuildProjectArtifactsDetails (Prelude.Maybe Prelude.Text)
awsCodeBuildProjectArtifactsDetails_namespaceType :: (Maybe Text -> f (Maybe Text))
-> AwsCodeBuildProjectArtifactsDetails
-> f AwsCodeBuildProjectArtifactsDetails
awsCodeBuildProjectArtifactsDetails_namespaceType = (AwsCodeBuildProjectArtifactsDetails -> Maybe Text)
-> (AwsCodeBuildProjectArtifactsDetails
    -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Lens
     AwsCodeBuildProjectArtifactsDetails
     AwsCodeBuildProjectArtifactsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCodeBuildProjectArtifactsDetails' {Maybe Text
namespaceType :: Maybe Text
$sel:namespaceType:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
namespaceType} -> Maybe Text
namespaceType) (\s :: AwsCodeBuildProjectArtifactsDetails
s@AwsCodeBuildProjectArtifactsDetails' {} Maybe Text
a -> AwsCodeBuildProjectArtifactsDetails
s {$sel:namespaceType:AwsCodeBuildProjectArtifactsDetails' :: Maybe Text
namespaceType = Maybe Text
a} :: AwsCodeBuildProjectArtifactsDetails)

instance
  Core.FromJSON
    AwsCodeBuildProjectArtifactsDetails
  where
  parseJSON :: Value -> Parser AwsCodeBuildProjectArtifactsDetails
parseJSON =
    String
-> (Object -> Parser AwsCodeBuildProjectArtifactsDetails)
-> Value
-> Parser AwsCodeBuildProjectArtifactsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsCodeBuildProjectArtifactsDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsCodeBuildProjectArtifactsDetails
AwsCodeBuildProjectArtifactsDetails'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Packaging")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Location")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Path")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EncryptionDisabled")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OverrideArtifactName")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ArtifactIdentifier")
            Parser
  (Maybe Text -> Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser (Maybe Text -> AwsCodeBuildProjectArtifactsDetails)
-> Parser (Maybe Text)
-> Parser AwsCodeBuildProjectArtifactsDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NamespaceType")
      )

instance
  Prelude.Hashable
    AwsCodeBuildProjectArtifactsDetails

instance
  Prelude.NFData
    AwsCodeBuildProjectArtifactsDetails

instance
  Core.ToJSON
    AwsCodeBuildProjectArtifactsDetails
  where
  toJSON :: AwsCodeBuildProjectArtifactsDetails -> Value
toJSON AwsCodeBuildProjectArtifactsDetails' {Maybe Bool
Maybe Text
namespaceType :: Maybe Text
type' :: Maybe Text
artifactIdentifier :: Maybe Text
overrideArtifactName :: Maybe Bool
name :: Maybe Text
encryptionDisabled :: Maybe Bool
path :: Maybe Text
location :: Maybe Text
packaging :: Maybe Text
$sel:namespaceType:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:type':AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:artifactIdentifier:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:overrideArtifactName:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
$sel:name:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:encryptionDisabled:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Bool
$sel:path:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:location:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
$sel:packaging:AwsCodeBuildProjectArtifactsDetails' :: AwsCodeBuildProjectArtifactsDetails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Packaging" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
packaging,
            (Text
"Location" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
location,
            (Text
"Path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
path,
            (Text
"EncryptionDisabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
encryptionDisabled,
            (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"OverrideArtifactName" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
overrideArtifactName,
            (Text
"ArtifactIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
artifactIdentifier,
            (Text
"Type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
type',
            (Text
"NamespaceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
namespaceType
          ]
      )