{-# 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 #-}
module Amazonka.CodeBuild.Types.ProjectArtifacts where
import Amazonka.CodeBuild.Types.ArtifactNamespace
import Amazonka.CodeBuild.Types.ArtifactPackaging
import Amazonka.CodeBuild.Types.ArtifactsType
import Amazonka.CodeBuild.Types.BucketOwnerAccess
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProjectArtifacts = ProjectArtifacts'
{
ProjectArtifacts -> Maybe ArtifactPackaging
packaging :: Prelude.Maybe ArtifactPackaging,
ProjectArtifacts -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
ProjectArtifacts -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ProjectArtifacts -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ProjectArtifacts -> Maybe Bool
encryptionDisabled :: Prelude.Maybe Prelude.Bool,
ProjectArtifacts -> Maybe Bool
overrideArtifactName :: Prelude.Maybe Prelude.Bool,
ProjectArtifacts -> Maybe Text
artifactIdentifier :: Prelude.Maybe Prelude.Text,
ProjectArtifacts -> Maybe BucketOwnerAccess
bucketOwnerAccess :: Prelude.Maybe BucketOwnerAccess,
ProjectArtifacts -> Maybe ArtifactNamespace
namespaceType :: Prelude.Maybe ArtifactNamespace,
ProjectArtifacts -> ArtifactsType
type' :: ArtifactsType
}
deriving (ProjectArtifacts -> ProjectArtifacts -> Bool
(ProjectArtifacts -> ProjectArtifacts -> Bool)
-> (ProjectArtifacts -> ProjectArtifacts -> Bool)
-> Eq ProjectArtifacts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectArtifacts -> ProjectArtifacts -> Bool
$c/= :: ProjectArtifacts -> ProjectArtifacts -> Bool
== :: ProjectArtifacts -> ProjectArtifacts -> Bool
$c== :: ProjectArtifacts -> ProjectArtifacts -> Bool
Prelude.Eq, ReadPrec [ProjectArtifacts]
ReadPrec ProjectArtifacts
Int -> ReadS ProjectArtifacts
ReadS [ProjectArtifacts]
(Int -> ReadS ProjectArtifacts)
-> ReadS [ProjectArtifacts]
-> ReadPrec ProjectArtifacts
-> ReadPrec [ProjectArtifacts]
-> Read ProjectArtifacts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectArtifacts]
$creadListPrec :: ReadPrec [ProjectArtifacts]
readPrec :: ReadPrec ProjectArtifacts
$creadPrec :: ReadPrec ProjectArtifacts
readList :: ReadS [ProjectArtifacts]
$creadList :: ReadS [ProjectArtifacts]
readsPrec :: Int -> ReadS ProjectArtifacts
$creadsPrec :: Int -> ReadS ProjectArtifacts
Prelude.Read, Int -> ProjectArtifacts -> ShowS
[ProjectArtifacts] -> ShowS
ProjectArtifacts -> String
(Int -> ProjectArtifacts -> ShowS)
-> (ProjectArtifacts -> String)
-> ([ProjectArtifacts] -> ShowS)
-> Show ProjectArtifacts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectArtifacts] -> ShowS
$cshowList :: [ProjectArtifacts] -> ShowS
show :: ProjectArtifacts -> String
$cshow :: ProjectArtifacts -> String
showsPrec :: Int -> ProjectArtifacts -> ShowS
$cshowsPrec :: Int -> ProjectArtifacts -> ShowS
Prelude.Show, (forall x. ProjectArtifacts -> Rep ProjectArtifacts x)
-> (forall x. Rep ProjectArtifacts x -> ProjectArtifacts)
-> Generic ProjectArtifacts
forall x. Rep ProjectArtifacts x -> ProjectArtifacts
forall x. ProjectArtifacts -> Rep ProjectArtifacts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectArtifacts x -> ProjectArtifacts
$cfrom :: forall x. ProjectArtifacts -> Rep ProjectArtifacts x
Prelude.Generic)
newProjectArtifacts ::
ArtifactsType ->
ProjectArtifacts
newProjectArtifacts :: ArtifactsType -> ProjectArtifacts
newProjectArtifacts ArtifactsType
pType_ =
ProjectArtifacts' :: Maybe ArtifactPackaging
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts
ProjectArtifacts'
{ $sel:packaging:ProjectArtifacts' :: Maybe ArtifactPackaging
packaging = Maybe ArtifactPackaging
forall a. Maybe a
Prelude.Nothing,
$sel:path:ProjectArtifacts' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:ProjectArtifacts' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ProjectArtifacts' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionDisabled:ProjectArtifacts' :: Maybe Bool
encryptionDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:overrideArtifactName:ProjectArtifacts' :: Maybe Bool
overrideArtifactName = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:artifactIdentifier:ProjectArtifacts' :: Maybe Text
artifactIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucketOwnerAccess:ProjectArtifacts' :: Maybe BucketOwnerAccess
bucketOwnerAccess = Maybe BucketOwnerAccess
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceType:ProjectArtifacts' :: Maybe ArtifactNamespace
namespaceType = Maybe ArtifactNamespace
forall a. Maybe a
Prelude.Nothing,
$sel:type':ProjectArtifacts' :: ArtifactsType
type' = ArtifactsType
pType_
}
projectArtifacts_packaging :: Lens.Lens' ProjectArtifacts (Prelude.Maybe ArtifactPackaging)
projectArtifacts_packaging :: (Maybe ArtifactPackaging -> f (Maybe ArtifactPackaging))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_packaging = (ProjectArtifacts -> Maybe ArtifactPackaging)
-> (ProjectArtifacts
-> Maybe ArtifactPackaging -> ProjectArtifacts)
-> Lens
ProjectArtifacts
ProjectArtifacts
(Maybe ArtifactPackaging)
(Maybe ArtifactPackaging)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe ArtifactPackaging
packaging :: Maybe ArtifactPackaging
$sel:packaging:ProjectArtifacts' :: ProjectArtifacts -> Maybe ArtifactPackaging
packaging} -> Maybe ArtifactPackaging
packaging) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe ArtifactPackaging
a -> ProjectArtifacts
s {$sel:packaging:ProjectArtifacts' :: Maybe ArtifactPackaging
packaging = Maybe ArtifactPackaging
a} :: ProjectArtifacts)
projectArtifacts_path :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Text)
projectArtifacts_path :: (Maybe Text -> f (Maybe Text))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_path = (ProjectArtifacts -> Maybe Text)
-> (ProjectArtifacts -> Maybe Text -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Text
path :: Maybe Text
$sel:path:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
path} -> Maybe Text
path) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Text
a -> ProjectArtifacts
s {$sel:path:ProjectArtifacts' :: Maybe Text
path = Maybe Text
a} :: ProjectArtifacts)
projectArtifacts_location :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Text)
projectArtifacts_location :: (Maybe Text -> f (Maybe Text))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_location = (ProjectArtifacts -> Maybe Text)
-> (ProjectArtifacts -> Maybe Text -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Text
location :: Maybe Text
$sel:location:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
location} -> Maybe Text
location) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Text
a -> ProjectArtifacts
s {$sel:location:ProjectArtifacts' :: Maybe Text
location = Maybe Text
a} :: ProjectArtifacts)
projectArtifacts_name :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Text)
projectArtifacts_name :: (Maybe Text -> f (Maybe Text))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_name = (ProjectArtifacts -> Maybe Text)
-> (ProjectArtifacts -> Maybe Text -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Text
name :: Maybe Text
$sel:name:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
name} -> Maybe Text
name) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Text
a -> ProjectArtifacts
s {$sel:name:ProjectArtifacts' :: Maybe Text
name = Maybe Text
a} :: ProjectArtifacts)
projectArtifacts_encryptionDisabled :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Bool)
projectArtifacts_encryptionDisabled :: (Maybe Bool -> f (Maybe Bool))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_encryptionDisabled = (ProjectArtifacts -> Maybe Bool)
-> (ProjectArtifacts -> Maybe Bool -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Bool
encryptionDisabled :: Maybe Bool
$sel:encryptionDisabled:ProjectArtifacts' :: ProjectArtifacts -> Maybe Bool
encryptionDisabled} -> Maybe Bool
encryptionDisabled) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Bool
a -> ProjectArtifacts
s {$sel:encryptionDisabled:ProjectArtifacts' :: Maybe Bool
encryptionDisabled = Maybe Bool
a} :: ProjectArtifacts)
projectArtifacts_overrideArtifactName :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Bool)
projectArtifacts_overrideArtifactName :: (Maybe Bool -> f (Maybe Bool))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_overrideArtifactName = (ProjectArtifacts -> Maybe Bool)
-> (ProjectArtifacts -> Maybe Bool -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Bool
overrideArtifactName :: Maybe Bool
$sel:overrideArtifactName:ProjectArtifacts' :: ProjectArtifacts -> Maybe Bool
overrideArtifactName} -> Maybe Bool
overrideArtifactName) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Bool
a -> ProjectArtifacts
s {$sel:overrideArtifactName:ProjectArtifacts' :: Maybe Bool
overrideArtifactName = Maybe Bool
a} :: ProjectArtifacts)
projectArtifacts_artifactIdentifier :: Lens.Lens' ProjectArtifacts (Prelude.Maybe Prelude.Text)
projectArtifacts_artifactIdentifier :: (Maybe Text -> f (Maybe Text))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_artifactIdentifier = (ProjectArtifacts -> Maybe Text)
-> (ProjectArtifacts -> Maybe Text -> ProjectArtifacts)
-> Lens ProjectArtifacts ProjectArtifacts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe Text
artifactIdentifier :: Maybe Text
$sel:artifactIdentifier:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
artifactIdentifier} -> Maybe Text
artifactIdentifier) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe Text
a -> ProjectArtifacts
s {$sel:artifactIdentifier:ProjectArtifacts' :: Maybe Text
artifactIdentifier = Maybe Text
a} :: ProjectArtifacts)
projectArtifacts_bucketOwnerAccess :: Lens.Lens' ProjectArtifacts (Prelude.Maybe BucketOwnerAccess)
projectArtifacts_bucketOwnerAccess :: (Maybe BucketOwnerAccess -> f (Maybe BucketOwnerAccess))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_bucketOwnerAccess = (ProjectArtifacts -> Maybe BucketOwnerAccess)
-> (ProjectArtifacts
-> Maybe BucketOwnerAccess -> ProjectArtifacts)
-> Lens
ProjectArtifacts
ProjectArtifacts
(Maybe BucketOwnerAccess)
(Maybe BucketOwnerAccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe BucketOwnerAccess
bucketOwnerAccess :: Maybe BucketOwnerAccess
$sel:bucketOwnerAccess:ProjectArtifacts' :: ProjectArtifacts -> Maybe BucketOwnerAccess
bucketOwnerAccess} -> Maybe BucketOwnerAccess
bucketOwnerAccess) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe BucketOwnerAccess
a -> ProjectArtifacts
s {$sel:bucketOwnerAccess:ProjectArtifacts' :: Maybe BucketOwnerAccess
bucketOwnerAccess = Maybe BucketOwnerAccess
a} :: ProjectArtifacts)
projectArtifacts_namespaceType :: Lens.Lens' ProjectArtifacts (Prelude.Maybe ArtifactNamespace)
projectArtifacts_namespaceType :: (Maybe ArtifactNamespace -> f (Maybe ArtifactNamespace))
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_namespaceType = (ProjectArtifacts -> Maybe ArtifactNamespace)
-> (ProjectArtifacts
-> Maybe ArtifactNamespace -> ProjectArtifacts)
-> Lens
ProjectArtifacts
ProjectArtifacts
(Maybe ArtifactNamespace)
(Maybe ArtifactNamespace)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {Maybe ArtifactNamespace
namespaceType :: Maybe ArtifactNamespace
$sel:namespaceType:ProjectArtifacts' :: ProjectArtifacts -> Maybe ArtifactNamespace
namespaceType} -> Maybe ArtifactNamespace
namespaceType) (\s :: ProjectArtifacts
s@ProjectArtifacts' {} Maybe ArtifactNamespace
a -> ProjectArtifacts
s {$sel:namespaceType:ProjectArtifacts' :: Maybe ArtifactNamespace
namespaceType = Maybe ArtifactNamespace
a} :: ProjectArtifacts)
projectArtifacts_type :: Lens.Lens' ProjectArtifacts ArtifactsType
projectArtifacts_type :: (ArtifactsType -> f ArtifactsType)
-> ProjectArtifacts -> f ProjectArtifacts
projectArtifacts_type = (ProjectArtifacts -> ArtifactsType)
-> (ProjectArtifacts -> ArtifactsType -> ProjectArtifacts)
-> Lens
ProjectArtifacts ProjectArtifacts ArtifactsType ArtifactsType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectArtifacts' {ArtifactsType
type' :: ArtifactsType
$sel:type':ProjectArtifacts' :: ProjectArtifacts -> ArtifactsType
type'} -> ArtifactsType
type') (\s :: ProjectArtifacts
s@ProjectArtifacts' {} ArtifactsType
a -> ProjectArtifacts
s {$sel:type':ProjectArtifacts' :: ArtifactsType
type' = ArtifactsType
a} :: ProjectArtifacts)
instance Core.FromJSON ProjectArtifacts where
parseJSON :: Value -> Parser ProjectArtifacts
parseJSON =
String
-> (Object -> Parser ProjectArtifacts)
-> Value
-> Parser ProjectArtifacts
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProjectArtifacts"
( \Object
x ->
Maybe ArtifactPackaging
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts
ProjectArtifacts'
(Maybe ArtifactPackaging
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe ArtifactPackaging)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ArtifactPackaging)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"packaging")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
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 Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
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 Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
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 Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
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 Bool
-> Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
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 BucketOwnerAccess
-> Maybe ArtifactNamespace
-> ArtifactsType
-> ProjectArtifacts)
-> Parser (Maybe Text)
-> Parser
(Maybe BucketOwnerAccess
-> Maybe ArtifactNamespace -> ArtifactsType -> ProjectArtifacts)
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 BucketOwnerAccess
-> Maybe ArtifactNamespace -> ArtifactsType -> ProjectArtifacts)
-> Parser (Maybe BucketOwnerAccess)
-> Parser
(Maybe ArtifactNamespace -> ArtifactsType -> ProjectArtifacts)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BucketOwnerAccess)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bucketOwnerAccess")
Parser
(Maybe ArtifactNamespace -> ArtifactsType -> ProjectArtifacts)
-> Parser (Maybe ArtifactNamespace)
-> Parser (ArtifactsType -> ProjectArtifacts)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArtifactNamespace)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"namespaceType")
Parser (ArtifactsType -> ProjectArtifacts)
-> Parser ArtifactsType -> Parser ProjectArtifacts
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ArtifactsType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
)
instance Prelude.Hashable ProjectArtifacts
instance Prelude.NFData ProjectArtifacts
instance Core.ToJSON ProjectArtifacts where
toJSON :: ProjectArtifacts -> Value
toJSON ProjectArtifacts' {Maybe Bool
Maybe Text
Maybe ArtifactNamespace
Maybe ArtifactPackaging
Maybe BucketOwnerAccess
ArtifactsType
type' :: ArtifactsType
namespaceType :: Maybe ArtifactNamespace
bucketOwnerAccess :: Maybe BucketOwnerAccess
artifactIdentifier :: Maybe Text
overrideArtifactName :: Maybe Bool
encryptionDisabled :: Maybe Bool
name :: Maybe Text
location :: Maybe Text
path :: Maybe Text
packaging :: Maybe ArtifactPackaging
$sel:type':ProjectArtifacts' :: ProjectArtifacts -> ArtifactsType
$sel:namespaceType:ProjectArtifacts' :: ProjectArtifacts -> Maybe ArtifactNamespace
$sel:bucketOwnerAccess:ProjectArtifacts' :: ProjectArtifacts -> Maybe BucketOwnerAccess
$sel:artifactIdentifier:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
$sel:overrideArtifactName:ProjectArtifacts' :: ProjectArtifacts -> Maybe Bool
$sel:encryptionDisabled:ProjectArtifacts' :: ProjectArtifacts -> Maybe Bool
$sel:name:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
$sel:location:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
$sel:path:ProjectArtifacts' :: ProjectArtifacts -> Maybe Text
$sel:packaging:ProjectArtifacts' :: ProjectArtifacts -> Maybe ArtifactPackaging
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"packaging" Text -> ArtifactPackaging -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ArtifactPackaging -> Pair)
-> Maybe ArtifactPackaging -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ArtifactPackaging
packaging,
(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
"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
"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
"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
"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
"bucketOwnerAccess" Text -> BucketOwnerAccess -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BucketOwnerAccess -> Pair)
-> Maybe BucketOwnerAccess -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BucketOwnerAccess
bucketOwnerAccess,
(Text
"namespaceType" Text -> ArtifactNamespace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ArtifactNamespace -> Pair)
-> Maybe ArtifactNamespace -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ArtifactNamespace
namespaceType,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> ArtifactsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ArtifactsType
type')
]
)