{-# 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.Lambda.Types.LayerVersionContentInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LayerVersionContentInput = LayerVersionContentInput'
{
LayerVersionContentInput -> Maybe Text
s3ObjectVersion :: Prelude.Maybe Prelude.Text,
LayerVersionContentInput -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text,
LayerVersionContentInput -> Maybe (Sensitive Base64)
zipFile :: Prelude.Maybe (Core.Sensitive Core.Base64),
LayerVersionContentInput -> Maybe Text
s3Bucket :: Prelude.Maybe Prelude.Text
}
deriving (LayerVersionContentInput -> LayerVersionContentInput -> Bool
(LayerVersionContentInput -> LayerVersionContentInput -> Bool)
-> (LayerVersionContentInput -> LayerVersionContentInput -> Bool)
-> Eq LayerVersionContentInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayerVersionContentInput -> LayerVersionContentInput -> Bool
$c/= :: LayerVersionContentInput -> LayerVersionContentInput -> Bool
== :: LayerVersionContentInput -> LayerVersionContentInput -> Bool
$c== :: LayerVersionContentInput -> LayerVersionContentInput -> Bool
Prelude.Eq, Int -> LayerVersionContentInput -> ShowS
[LayerVersionContentInput] -> ShowS
LayerVersionContentInput -> String
(Int -> LayerVersionContentInput -> ShowS)
-> (LayerVersionContentInput -> String)
-> ([LayerVersionContentInput] -> ShowS)
-> Show LayerVersionContentInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayerVersionContentInput] -> ShowS
$cshowList :: [LayerVersionContentInput] -> ShowS
show :: LayerVersionContentInput -> String
$cshow :: LayerVersionContentInput -> String
showsPrec :: Int -> LayerVersionContentInput -> ShowS
$cshowsPrec :: Int -> LayerVersionContentInput -> ShowS
Prelude.Show, (forall x.
LayerVersionContentInput -> Rep LayerVersionContentInput x)
-> (forall x.
Rep LayerVersionContentInput x -> LayerVersionContentInput)
-> Generic LayerVersionContentInput
forall x.
Rep LayerVersionContentInput x -> LayerVersionContentInput
forall x.
LayerVersionContentInput -> Rep LayerVersionContentInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LayerVersionContentInput x -> LayerVersionContentInput
$cfrom :: forall x.
LayerVersionContentInput -> Rep LayerVersionContentInput x
Prelude.Generic)
newLayerVersionContentInput ::
LayerVersionContentInput
newLayerVersionContentInput :: LayerVersionContentInput
newLayerVersionContentInput =
LayerVersionContentInput' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Base64)
-> Maybe Text
-> LayerVersionContentInput
LayerVersionContentInput'
{ $sel:s3ObjectVersion:LayerVersionContentInput' :: Maybe Text
s3ObjectVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:LayerVersionContentInput' :: Maybe Text
s3Key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:zipFile:LayerVersionContentInput' :: Maybe (Sensitive Base64)
zipFile = Maybe (Sensitive Base64)
forall a. Maybe a
Prelude.Nothing,
$sel:s3Bucket:LayerVersionContentInput' :: Maybe Text
s3Bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
layerVersionContentInput_s3ObjectVersion :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3ObjectVersion :: (Maybe Text -> f (Maybe Text))
-> LayerVersionContentInput -> f LayerVersionContentInput
layerVersionContentInput_s3ObjectVersion = (LayerVersionContentInput -> Maybe Text)
-> (LayerVersionContentInput
-> Maybe Text -> LayerVersionContentInput)
-> Lens
LayerVersionContentInput
LayerVersionContentInput
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayerVersionContentInput' {Maybe Text
s3ObjectVersion :: Maybe Text
$sel:s3ObjectVersion:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
s3ObjectVersion} -> Maybe Text
s3ObjectVersion) (\s :: LayerVersionContentInput
s@LayerVersionContentInput' {} Maybe Text
a -> LayerVersionContentInput
s {$sel:s3ObjectVersion:LayerVersionContentInput' :: Maybe Text
s3ObjectVersion = Maybe Text
a} :: LayerVersionContentInput)
layerVersionContentInput_s3Key :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3Key :: (Maybe Text -> f (Maybe Text))
-> LayerVersionContentInput -> f LayerVersionContentInput
layerVersionContentInput_s3Key = (LayerVersionContentInput -> Maybe Text)
-> (LayerVersionContentInput
-> Maybe Text -> LayerVersionContentInput)
-> Lens
LayerVersionContentInput
LayerVersionContentInput
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayerVersionContentInput' {Maybe Text
s3Key :: Maybe Text
$sel:s3Key:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
s3Key} -> Maybe Text
s3Key) (\s :: LayerVersionContentInput
s@LayerVersionContentInput' {} Maybe Text
a -> LayerVersionContentInput
s {$sel:s3Key:LayerVersionContentInput' :: Maybe Text
s3Key = Maybe Text
a} :: LayerVersionContentInput)
layerVersionContentInput_zipFile :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.ByteString)
layerVersionContentInput_zipFile :: (Maybe ByteString -> f (Maybe ByteString))
-> LayerVersionContentInput -> f LayerVersionContentInput
layerVersionContentInput_zipFile = (LayerVersionContentInput -> Maybe (Sensitive Base64))
-> (LayerVersionContentInput
-> Maybe (Sensitive Base64) -> LayerVersionContentInput)
-> Lens
LayerVersionContentInput
LayerVersionContentInput
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayerVersionContentInput' {Maybe (Sensitive Base64)
zipFile :: Maybe (Sensitive Base64)
$sel:zipFile:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe (Sensitive Base64)
zipFile} -> Maybe (Sensitive Base64)
zipFile) (\s :: LayerVersionContentInput
s@LayerVersionContentInput' {} Maybe (Sensitive Base64)
a -> LayerVersionContentInput
s {$sel:zipFile:LayerVersionContentInput' :: Maybe (Sensitive Base64)
zipFile = Maybe (Sensitive Base64)
a} :: LayerVersionContentInput) ((Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> LayerVersionContentInput -> f LayerVersionContentInput)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> (Maybe ByteString -> f (Maybe ByteString))
-> LayerVersionContentInput
-> f LayerVersionContentInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Base64) (Sensitive Base64) ByteString ByteString
-> Iso
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
(Maybe ByteString)
(Maybe ByteString)
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 (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64)))
-> (Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64))
-> AnIso
(Sensitive Base64) (Sensitive Base64) ByteString ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64)
Iso' Base64 ByteString
Core._Base64)
layerVersionContentInput_s3Bucket :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3Bucket :: (Maybe Text -> f (Maybe Text))
-> LayerVersionContentInput -> f LayerVersionContentInput
layerVersionContentInput_s3Bucket = (LayerVersionContentInput -> Maybe Text)
-> (LayerVersionContentInput
-> Maybe Text -> LayerVersionContentInput)
-> Lens
LayerVersionContentInput
LayerVersionContentInput
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayerVersionContentInput' {Maybe Text
s3Bucket :: Maybe Text
$sel:s3Bucket:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
s3Bucket} -> Maybe Text
s3Bucket) (\s :: LayerVersionContentInput
s@LayerVersionContentInput' {} Maybe Text
a -> LayerVersionContentInput
s {$sel:s3Bucket:LayerVersionContentInput' :: Maybe Text
s3Bucket = Maybe Text
a} :: LayerVersionContentInput)
instance Prelude.Hashable LayerVersionContentInput
instance Prelude.NFData LayerVersionContentInput
instance Core.ToJSON LayerVersionContentInput where
toJSON :: LayerVersionContentInput -> Value
toJSON LayerVersionContentInput' {Maybe Text
Maybe (Sensitive Base64)
s3Bucket :: Maybe Text
zipFile :: Maybe (Sensitive Base64)
s3Key :: Maybe Text
s3ObjectVersion :: Maybe Text
$sel:s3Bucket:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:zipFile:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe (Sensitive Base64)
$sel:s3Key:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3ObjectVersion:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"S3ObjectVersion" 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
s3ObjectVersion,
(Text
"S3Key" 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
s3Key,
(Text
"ZipFile" Text -> Sensitive Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Base64 -> Pair)
-> Maybe (Sensitive Base64) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Base64)
zipFile,
(Text
"S3Bucket" 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
s3Bucket
]
)