{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaTailor.CreateSourceLocation
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a source location on a specific channel.
module Amazonka.MediaTailor.CreateSourceLocation
  ( -- * Creating a Request
    CreateSourceLocation (..),
    newCreateSourceLocation,

    -- * Request Lenses
    createSourceLocation_accessConfiguration,
    createSourceLocation_defaultSegmentDeliveryConfiguration,
    createSourceLocation_tags,
    createSourceLocation_sourceLocationName,
    createSourceLocation_httpConfiguration,

    -- * Destructuring the Response
    CreateSourceLocationResponse (..),
    newCreateSourceLocationResponse,

    -- * Response Lenses
    createSourceLocationResponse_creationTime,
    createSourceLocationResponse_sourceLocationName,
    createSourceLocationResponse_arn,
    createSourceLocationResponse_httpConfiguration,
    createSourceLocationResponse_lastModifiedTime,
    createSourceLocationResponse_accessConfiguration,
    createSourceLocationResponse_defaultSegmentDeliveryConfiguration,
    createSourceLocationResponse_tags,
    createSourceLocationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateSourceLocation' smart constructor.
data CreateSourceLocation = CreateSourceLocation'
  { -- | Access configuration parameters. Configures the type of authentication
    -- used to access content from your source location.
    CreateSourceLocation -> Maybe AccessConfiguration
accessConfiguration :: Prelude.Maybe AccessConfiguration,
    -- | The optional configuration for the server that serves segments.
    CreateSourceLocation -> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration :: Prelude.Maybe DefaultSegmentDeliveryConfiguration,
    -- | The tags to assign to the source location.
    CreateSourceLocation -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The identifier for the source location you are working on.
    CreateSourceLocation -> Text
sourceLocationName :: Prelude.Text,
    -- | The source\'s HTTP package configurations.
    CreateSourceLocation -> HttpConfiguration
httpConfiguration :: HttpConfiguration
  }
  deriving (CreateSourceLocation -> CreateSourceLocation -> Bool
(CreateSourceLocation -> CreateSourceLocation -> Bool)
-> (CreateSourceLocation -> CreateSourceLocation -> Bool)
-> Eq CreateSourceLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSourceLocation -> CreateSourceLocation -> Bool
$c/= :: CreateSourceLocation -> CreateSourceLocation -> Bool
== :: CreateSourceLocation -> CreateSourceLocation -> Bool
$c== :: CreateSourceLocation -> CreateSourceLocation -> Bool
Prelude.Eq, ReadPrec [CreateSourceLocation]
ReadPrec CreateSourceLocation
Int -> ReadS CreateSourceLocation
ReadS [CreateSourceLocation]
(Int -> ReadS CreateSourceLocation)
-> ReadS [CreateSourceLocation]
-> ReadPrec CreateSourceLocation
-> ReadPrec [CreateSourceLocation]
-> Read CreateSourceLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSourceLocation]
$creadListPrec :: ReadPrec [CreateSourceLocation]
readPrec :: ReadPrec CreateSourceLocation
$creadPrec :: ReadPrec CreateSourceLocation
readList :: ReadS [CreateSourceLocation]
$creadList :: ReadS [CreateSourceLocation]
readsPrec :: Int -> ReadS CreateSourceLocation
$creadsPrec :: Int -> ReadS CreateSourceLocation
Prelude.Read, Int -> CreateSourceLocation -> ShowS
[CreateSourceLocation] -> ShowS
CreateSourceLocation -> String
(Int -> CreateSourceLocation -> ShowS)
-> (CreateSourceLocation -> String)
-> ([CreateSourceLocation] -> ShowS)
-> Show CreateSourceLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSourceLocation] -> ShowS
$cshowList :: [CreateSourceLocation] -> ShowS
show :: CreateSourceLocation -> String
$cshow :: CreateSourceLocation -> String
showsPrec :: Int -> CreateSourceLocation -> ShowS
$cshowsPrec :: Int -> CreateSourceLocation -> ShowS
Prelude.Show, (forall x. CreateSourceLocation -> Rep CreateSourceLocation x)
-> (forall x. Rep CreateSourceLocation x -> CreateSourceLocation)
-> Generic CreateSourceLocation
forall x. Rep CreateSourceLocation x -> CreateSourceLocation
forall x. CreateSourceLocation -> Rep CreateSourceLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSourceLocation x -> CreateSourceLocation
$cfrom :: forall x. CreateSourceLocation -> Rep CreateSourceLocation x
Prelude.Generic)

