{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LayerVersionContentInput = LayerVersionContentInput'
{
LayerVersionContentInput -> Maybe Text
s3Bucket :: Prelude.Maybe Prelude.Text,
LayerVersionContentInput -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text,
LayerVersionContentInput -> Maybe Text
s3ObjectVersion :: Prelude.Maybe Prelude.Text,
LayerVersionContentInput -> Maybe (Sensitive Base64)
zipFile :: Prelude.Maybe (Data.Sensitive Data.Base64)
}
deriving (LayerVersionContentInput -> LayerVersionContentInput -> Bool
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
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.
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'
{ $sel:s3Bucket:LayerVersionContentInput' :: Maybe Text
s3Bucket =
forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:LayerVersionContentInput' :: Maybe Text
s3Key = forall a. Maybe a
Prelude.Nothing,
$sel:s3ObjectVersion:LayerVersionContentInput' :: Maybe Text
s3ObjectVersion = forall a. Maybe a
Prelude.Nothing,
$sel:zipFile:LayerVersionContentInput' :: Maybe (Sensitive Base64)
zipFile = forall a. Maybe a
Prelude.Nothing
}
layerVersionContentInput_s3Bucket :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3Bucket :: Lens' LayerVersionContentInput (Maybe Text)
layerVersionContentInput_s3Bucket = 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)
layerVersionContentInput_s3Key :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3Key :: Lens' LayerVersionContentInput (Maybe Text)
layerVersionContentInput_s3Key = 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_s3ObjectVersion :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.Text)
layerVersionContentInput_s3ObjectVersion :: Lens' LayerVersionContentInput (Maybe Text)
layerVersionContentInput_s3ObjectVersion = 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_zipFile :: Lens.Lens' LayerVersionContentInput (Prelude.Maybe Prelude.ByteString)
layerVersionContentInput_zipFile :: Lens' LayerVersionContentInput (Maybe ByteString)
layerVersionContentInput_zipFile = 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) 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 a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Iso' Base64 ByteString
Data._Base64)
instance Prelude.Hashable LayerVersionContentInput where
hashWithSalt :: Int -> LayerVersionContentInput -> Int
hashWithSalt Int
_salt LayerVersionContentInput' {Maybe Text
Maybe (Sensitive Base64)
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
$sel:zipFile:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Key:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Bucket:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3ObjectVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Base64)
zipFile
instance Prelude.NFData LayerVersionContentInput where
rnf :: LayerVersionContentInput -> ()
rnf LayerVersionContentInput' {Maybe Text
Maybe (Sensitive Base64)
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
$sel:zipFile:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Key:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Bucket:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Bucket
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3ObjectVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Base64)
zipFile
instance Data.ToJSON LayerVersionContentInput where
toJSON :: LayerVersionContentInput -> Value
toJSON LayerVersionContentInput' {Maybe Text
Maybe (Sensitive Base64)
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
$sel:zipFile:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Key:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
$sel:s3Bucket:LayerVersionContentInput' :: LayerVersionContentInput -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"S3Bucket" 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
s3Bucket,
(Key
"S3Key" 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
s3Key,
(Key
"S3ObjectVersion" 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
s3ObjectVersion,
(Key
"ZipFile" 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 (Sensitive Base64)
zipFile
]
)