{-# 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.ResolvedArtifact where
import Amazonka.CodeBuild.Types.ArtifactsType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResolvedArtifact = ResolvedArtifact'
{
ResolvedArtifact -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ResolvedArtifact -> Maybe Text
identifier :: Prelude.Maybe Prelude.Text,
ResolvedArtifact -> Maybe ArtifactsType
type' :: Prelude.Maybe ArtifactsType
}
deriving (ResolvedArtifact -> ResolvedArtifact -> Bool
(ResolvedArtifact -> ResolvedArtifact -> Bool)
-> (ResolvedArtifact -> ResolvedArtifact -> Bool)
-> Eq ResolvedArtifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResolvedArtifact -> ResolvedArtifact -> Bool
$c/= :: ResolvedArtifact -> ResolvedArtifact -> Bool
== :: ResolvedArtifact -> ResolvedArtifact -> Bool
$c== :: ResolvedArtifact -> ResolvedArtifact -> Bool
Prelude.Eq, ReadPrec [ResolvedArtifact]
ReadPrec ResolvedArtifact
Int -> ReadS ResolvedArtifact
ReadS [ResolvedArtifact]
(Int -> ReadS ResolvedArtifact)
-> ReadS [ResolvedArtifact]
-> ReadPrec ResolvedArtifact
-> ReadPrec [ResolvedArtifact]
-> Read ResolvedArtifact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResolvedArtifact]
$creadListPrec :: ReadPrec [ResolvedArtifact]
readPrec :: ReadPrec ResolvedArtifact
$creadPrec :: ReadPrec ResolvedArtifact
readList :: ReadS [ResolvedArtifact]
$creadList :: ReadS [ResolvedArtifact]
readsPrec :: Int -> ReadS ResolvedArtifact
$creadsPrec :: Int -> ReadS ResolvedArtifact
Prelude.Read, Int -> ResolvedArtifact -> ShowS
[ResolvedArtifact] -> ShowS
ResolvedArtifact -> String
(Int -> ResolvedArtifact -> ShowS)
-> (ResolvedArtifact -> String)
-> ([ResolvedArtifact] -> ShowS)
-> Show ResolvedArtifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResolvedArtifact] -> ShowS
$cshowList :: [ResolvedArtifact] -> ShowS
show :: ResolvedArtifact -> String
$cshow :: ResolvedArtifact -> String
showsPrec :: Int -> ResolvedArtifact -> ShowS
$cshowsPrec :: Int -> ResolvedArtifact -> ShowS
Prelude.Show, (forall x. ResolvedArtifact -> Rep ResolvedArtifact x)
-> (forall x. Rep ResolvedArtifact x -> ResolvedArtifact)
-> Generic ResolvedArtifact
forall x. Rep ResolvedArtifact x -> ResolvedArtifact
forall x. ResolvedArtifact -> Rep ResolvedArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResolvedArtifact x -> ResolvedArtifact
$cfrom :: forall x. ResolvedArtifact -> Rep ResolvedArtifact x
Prelude.Generic)
newResolvedArtifact ::
ResolvedArtifact
newResolvedArtifact :: ResolvedArtifact
newResolvedArtifact =
ResolvedArtifact' :: Maybe Text -> Maybe Text -> Maybe ArtifactsType -> ResolvedArtifact
ResolvedArtifact'
{ $sel:location:ResolvedArtifact' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identifier:ResolvedArtifact' :: Maybe Text
identifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':ResolvedArtifact' :: Maybe ArtifactsType
type' = Maybe ArtifactsType
forall a. Maybe a
Prelude.Nothing
}
resolvedArtifact_location :: Lens.Lens' ResolvedArtifact (Prelude.Maybe Prelude.Text)
resolvedArtifact_location :: (Maybe Text -> f (Maybe Text))
-> ResolvedArtifact -> f ResolvedArtifact
resolvedArtifact_location = (ResolvedArtifact -> Maybe Text)
-> (ResolvedArtifact -> Maybe Text -> ResolvedArtifact)
-> Lens ResolvedArtifact ResolvedArtifact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedArtifact' {Maybe Text
location :: Maybe Text
$sel:location:ResolvedArtifact' :: ResolvedArtifact -> Maybe Text
location} -> Maybe Text
location) (\s :: ResolvedArtifact
s@ResolvedArtifact' {} Maybe Text
a -> ResolvedArtifact
s {$sel:location:ResolvedArtifact' :: Maybe Text
location = Maybe Text
a} :: ResolvedArtifact)
resolvedArtifact_identifier :: Lens.Lens' ResolvedArtifact (Prelude.Maybe Prelude.Text)
resolvedArtifact_identifier :: (Maybe Text -> f (Maybe Text))
-> ResolvedArtifact -> f ResolvedArtifact
resolvedArtifact_identifier = (ResolvedArtifact -> Maybe Text)
-> (ResolvedArtifact -> Maybe Text -> ResolvedArtifact)
-> Lens ResolvedArtifact ResolvedArtifact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedArtifact' {Maybe Text
identifier :: Maybe Text
$sel:identifier:ResolvedArtifact' :: ResolvedArtifact -> Maybe Text
identifier} -> Maybe Text
identifier) (\s :: ResolvedArtifact
s@ResolvedArtifact' {} Maybe Text
a -> ResolvedArtifact
s {$sel:identifier:ResolvedArtifact' :: Maybe Text
identifier = Maybe Text
a} :: ResolvedArtifact)
resolvedArtifact_type :: Lens.Lens' ResolvedArtifact (Prelude.Maybe ArtifactsType)
resolvedArtifact_type :: (Maybe ArtifactsType -> f (Maybe ArtifactsType))
-> ResolvedArtifact -> f ResolvedArtifact
resolvedArtifact_type = (ResolvedArtifact -> Maybe ArtifactsType)
-> (ResolvedArtifact -> Maybe ArtifactsType -> ResolvedArtifact)
-> Lens
ResolvedArtifact
ResolvedArtifact
(Maybe ArtifactsType)
(Maybe ArtifactsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedArtifact' {Maybe ArtifactsType
type' :: Maybe ArtifactsType
$sel:type':ResolvedArtifact' :: ResolvedArtifact -> Maybe ArtifactsType
type'} -> Maybe ArtifactsType
type') (\s :: ResolvedArtifact
s@ResolvedArtifact' {} Maybe ArtifactsType
a -> ResolvedArtifact
s {$sel:type':ResolvedArtifact' :: Maybe ArtifactsType
type' = Maybe ArtifactsType
a} :: ResolvedArtifact)
instance Core.FromJSON ResolvedArtifact where
parseJSON :: Value -> Parser ResolvedArtifact
parseJSON =
String
-> (Object -> Parser ResolvedArtifact)
-> Value
-> Parser ResolvedArtifact
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResolvedArtifact"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe ArtifactsType -> ResolvedArtifact
ResolvedArtifact'
(Maybe Text
-> Maybe Text -> Maybe ArtifactsType -> ResolvedArtifact)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe ArtifactsType -> ResolvedArtifact)
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
"location")
Parser (Maybe Text -> Maybe ArtifactsType -> ResolvedArtifact)
-> Parser (Maybe Text)
-> Parser (Maybe ArtifactsType -> ResolvedArtifact)
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
"identifier")
Parser (Maybe ArtifactsType -> ResolvedArtifact)
-> Parser (Maybe ArtifactsType) -> Parser ResolvedArtifact
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArtifactsType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
)
instance Prelude.Hashable ResolvedArtifact
instance Prelude.NFData ResolvedArtifact