-- |
-- Create a value of 'CreateSourceLocation' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'accessConfiguration', 'createSourceLocation_accessConfiguration' - Access configuration parameters. Configures the type of authentication
-- used to access content from your source location.
--
-- 'defaultSegmentDeliveryConfiguration', 'createSourceLocation_defaultSegmentDeliveryConfiguration' - The optional configuration for the server that serves segments.
--
-- 'tags', 'createSourceLocation_tags' - The tags to assign to the source location.
--
-- 'sourceLocationName', 'createSourceLocation_sourceLocationName' - The identifier for the source location you are working on.
--
-- 'httpConfiguration', 'createSourceLocation_httpConfiguration' - The source\'s HTTP package configurations.
newCreateSourceLocation ::
  -- | 'sourceLocationName'
  Prelude.Text ->
  -- | 'httpConfiguration'
  HttpConfiguration ->
  CreateSourceLocation
newCreateSourceLocation :: Text -> HttpConfiguration -> CreateSourceLocation
newCreateSourceLocation
  Text
pSourceLocationName_
  HttpConfiguration
pHttpConfiguration_ =
    CreateSourceLocation' :: Maybe AccessConfiguration
-> Maybe DefaultSegmentDeliveryConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> HttpConfiguration
-> CreateSourceLocation
CreateSourceLocation'
      { $sel:accessConfiguration:CreateSourceLocation' :: Maybe AccessConfiguration
accessConfiguration =
          Maybe AccessConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultSegmentDeliveryConfiguration:CreateSourceLocation' :: Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration =
          Maybe DefaultSegmentDeliveryConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateSourceLocation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceLocationName:CreateSourceLocation' :: Text
sourceLocationName = Text
pSourceLocationName_,
        $sel:httpConfiguration:CreateSourceLocation' :: HttpConfiguration
httpConfiguration = HttpConfiguration
pHttpConfiguration_
      }

-- | Access configuration parameters. Configures the type of authentication
-- used to access content from your source location.
createSourceLocation_accessConfiguration :: Lens.Lens' CreateSourceLocation (Prelude.Maybe AccessConfiguration)
createSourceLocation_accessConfiguration :: (Maybe AccessConfiguration -> f (Maybe AccessConfiguration))
-> CreateSourceLocation -> f CreateSourceLocation
createSourceLocation_accessConfiguration = (CreateSourceLocation -> Maybe AccessConfiguration)
-> (CreateSourceLocation
    -> Maybe AccessConfiguration -> CreateSourceLocation)
-> Lens
     CreateSourceLocation
     CreateSourceLocation
     (Maybe AccessConfiguration)
     (Maybe AccessConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocation' {Maybe AccessConfiguration
accessConfiguration :: Maybe AccessConfiguration
$sel:accessConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe AccessConfiguration
accessConfiguration} -> Maybe AccessConfiguration
accessConfiguration) (\s :: CreateSourceLocation
s@CreateSourceLocation' {} Maybe AccessConfiguration
a -> CreateSourceLocation
s {$sel:accessConfiguration:CreateSourceLocation' :: Maybe AccessConfiguration
accessConfiguration = Maybe AccessConfiguration
a} :: CreateSourceLocation)

-- | The optional configuration for the server that serves segments.
createSourceLocation_defaultSegmentDeliveryConfiguration :: Lens.Lens' CreateSourceLocation (Prelude.Maybe DefaultSegmentDeliveryConfiguration)
createSourceLocation_defaultSegmentDeliveryConfiguration :: (Maybe DefaultSegmentDeliveryConfiguration
 -> f (Maybe DefaultSegmentDeliveryConfiguration))
-> CreateSourceLocation -> f CreateSourceLocation
createSourceLocation_defaultSegmentDeliveryConfiguration = (CreateSourceLocation -> Maybe DefaultSegmentDeliveryConfiguration)
-> (CreateSourceLocation
    -> Maybe DefaultSegmentDeliveryConfiguration
    -> CreateSourceLocation)
-> Lens
     CreateSourceLocation
     CreateSourceLocation
     (Maybe DefaultSegmentDeliveryConfiguration)
     (Maybe DefaultSegmentDeliveryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocation' {Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration :: Maybe DefaultSegmentDeliveryConfiguration
$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration} -> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration) (\s :: CreateSourceLocation
s@CreateSourceLocation' {} Maybe DefaultSegmentDeliveryConfiguration
a -> CreateSourceLocation
s {$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocation' :: Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration = Maybe DefaultSegmentDeliveryConfiguration
a} :: CreateSourceLocation)

