{-# 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.DeviceFarm.Types.CustomerArtifactPaths 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
data CustomerArtifactPaths = CustomerArtifactPaths'
{
CustomerArtifactPaths -> Maybe [Text]
androidPaths :: Prelude.Maybe [Prelude.Text],
CustomerArtifactPaths -> Maybe [Text]
deviceHostPaths :: Prelude.Maybe [Prelude.Text],
CustomerArtifactPaths -> Maybe [Text]
iosPaths :: Prelude.Maybe [Prelude.Text]
}
deriving (CustomerArtifactPaths -> CustomerArtifactPaths -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomerArtifactPaths -> CustomerArtifactPaths -> Bool
$c/= :: CustomerArtifactPaths -> CustomerArtifactPaths -> Bool
== :: CustomerArtifactPaths -> CustomerArtifactPaths -> Bool
$c== :: CustomerArtifactPaths -> CustomerArtifactPaths -> Bool
Prelude.Eq, ReadPrec [CustomerArtifactPaths]
ReadPrec CustomerArtifactPaths
Int -> ReadS CustomerArtifactPaths
ReadS [CustomerArtifactPaths]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomerArtifactPaths]
$creadListPrec :: ReadPrec [CustomerArtifactPaths]
readPrec :: ReadPrec CustomerArtifactPaths
$creadPrec :: ReadPrec CustomerArtifactPaths
readList :: ReadS [CustomerArtifactPaths]
$creadList :: ReadS [CustomerArtifactPaths]
readsPrec :: Int -> ReadS CustomerArtifactPaths
$creadsPrec :: Int -> ReadS CustomerArtifactPaths
Prelude.Read, Int -> CustomerArtifactPaths -> ShowS
[CustomerArtifactPaths] -> ShowS
CustomerArtifactPaths -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomerArtifactPaths] -> ShowS
$cshowList :: [CustomerArtifactPaths] -> ShowS
show :: CustomerArtifactPaths -> String
$cshow :: CustomerArtifactPaths -> String
showsPrec :: Int -> CustomerArtifactPaths -> ShowS
$cshowsPrec :: Int -> CustomerArtifactPaths -> ShowS
Prelude.Show, forall x. Rep CustomerArtifactPaths x -> CustomerArtifactPaths
forall x. CustomerArtifactPaths -> Rep CustomerArtifactPaths x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomerArtifactPaths x -> CustomerArtifactPaths
$cfrom :: forall x. CustomerArtifactPaths -> Rep CustomerArtifactPaths x
Prelude.Generic)
newCustomerArtifactPaths ::
CustomerArtifactPaths
newCustomerArtifactPaths :: CustomerArtifactPaths
newCustomerArtifactPaths =
CustomerArtifactPaths'
{ $sel:androidPaths:CustomerArtifactPaths' :: Maybe [Text]
androidPaths =
forall a. Maybe a
Prelude.Nothing,
$sel:deviceHostPaths:CustomerArtifactPaths' :: Maybe [Text]
deviceHostPaths = forall a. Maybe a
Prelude.Nothing,
$sel:iosPaths:CustomerArtifactPaths' :: Maybe [Text]
iosPaths = forall a. Maybe a
Prelude.Nothing
}
customerArtifactPaths_androidPaths :: Lens.Lens' CustomerArtifactPaths (Prelude.Maybe [Prelude.Text])
customerArtifactPaths_androidPaths :: Lens' CustomerArtifactPaths (Maybe [Text])
customerArtifactPaths_androidPaths = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerArtifactPaths' {Maybe [Text]
androidPaths :: Maybe [Text]
$sel:androidPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
androidPaths} -> Maybe [Text]
androidPaths) (\s :: CustomerArtifactPaths
s@CustomerArtifactPaths' {} Maybe [Text]
a -> CustomerArtifactPaths
s {$sel:androidPaths:CustomerArtifactPaths' :: Maybe [Text]
androidPaths = Maybe [Text]
a} :: CustomerArtifactPaths) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
customerArtifactPaths_deviceHostPaths :: Lens.Lens' CustomerArtifactPaths (Prelude.Maybe [Prelude.Text])
customerArtifactPaths_deviceHostPaths :: Lens' CustomerArtifactPaths (Maybe [Text])
customerArtifactPaths_deviceHostPaths = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerArtifactPaths' {Maybe [Text]
deviceHostPaths :: Maybe [Text]
$sel:deviceHostPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
deviceHostPaths} -> Maybe [Text]
deviceHostPaths) (\s :: CustomerArtifactPaths
s@CustomerArtifactPaths' {} Maybe [Text]
a -> CustomerArtifactPaths
s {$sel:deviceHostPaths:CustomerArtifactPaths' :: Maybe [Text]
deviceHostPaths = Maybe [Text]
a} :: CustomerArtifactPaths) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
customerArtifactPaths_iosPaths :: Lens.Lens' CustomerArtifactPaths (Prelude.Maybe [Prelude.Text])
customerArtifactPaths_iosPaths :: Lens' CustomerArtifactPaths (Maybe [Text])
customerArtifactPaths_iosPaths = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerArtifactPaths' {Maybe [Text]
iosPaths :: Maybe [Text]
$sel:iosPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
iosPaths} -> Maybe [Text]
iosPaths) (\s :: CustomerArtifactPaths
s@CustomerArtifactPaths' {} Maybe [Text]
a -> CustomerArtifactPaths
s {$sel:iosPaths:CustomerArtifactPaths' :: Maybe [Text]
iosPaths = Maybe [Text]
a} :: CustomerArtifactPaths) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON CustomerArtifactPaths where
parseJSON :: Value -> Parser CustomerArtifactPaths
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomerArtifactPaths"
( \Object
x ->
Maybe [Text]
-> Maybe [Text] -> Maybe [Text] -> CustomerArtifactPaths
CustomerArtifactPaths'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"androidPaths" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"deviceHostPaths"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iosPaths" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable CustomerArtifactPaths where
hashWithSalt :: Int -> CustomerArtifactPaths -> Int
hashWithSalt Int
_salt CustomerArtifactPaths' {Maybe [Text]
iosPaths :: Maybe [Text]
deviceHostPaths :: Maybe [Text]
androidPaths :: Maybe [Text]
$sel:iosPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:deviceHostPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:androidPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
androidPaths
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
deviceHostPaths
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
iosPaths
instance Prelude.NFData CustomerArtifactPaths where
rnf :: CustomerArtifactPaths -> ()
rnf CustomerArtifactPaths' {Maybe [Text]
iosPaths :: Maybe [Text]
deviceHostPaths :: Maybe [Text]
androidPaths :: Maybe [Text]
$sel:iosPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:deviceHostPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:androidPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
androidPaths
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
deviceHostPaths
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
iosPaths
instance Data.ToJSON CustomerArtifactPaths where
toJSON :: CustomerArtifactPaths -> Value
toJSON CustomerArtifactPaths' {Maybe [Text]
iosPaths :: Maybe [Text]
deviceHostPaths :: Maybe [Text]
androidPaths :: Maybe [Text]
$sel:iosPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:deviceHostPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
$sel:androidPaths:CustomerArtifactPaths' :: CustomerArtifactPaths -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"androidPaths" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
androidPaths,
(Key
"deviceHostPaths" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
deviceHostPaths,
(Key
"iosPaths" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
iosPaths
]
)