-- | The tags to assign to the source location.
createSourceLocation_tags :: Lens.Lens' CreateSourceLocation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSourceLocation_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSourceLocation -> f CreateSourceLocation
createSourceLocation_tags = (CreateSourceLocation -> Maybe (HashMap Text Text))
-> (CreateSourceLocation
    -> Maybe (HashMap Text Text) -> CreateSourceLocation)
-> Lens
     CreateSourceLocation
     CreateSourceLocation
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocation' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateSourceLocation' :: CreateSourceLocation -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateSourceLocation
s@CreateSourceLocation' {} Maybe (HashMap Text Text)
a -> CreateSourceLocation
s {$sel:tags:CreateSourceLocation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateSourceLocation) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateSourceLocation -> f CreateSourceLocation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSourceLocation
-> f CreateSourceLocation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier for the source location you are working on.
createSourceLocation_sourceLocationName :: Lens.Lens' CreateSourceLocation Prelude.Text
createSourceLocation_sourceLocationName :: (Text -> f Text) -> CreateSourceLocation -> f CreateSourceLocation
createSourceLocation_sourceLocationName = (CreateSourceLocation -> Text)
-> (CreateSourceLocation -> Text -> CreateSourceLocation)
-> Lens CreateSourceLocation CreateSourceLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocation' {Text
sourceLocationName :: Text
$sel:sourceLocationName:CreateSourceLocation' :: CreateSourceLocation -> Text
sourceLocationName} -> Text
sourceLocationName) (\s :: CreateSourceLocation
s@CreateSourceLocation' {} Text
a -> CreateSourceLocation
s {$sel:sourceLocationName:CreateSourceLocation' :: Text
sourceLocationName = Text
a} :: CreateSourceLocation)

-- | The source\'s HTTP package configurations.
createSourceLocation_httpConfiguration :: Lens.Lens' CreateSourceLocation HttpConfiguration
createSourceLocation_httpConfiguration :: (HttpConfiguration -> f HttpConfiguration)
-> CreateSourceLocation -> f CreateSourceLocation
createSourceLocation_httpConfiguration = (CreateSourceLocation -> HttpConfiguration)
-> (CreateSourceLocation
    -> HttpConfiguration -> CreateSourceLocation)
-> Lens
     CreateSourceLocation
     CreateSourceLocation
     HttpConfiguration
     HttpConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocation' {HttpConfiguration
httpConfiguration :: HttpConfiguration
$sel:httpConfiguration:CreateSourceLocation' :: CreateSourceLocation -> HttpConfiguration
httpConfiguration} -> HttpConfiguration
httpConfiguration) (\s :: CreateSourceLocation
s@CreateSourceLocation' {} HttpConfiguration
a -> CreateSourceLocation
s {$sel:httpConfiguration:CreateSourceLocation' :: HttpConfiguration
httpConfiguration = HttpConfiguration
a} :: CreateSourceLocation)

instance Core.AWSRequest CreateSourceLocation where
  type
    AWSResponse CreateSourceLocation =
      CreateSourceLocationResponse
  request :: CreateSourceLocation -> Request CreateSourceLocation
request = Service -> CreateSourceLocation -> Request CreateSourceLocation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateSourceLocation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSourceLocation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateSourceLocation))
-> Logger
-> Service
-> Proxy CreateSourceLocation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSourceLocation)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe HttpConfiguration
-> Maybe POSIX
-> Maybe AccessConfiguration
-> Maybe DefaultSegmentDeliveryConfiguration
-> Maybe (HashMap Text Text)
-> Int
-> CreateSourceLocationResponse
CreateSourceLocationResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe HttpConfiguration
 -> Maybe POSIX
 -> Maybe AccessConfiguration
 -> Maybe DefaultSegmentDeliveryConfiguration
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateSourceLocationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe HttpConfiguration
      -> Maybe POSIX
      -> Maybe AccessConfiguration
      -> Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe HttpConfiguration
   -> Maybe POSIX
   -> Maybe AccessConfiguration
   -> Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe HttpConfiguration
      -> Maybe POSIX
      -> Maybe AccessConfiguration
      -> Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceLocationName")
            Either
  String
  (Maybe Text
   -> Maybe HttpConfiguration
   -> Maybe POSIX
   -> Maybe AccessConfiguration
   -> Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe HttpConfiguration
      -> Maybe POSIX
      -> Maybe AccessConfiguration
      -> Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
            Either
  String
  (Maybe HttpConfiguration
   -> Maybe POSIX
   -> Maybe AccessConfiguration
   -> Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe HttpConfiguration)
-> Either
     String
     (Maybe POSIX
      -> Maybe AccessConfiguration
      -> Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe HttpConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HttpConfiguration")
            Either
  String
  (Maybe POSIX
   -> Maybe AccessConfiguration
   -> Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe AccessConfiguration
      -> Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either
  String
  (Maybe AccessConfiguration
   -> Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe AccessConfiguration)
-> Either
     String
     (Maybe DefaultSegmentDeliveryConfiguration
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AccessConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AccessConfiguration")
            Either
  String
  (Maybe DefaultSegmentDeliveryConfiguration
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSourceLocationResponse)
-> Either String (Maybe DefaultSegmentDeliveryConfiguration)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe DefaultSegmentDeliveryConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DefaultSegmentDeliveryConfiguration")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> CreateSourceLocationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateSourceLocationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateSourceLocationResponse)
-> Either String Int -> Either String CreateSourceLocationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateSourceLocation

instance Prelude.NFData CreateSourceLocation

instance Core.ToHeaders CreateSourceLocation where
  toHeaders :: CreateSourceLocation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateSourceLocation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateSourceLocation where
  toJSON :: CreateSourceLocation -> Value
toJSON CreateSourceLocation' {Maybe (HashMap Text Text)
Maybe DefaultSegmentDeliveryConfiguration
Maybe AccessConfiguration
Text
HttpConfiguration
httpConfiguration :: HttpConfiguration
sourceLocationName :: Text
tags :: Maybe (HashMap Text Text)
defaultSegmentDeliveryConfiguration :: Maybe DefaultSegmentDeliveryConfiguration
accessConfiguration :: Maybe AccessConfiguration
$sel:httpConfiguration:CreateSourceLocation' :: CreateSourceLocation -> HttpConfiguration
$sel:sourceLocationName:CreateSourceLocation' :: CreateSourceLocation -> Text
$sel:tags:CreateSourceLocation' :: CreateSourceLocation -> Maybe (HashMap Text Text)
$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe DefaultSegmentDeliveryConfiguration
$sel:accessConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe AccessConfiguration
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AccessConfiguration" Text -> AccessConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessConfiguration -> Pair)
-> Maybe AccessConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessConfiguration
accessConfiguration,
            (Text
"DefaultSegmentDeliveryConfiguration" Text -> DefaultSegmentDeliveryConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DefaultSegmentDeliveryConfiguration -> Pair)
-> Maybe DefaultSegmentDeliveryConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"HttpConfiguration" Text -> HttpConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HttpConfiguration
httpConfiguration)
          ]
      )

instance Core.ToPath CreateSourceLocation where
  toPath :: CreateSourceLocation -> ByteString
toPath CreateSourceLocation' {Maybe (HashMap Text Text)
Maybe DefaultSegmentDeliveryConfiguration
Maybe AccessConfiguration
Text
HttpConfiguration
httpConfiguration :: HttpConfiguration
sourceLocationName :: Text
tags :: Maybe (HashMap Text Text)
defaultSegmentDeliveryConfiguration :: Maybe DefaultSegmentDeliveryConfiguration
accessConfiguration :: Maybe AccessConfiguration
$sel:httpConfiguration:CreateSourceLocation' :: CreateSourceLocation -> HttpConfiguration
$sel:sourceLocationName:CreateSourceLocation' :: CreateSourceLocation -> Text
$sel:tags:CreateSourceLocation' :: CreateSourceLocation -> Maybe (HashMap Text Text)
$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe DefaultSegmentDeliveryConfiguration
$sel:accessConfiguration:CreateSourceLocation' :: CreateSourceLocation -> Maybe AccessConfiguration
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/sourceLocation/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sourceLocationName]

instance Core.ToQuery CreateSourceLocation where
  toQuery :: CreateSourceLocation -> QueryString
toQuery = QueryString -> CreateSourceLocation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateSourceLocationResponse' smart constructor.
data CreateSourceLocationResponse = CreateSourceLocationResponse'
  { -- | The timestamp that indicates when the source location was created.
    CreateSourceLocationResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the source location.
    CreateSourceLocationResponse -> Maybe Text
sourceLocationName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the source location.
    CreateSourceLocationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The HTTP package configuration settings for the source location.
    CreateSourceLocationResponse -> Maybe HttpConfiguration
httpConfiguration :: Prelude.Maybe HttpConfiguration,
    -- | The timestamp that indicates when the source location was last modified.
    CreateSourceLocationResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The access configuration for the source location.
    CreateSourceLocationResponse -> Maybe AccessConfiguration
accessConfiguration :: Prelude.Maybe AccessConfiguration,
    -- | The default segment delivery configuration settings.
    CreateSourceLocationResponse
-> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration :: Prelude.Maybe DefaultSegmentDeliveryConfiguration,
    -- | The tags assigned to the source location.
    CreateSourceLocationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateSourceLocationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSourceLocationResponse
-> CreateSourceLocationResponse -> Bool
(CreateSourceLocationResponse
 -> CreateSourceLocationResponse -> Bool)
-> (CreateSourceLocationResponse
    -> CreateSourceLocationResponse -> Bool)
-> Eq CreateSourceLocationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSourceLocationResponse
-> CreateSourceLocationResponse -> Bool
$c/= :: CreateSourceLocationResponse
-> CreateSourceLocationResponse -> Bool
== :: CreateSourceLocationResponse
-> CreateSourceLocationResponse -> Bool
$c== :: CreateSourceLocationResponse
-> CreateSourceLocationResponse -> Bool
Prelude.Eq, ReadPrec [CreateSourceLocationResponse]
ReadPrec CreateSourceLocationResponse
Int -> ReadS CreateSourceLocationResponse
ReadS [CreateSourceLocationResponse]
(Int -> ReadS CreateSourceLocationResponse)
-> ReadS [CreateSourceLocationResponse]
-> ReadPrec CreateSourceLocationResponse
-> ReadPrec [CreateSourceLocationResponse]
-> Read CreateSourceLocationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSourceLocationResponse]
$creadListPrec :: ReadPrec [CreateSourceLocationResponse]
readPrec :: ReadPrec CreateSourceLocationResponse
$creadPrec :: ReadPrec CreateSourceLocationResponse
readList :: ReadS [CreateSourceLocationResponse]
$creadList :: ReadS [CreateSourceLocationResponse]
readsPrec :: Int -> ReadS CreateSourceLocationResponse
$creadsPrec :: Int -> ReadS CreateSourceLocationResponse
Prelude.Read, Int -> CreateSourceLocationResponse -> ShowS
[CreateSourceLocationResponse] -> ShowS
CreateSourceLocationResponse -> String
(Int -> CreateSourceLocationResponse -> ShowS)
-> (CreateSourceLocationResponse -> String)
-> ([CreateSourceLocationResponse] -> ShowS)
-> Show CreateSourceLocationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSourceLocationResponse] -> ShowS
$cshowList :: [CreateSourceLocationResponse] -> ShowS
show :: CreateSourceLocationResponse -> String
$cshow :: CreateSourceLocationResponse -> String
showsPrec :: Int -> CreateSourceLocationResponse -> ShowS
$cshowsPrec :: Int -> CreateSourceLocationResponse -> ShowS
Prelude.Show, (forall x.
 CreateSourceLocationResponse -> Rep CreateSourceLocationResponse x)
-> (forall x.
    Rep CreateSourceLocationResponse x -> CreateSourceLocationResponse)
-> Generic CreateSourceLocationResponse
forall x.
Rep CreateSourceLocationResponse x -> CreateSourceLocationResponse
forall x.
CreateSourceLocationResponse -> Rep CreateSourceLocationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSourceLocationResponse x -> CreateSourceLocationResponse
$cfrom :: forall x.
CreateSourceLocationResponse -> Rep CreateSourceLocationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSourceLocationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'createSourceLocationResponse_creationTime' - The timestamp that indicates when the source location was created.
--
-- 'sourceLocationName', 'createSourceLocationResponse_sourceLocationName' - The name of the source location.
--
-- 'arn', 'createSourceLocationResponse_arn' - The ARN of the source location.
--
-- 'httpConfiguration', 'createSourceLocationResponse_httpConfiguration' - The HTTP package configuration settings for the source location.
--
-- 'lastModifiedTime', 'createSourceLocationResponse_lastModifiedTime' - The timestamp that indicates when the source location was last modified.
--
-- 'accessConfiguration', 'createSourceLocationResponse_accessConfiguration' - The access configuration for the source location.
--
-- 'defaultSegmentDeliveryConfiguration', 'createSourceLocationResponse_defaultSegmentDeliveryConfiguration' - The default segment delivery configuration settings.
--
-- 'tags', 'createSourceLocationResponse_tags' - The tags assigned to the source location.
--
-- 'httpStatus', 'createSourceLocationResponse_httpStatus' - The response's http status code.
newCreateSourceLocationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSourceLocationResponse
newCreateSourceLocationResponse :: Int -> CreateSourceLocationResponse
newCreateSourceLocationResponse Int
pHttpStatus_ =
  CreateSourceLocationResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe HttpConfiguration
-> Maybe POSIX
-> Maybe AccessConfiguration
-> Maybe DefaultSegmentDeliveryConfiguration
-> Maybe (HashMap Text Text)
-> Int
-> CreateSourceLocationResponse
CreateSourceLocationResponse'
    { $sel:creationTime:CreateSourceLocationResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationName:CreateSourceLocationResponse' :: Maybe Text
sourceLocationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateSourceLocationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpConfiguration:CreateSourceLocationResponse' :: Maybe HttpConfiguration
httpConfiguration = Maybe HttpConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:CreateSourceLocationResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:accessConfiguration:CreateSourceLocationResponse' :: Maybe AccessConfiguration
accessConfiguration = Maybe AccessConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSegmentDeliveryConfiguration:CreateSourceLocationResponse' :: Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration =
        Maybe DefaultSegmentDeliveryConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateSourceLocationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSourceLocationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The timestamp that indicates when the source location was created.
createSourceLocationResponse_creationTime :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe Prelude.UTCTime)
createSourceLocationResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_creationTime = (CreateSourceLocationResponse -> Maybe POSIX)
-> (CreateSourceLocationResponse
    -> Maybe POSIX -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe POSIX
a -> CreateSourceLocationResponse
s {$sel:creationTime:CreateSourceLocationResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CreateSourceLocationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateSourceLocationResponse -> f CreateSourceLocationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateSourceLocationResponse
-> f CreateSourceLocationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the source location.
createSourceLocationResponse_sourceLocationName :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe Prelude.Text)
createSourceLocationResponse_sourceLocationName :: (Maybe Text -> f (Maybe Text))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_sourceLocationName = (CreateSourceLocationResponse -> Maybe Text)
-> (CreateSourceLocationResponse
    -> Maybe Text -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe Text
sourceLocationName :: Maybe Text
$sel:sourceLocationName:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe Text
sourceLocationName} -> Maybe Text
sourceLocationName) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe Text
a -> CreateSourceLocationResponse
s {$sel:sourceLocationName:CreateSourceLocationResponse' :: Maybe Text
sourceLocationName = Maybe Text
a} :: CreateSourceLocationResponse)

-- | The ARN of the source location.
createSourceLocationResponse_arn :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe Prelude.Text)
createSourceLocationResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_arn = (CreateSourceLocationResponse -> Maybe Text)
-> (CreateSourceLocationResponse
    -> Maybe Text -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe Text
a -> CreateSourceLocationResponse
s {$sel:arn:CreateSourceLocationResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateSourceLocationResponse)

-- | The HTTP package configuration settings for the source location.
createSourceLocationResponse_httpConfiguration :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe HttpConfiguration)
createSourceLocationResponse_httpConfiguration :: (Maybe HttpConfiguration -> f (Maybe HttpConfiguration))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_httpConfiguration = (CreateSourceLocationResponse -> Maybe HttpConfiguration)
-> (CreateSourceLocationResponse
    -> Maybe HttpConfiguration -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe HttpConfiguration)
     (Maybe HttpConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe HttpConfiguration
httpConfiguration :: Maybe HttpConfiguration
$sel:httpConfiguration:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe HttpConfiguration
httpConfiguration} -> Maybe HttpConfiguration
httpConfiguration) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe HttpConfiguration
a -> CreateSourceLocationResponse
s {$sel:httpConfiguration:CreateSourceLocationResponse' :: Maybe HttpConfiguration
httpConfiguration = Maybe HttpConfiguration
a} :: CreateSourceLocationResponse)

-- | The timestamp that indicates when the source location was last modified.
createSourceLocationResponse_lastModifiedTime :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe Prelude.UTCTime)
createSourceLocationResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_lastModifiedTime = (CreateSourceLocationResponse -> Maybe POSIX)
-> (CreateSourceLocationResponse
    -> Maybe POSIX -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe POSIX
a -> CreateSourceLocationResponse
s {$sel:lastModifiedTime:CreateSourceLocationResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: CreateSourceLocationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateSourceLocationResponse -> f CreateSourceLocationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateSourceLocationResponse
-> f CreateSourceLocationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The access configuration for the source location.
createSourceLocationResponse_accessConfiguration :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe AccessConfiguration)
createSourceLocationResponse_accessConfiguration :: (Maybe AccessConfiguration -> f (Maybe AccessConfiguration))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_accessConfiguration = (CreateSourceLocationResponse -> Maybe AccessConfiguration)
-> (CreateSourceLocationResponse
    -> Maybe AccessConfiguration -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe AccessConfiguration)
     (Maybe AccessConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe AccessConfiguration
accessConfiguration :: Maybe AccessConfiguration
$sel:accessConfiguration:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe AccessConfiguration
accessConfiguration} -> Maybe AccessConfiguration
accessConfiguration) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe AccessConfiguration
a -> CreateSourceLocationResponse
s {$sel:accessConfiguration:CreateSourceLocationResponse' :: Maybe AccessConfiguration
accessConfiguration = Maybe AccessConfiguration
a} :: CreateSourceLocationResponse)

-- | The default segment delivery configuration settings.
createSourceLocationResponse_defaultSegmentDeliveryConfiguration :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe DefaultSegmentDeliveryConfiguration)
createSourceLocationResponse_defaultSegmentDeliveryConfiguration :: (Maybe DefaultSegmentDeliveryConfiguration
 -> f (Maybe DefaultSegmentDeliveryConfiguration))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_defaultSegmentDeliveryConfiguration = (CreateSourceLocationResponse
 -> Maybe DefaultSegmentDeliveryConfiguration)
-> (CreateSourceLocationResponse
    -> Maybe DefaultSegmentDeliveryConfiguration
    -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe DefaultSegmentDeliveryConfiguration)
     (Maybe DefaultSegmentDeliveryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration :: Maybe DefaultSegmentDeliveryConfiguration
$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocationResponse' :: CreateSourceLocationResponse
-> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration} -> Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe DefaultSegmentDeliveryConfiguration
a -> CreateSourceLocationResponse
s {$sel:defaultSegmentDeliveryConfiguration:CreateSourceLocationResponse' :: Maybe DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration = Maybe DefaultSegmentDeliveryConfiguration
a} :: CreateSourceLocationResponse)

-- | The tags assigned to the source location.
createSourceLocationResponse_tags :: Lens.Lens' CreateSourceLocationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSourceLocationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_tags = (CreateSourceLocationResponse -> Maybe (HashMap Text Text))
-> (CreateSourceLocationResponse
    -> Maybe (HashMap Text Text) -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse
     CreateSourceLocationResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Maybe (HashMap Text Text)
a -> CreateSourceLocationResponse
s {$sel:tags:CreateSourceLocationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateSourceLocationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateSourceLocationResponse -> f CreateSourceLocationResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSourceLocationResponse
-> f CreateSourceLocationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
createSourceLocationResponse_httpStatus :: Lens.Lens' CreateSourceLocationResponse Prelude.Int
createSourceLocationResponse_httpStatus :: (Int -> f Int)
-> CreateSourceLocationResponse -> f CreateSourceLocationResponse
createSourceLocationResponse_httpStatus = (CreateSourceLocationResponse -> Int)
-> (CreateSourceLocationResponse
    -> Int -> CreateSourceLocationResponse)
-> Lens
     CreateSourceLocationResponse CreateSourceLocationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSourceLocationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateSourceLocationResponse' :: CreateSourceLocationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateSourceLocationResponse
s@CreateSourceLocationResponse' {} Int
a -> CreateSourceLocationResponse
s {$sel:httpStatus:CreateSourceLocationResponse' :: Int
httpStatus = Int
a} :: CreateSourceLocationResponse)

instance Prelude.NFData CreateSourceLocationResponse