{-# 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.ConfigureLogsForPlaybackConfiguration
-- 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)
--
-- Configures Amazon CloudWatch log settings for a playback configuration.
module Amazonka.MediaTailor.ConfigureLogsForPlaybackConfiguration
  ( -- * Creating a Request
    ConfigureLogsForPlaybackConfiguration (..),
    newConfigureLogsForPlaybackConfiguration,

    -- * Request Lenses
    configureLogsForPlaybackConfiguration_percentEnabled,
    configureLogsForPlaybackConfiguration_playbackConfigurationName,

    -- * Destructuring the Response
    ConfigureLogsForPlaybackConfigurationResponse (..),
    newConfigureLogsForPlaybackConfigurationResponse,

    -- * Response Lenses
    configureLogsForPlaybackConfigurationResponse_playbackConfigurationName,
    configureLogsForPlaybackConfigurationResponse_percentEnabled,
    configureLogsForPlaybackConfigurationResponse_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

-- | Configures Amazon CloudWatch log settings for a playback configuration.
--
-- /See:/ 'newConfigureLogsForPlaybackConfiguration' smart constructor.
data ConfigureLogsForPlaybackConfiguration = ConfigureLogsForPlaybackConfiguration'
  { -- | The percentage of session logs that MediaTailor sends to your Cloudwatch
    -- Logs account. For example, if your playback configuration has 1000
    -- sessions and percentEnabled is set to 60, MediaTailor sends logs for 600
    -- of the sessions to CloudWatch Logs. MediaTailor decides at random which
    -- of the playback configuration sessions to send logs for. If you want to
    -- view logs for a specific session, you can use the
    -- <https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html debug log mode>.
    --
    -- Valid values: 0 - 100
    ConfigureLogsForPlaybackConfiguration -> Int
percentEnabled :: Prelude.Int,
    -- | The name of the playback configuration.
    ConfigureLogsForPlaybackConfiguration -> Text
playbackConfigurationName :: Prelude.Text
  }
  deriving (ConfigureLogsForPlaybackConfiguration
-> ConfigureLogsForPlaybackConfiguration -> Bool
(ConfigureLogsForPlaybackConfiguration
 -> ConfigureLogsForPlaybackConfiguration -> Bool)
-> (ConfigureLogsForPlaybackConfiguration
    -> ConfigureLogsForPlaybackConfiguration -> Bool)
-> Eq ConfigureLogsForPlaybackConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigureLogsForPlaybackConfiguration
-> ConfigureLogsForPlaybackConfiguration -> Bool
$c/= :: ConfigureLogsForPlaybackConfiguration
-> ConfigureLogsForPlaybackConfiguration -> Bool
== :: ConfigureLogsForPlaybackConfiguration
-> ConfigureLogsForPlaybackConfiguration -> Bool
$c== :: ConfigureLogsForPlaybackConfiguration
-> ConfigureLogsForPlaybackConfiguration -> Bool
Prelude.Eq, ReadPrec [ConfigureLogsForPlaybackConfiguration]
ReadPrec ConfigureLogsForPlaybackConfiguration
Int -> ReadS ConfigureLogsForPlaybackConfiguration
ReadS [ConfigureLogsForPlaybackConfiguration]
(Int -> ReadS ConfigureLogsForPlaybackConfiguration)
-> ReadS [ConfigureLogsForPlaybackConfiguration]
-> ReadPrec ConfigureLogsForPlaybackConfiguration
-> ReadPrec [ConfigureLogsForPlaybackConfiguration]
-> Read ConfigureLogsForPlaybackConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigureLogsForPlaybackConfiguration]
$creadListPrec :: ReadPrec [ConfigureLogsForPlaybackConfiguration]
readPrec :: ReadPrec ConfigureLogsForPlaybackConfiguration
$creadPrec :: ReadPrec ConfigureLogsForPlaybackConfiguration
readList :: ReadS [ConfigureLogsForPlaybackConfiguration]
$creadList :: ReadS [ConfigureLogsForPlaybackConfiguration]
readsPrec :: Int -> ReadS ConfigureLogsForPlaybackConfiguration
$creadsPrec :: Int -> ReadS ConfigureLogsForPlaybackConfiguration
Prelude.Read, Int -> ConfigureLogsForPlaybackConfiguration -> ShowS
[ConfigureLogsForPlaybackConfiguration] -> ShowS
ConfigureLogsForPlaybackConfiguration -> String
(Int -> ConfigureLogsForPlaybackConfiguration -> ShowS)
-> (ConfigureLogsForPlaybackConfiguration -> String)
-> ([ConfigureLogsForPlaybackConfiguration] -> ShowS)
-> Show ConfigureLogsForPlaybackConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigureLogsForPlaybackConfiguration] -> ShowS
$cshowList :: [ConfigureLogsForPlaybackConfiguration] -> ShowS
show :: ConfigureLogsForPlaybackConfiguration -> String
$cshow :: ConfigureLogsForPlaybackConfiguration -> String
showsPrec :: Int -> ConfigureLogsForPlaybackConfiguration -> ShowS
$cshowsPrec :: Int -> ConfigureLogsForPlaybackConfiguration -> ShowS
Prelude.Show, (forall x.
 ConfigureLogsForPlaybackConfiguration
 -> Rep ConfigureLogsForPlaybackConfiguration x)
-> (forall x.
    Rep ConfigureLogsForPlaybackConfiguration x
    -> ConfigureLogsForPlaybackConfiguration)
-> Generic ConfigureLogsForPlaybackConfiguration
forall x.
Rep ConfigureLogsForPlaybackConfiguration x
-> ConfigureLogsForPlaybackConfiguration
forall x.
ConfigureLogsForPlaybackConfiguration
-> Rep ConfigureLogsForPlaybackConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigureLogsForPlaybackConfiguration x
-> ConfigureLogsForPlaybackConfiguration
$cfrom :: forall x.
ConfigureLogsForPlaybackConfiguration
-> Rep ConfigureLogsForPlaybackConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ConfigureLogsForPlaybackConfiguration' 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:
--
-- 'percentEnabled', 'configureLogsForPlaybackConfiguration_percentEnabled' - The percentage of session logs that MediaTailor sends to your Cloudwatch
-- Logs account. For example, if your playback configuration has 1000
-- sessions and percentEnabled is set to 60, MediaTailor sends logs for 600
-- of the sessions to CloudWatch Logs. MediaTailor decides at random which
-- of the playback configuration sessions to send logs for. If you want to
-- view logs for a specific session, you can use the
-- <https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html debug log mode>.
--
-- Valid values: 0 - 100
--
-- 'playbackConfigurationName', 'configureLogsForPlaybackConfiguration_playbackConfigurationName' - The name of the playback configuration.
newConfigureLogsForPlaybackConfiguration ::
  -- | 'percentEnabled'
  Prelude.Int ->
  -- | 'playbackConfigurationName'
  Prelude.Text ->
  ConfigureLogsForPlaybackConfiguration
newConfigureLogsForPlaybackConfiguration :: Int -> Text -> ConfigureLogsForPlaybackConfiguration
newConfigureLogsForPlaybackConfiguration
  Int
pPercentEnabled_
  Text
pPlaybackConfigurationName_ =
    ConfigureLogsForPlaybackConfiguration' :: Int -> Text -> ConfigureLogsForPlaybackConfiguration
ConfigureLogsForPlaybackConfiguration'
      { $sel:percentEnabled:ConfigureLogsForPlaybackConfiguration' :: Int
percentEnabled =
          Int
pPercentEnabled_,
        $sel:playbackConfigurationName:ConfigureLogsForPlaybackConfiguration' :: Text
playbackConfigurationName =
          Text
pPlaybackConfigurationName_
      }

-- | The percentage of session logs that MediaTailor sends to your Cloudwatch
-- Logs account. For example, if your playback configuration has 1000
-- sessions and percentEnabled is set to 60, MediaTailor sends logs for 600
-- of the sessions to CloudWatch Logs. MediaTailor decides at random which
-- of the playback configuration sessions to send logs for. If you want to
-- view logs for a specific session, you can use the
-- <https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html debug log mode>.
--
-- Valid values: 0 - 100
configureLogsForPlaybackConfiguration_percentEnabled :: Lens.Lens' ConfigureLogsForPlaybackConfiguration Prelude.Int
configureLogsForPlaybackConfiguration_percentEnabled :: (Int -> f Int)
-> ConfigureLogsForPlaybackConfiguration
-> f ConfigureLogsForPlaybackConfiguration
configureLogsForPlaybackConfiguration_percentEnabled = (ConfigureLogsForPlaybackConfiguration -> Int)
-> (ConfigureLogsForPlaybackConfiguration
    -> Int -> ConfigureLogsForPlaybackConfiguration)
-> Lens
     ConfigureLogsForPlaybackConfiguration
     ConfigureLogsForPlaybackConfiguration
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigureLogsForPlaybackConfiguration' {Int
percentEnabled :: Int
$sel:percentEnabled:ConfigureLogsForPlaybackConfiguration' :: ConfigureLogsForPlaybackConfiguration -> Int
percentEnabled} -> Int
percentEnabled) (\s :: ConfigureLogsForPlaybackConfiguration
s@ConfigureLogsForPlaybackConfiguration' {} Int
a -> ConfigureLogsForPlaybackConfiguration
s {$sel:percentEnabled:ConfigureLogsForPlaybackConfiguration' :: Int
percentEnabled = Int
a} :: ConfigureLogsForPlaybackConfiguration)

-- | The name of the playback configuration.
configureLogsForPlaybackConfiguration_playbackConfigurationName :: Lens.Lens' ConfigureLogsForPlaybackConfiguration Prelude.Text
configureLogsForPlaybackConfiguration_playbackConfigurationName :: (Text -> f Text)
-> ConfigureLogsForPlaybackConfiguration
-> f ConfigureLogsForPlaybackConfiguration
configureLogsForPlaybackConfiguration_playbackConfigurationName = (ConfigureLogsForPlaybackConfiguration -> Text)
-> (ConfigureLogsForPlaybackConfiguration
    -> Text -> ConfigureLogsForPlaybackConfiguration)
-> Lens
     ConfigureLogsForPlaybackConfiguration
     ConfigureLogsForPlaybackConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigureLogsForPlaybackConfiguration' {Text
playbackConfigurationName :: Text
$sel:playbackConfigurationName:ConfigureLogsForPlaybackConfiguration' :: ConfigureLogsForPlaybackConfiguration -> Text
playbackConfigurationName} -> Text
playbackConfigurationName) (\s :: ConfigureLogsForPlaybackConfiguration
s@ConfigureLogsForPlaybackConfiguration' {} Text
a -> ConfigureLogsForPlaybackConfiguration
s {$sel:playbackConfigurationName:ConfigureLogsForPlaybackConfiguration' :: Text
playbackConfigurationName = Text
a} :: ConfigureLogsForPlaybackConfiguration)

instance
  Core.AWSRequest
    ConfigureLogsForPlaybackConfiguration
  where
  type
    AWSResponse
      ConfigureLogsForPlaybackConfiguration =
      ConfigureLogsForPlaybackConfigurationResponse
  request :: ConfigureLogsForPlaybackConfiguration
-> Request ConfigureLogsForPlaybackConfiguration
request = Service
-> ConfigureLogsForPlaybackConfiguration
-> Request ConfigureLogsForPlaybackConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ConfigureLogsForPlaybackConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ConfigureLogsForPlaybackConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse ConfigureLogsForPlaybackConfiguration))
-> Logger
-> Service
-> Proxy ConfigureLogsForPlaybackConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ConfigureLogsForPlaybackConfiguration)))
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 Text
-> Maybe Int
-> Int
-> ConfigureLogsForPlaybackConfigurationResponse
ConfigureLogsForPlaybackConfigurationResponse'
            (Maybe Text
 -> Maybe Int
 -> Int
 -> ConfigureLogsForPlaybackConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int -> Int -> ConfigureLogsForPlaybackConfigurationResponse)
forall (f :: * -> *) a b. Functor 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
"PlaybackConfigurationName")
              Either
  String
  (Maybe Int -> Int -> ConfigureLogsForPlaybackConfigurationResponse)
-> Either String (Maybe Int)
-> Either
     String (Int -> ConfigureLogsForPlaybackConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PercentEnabled")
              Either
  String (Int -> ConfigureLogsForPlaybackConfigurationResponse)
-> Either String Int
-> Either String ConfigureLogsForPlaybackConfigurationResponse
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
    ConfigureLogsForPlaybackConfiguration

instance
  Prelude.NFData
    ConfigureLogsForPlaybackConfiguration

instance
  Core.ToHeaders
    ConfigureLogsForPlaybackConfiguration
  where
  toHeaders :: ConfigureLogsForPlaybackConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ConfigureLogsForPlaybackConfiguration -> 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
    ConfigureLogsForPlaybackConfiguration
  where
  toJSON :: ConfigureLogsForPlaybackConfiguration -> Value
toJSON ConfigureLogsForPlaybackConfiguration' {Int
Text
playbackConfigurationName :: Text
percentEnabled :: Int
$sel:playbackConfigurationName:ConfigureLogsForPlaybackConfiguration' :: ConfigureLogsForPlaybackConfiguration -> Text
$sel:percentEnabled:ConfigureLogsForPlaybackConfiguration' :: ConfigureLogsForPlaybackConfiguration -> Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PercentEnabled" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
percentEnabled),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"PlaybackConfigurationName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
playbackConfigurationName
              )
          ]
      )

instance
  Core.ToPath
    ConfigureLogsForPlaybackConfiguration
  where
  toPath :: ConfigureLogsForPlaybackConfiguration -> ByteString
toPath =
    ByteString -> ConfigureLogsForPlaybackConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/configureLogs/playbackConfiguration"

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

-- | /See:/ 'newConfigureLogsForPlaybackConfigurationResponse' smart constructor.
data ConfigureLogsForPlaybackConfigurationResponse = ConfigureLogsForPlaybackConfigurationResponse'
  { -- | The name of the playback configuration.
    ConfigureLogsForPlaybackConfigurationResponse -> Maybe Text
playbackConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | The percentage of session logs that MediaTailor sends to your Cloudwatch
    -- Logs account.
    ConfigureLogsForPlaybackConfigurationResponse -> Maybe Int
percentEnabled :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    ConfigureLogsForPlaybackConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ConfigureLogsForPlaybackConfigurationResponse
-> ConfigureLogsForPlaybackConfigurationResponse -> Bool
(ConfigureLogsForPlaybackConfigurationResponse
 -> ConfigureLogsForPlaybackConfigurationResponse -> Bool)
-> (ConfigureLogsForPlaybackConfigurationResponse
    -> ConfigureLogsForPlaybackConfigurationResponse -> Bool)
-> Eq ConfigureLogsForPlaybackConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigureLogsForPlaybackConfigurationResponse
-> ConfigureLogsForPlaybackConfigurationResponse -> Bool
$c/= :: ConfigureLogsForPlaybackConfigurationResponse
-> ConfigureLogsForPlaybackConfigurationResponse -> Bool
== :: ConfigureLogsForPlaybackConfigurationResponse
-> ConfigureLogsForPlaybackConfigurationResponse -> Bool
$c== :: ConfigureLogsForPlaybackConfigurationResponse
-> ConfigureLogsForPlaybackConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [ConfigureLogsForPlaybackConfigurationResponse]
ReadPrec ConfigureLogsForPlaybackConfigurationResponse
Int -> ReadS ConfigureLogsForPlaybackConfigurationResponse
ReadS [ConfigureLogsForPlaybackConfigurationResponse]
(Int -> ReadS ConfigureLogsForPlaybackConfigurationResponse)
-> ReadS [ConfigureLogsForPlaybackConfigurationResponse]
-> ReadPrec ConfigureLogsForPlaybackConfigurationResponse
-> ReadPrec [ConfigureLogsForPlaybackConfigurationResponse]
-> Read ConfigureLogsForPlaybackConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigureLogsForPlaybackConfigurationResponse]
$creadListPrec :: ReadPrec [ConfigureLogsForPlaybackConfigurationResponse]
readPrec :: ReadPrec ConfigureLogsForPlaybackConfigurationResponse
$creadPrec :: ReadPrec ConfigureLogsForPlaybackConfigurationResponse
readList :: ReadS [ConfigureLogsForPlaybackConfigurationResponse]
$creadList :: ReadS [ConfigureLogsForPlaybackConfigurationResponse]
readsPrec :: Int -> ReadS ConfigureLogsForPlaybackConfigurationResponse
$creadsPrec :: Int -> ReadS ConfigureLogsForPlaybackConfigurationResponse
Prelude.Read, Int -> ConfigureLogsForPlaybackConfigurationResponse -> ShowS
[ConfigureLogsForPlaybackConfigurationResponse] -> ShowS
ConfigureLogsForPlaybackConfigurationResponse -> String
(Int -> ConfigureLogsForPlaybackConfigurationResponse -> ShowS)
-> (ConfigureLogsForPlaybackConfigurationResponse -> String)
-> ([ConfigureLogsForPlaybackConfigurationResponse] -> ShowS)
-> Show ConfigureLogsForPlaybackConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigureLogsForPlaybackConfigurationResponse] -> ShowS
$cshowList :: [ConfigureLogsForPlaybackConfigurationResponse] -> ShowS
show :: ConfigureLogsForPlaybackConfigurationResponse -> String
$cshow :: ConfigureLogsForPlaybackConfigurationResponse -> String
showsPrec :: Int -> ConfigureLogsForPlaybackConfigurationResponse -> ShowS
$cshowsPrec :: Int -> ConfigureLogsForPlaybackConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 ConfigureLogsForPlaybackConfigurationResponse
 -> Rep ConfigureLogsForPlaybackConfigurationResponse x)
-> (forall x.
    Rep ConfigureLogsForPlaybackConfigurationResponse x
    -> ConfigureLogsForPlaybackConfigurationResponse)
-> Generic ConfigureLogsForPlaybackConfigurationResponse
forall x.
Rep ConfigureLogsForPlaybackConfigurationResponse x
-> ConfigureLogsForPlaybackConfigurationResponse
forall x.
ConfigureLogsForPlaybackConfigurationResponse
-> Rep ConfigureLogsForPlaybackConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigureLogsForPlaybackConfigurationResponse x
-> ConfigureLogsForPlaybackConfigurationResponse
$cfrom :: forall x.
ConfigureLogsForPlaybackConfigurationResponse
-> Rep ConfigureLogsForPlaybackConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'ConfigureLogsForPlaybackConfigurationResponse' 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:
--
-- 'playbackConfigurationName', 'configureLogsForPlaybackConfigurationResponse_playbackConfigurationName' - The name of the playback configuration.
--
-- 'percentEnabled', 'configureLogsForPlaybackConfigurationResponse_percentEnabled' - The percentage of session logs that MediaTailor sends to your Cloudwatch
-- Logs account.
--
-- 'httpStatus', 'configureLogsForPlaybackConfigurationResponse_httpStatus' - The response's http status code.
newConfigureLogsForPlaybackConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ConfigureLogsForPlaybackConfigurationResponse
newConfigureLogsForPlaybackConfigurationResponse :: Int -> ConfigureLogsForPlaybackConfigurationResponse
newConfigureLogsForPlaybackConfigurationResponse
  Int
pHttpStatus_ =
    ConfigureLogsForPlaybackConfigurationResponse' :: Maybe Text
-> Maybe Int
-> Int
-> ConfigureLogsForPlaybackConfigurationResponse
ConfigureLogsForPlaybackConfigurationResponse'
      { $sel:playbackConfigurationName:ConfigureLogsForPlaybackConfigurationResponse' :: Maybe Text
playbackConfigurationName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:percentEnabled:ConfigureLogsForPlaybackConfigurationResponse' :: Maybe Int
percentEnabled =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ConfigureLogsForPlaybackConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The name of the playback configuration.
configureLogsForPlaybackConfigurationResponse_playbackConfigurationName :: Lens.Lens' ConfigureLogsForPlaybackConfigurationResponse (Prelude.Maybe Prelude.Text)
configureLogsForPlaybackConfigurationResponse_playbackConfigurationName :: (Maybe Text -> f (Maybe Text))
-> ConfigureLogsForPlaybackConfigurationResponse
-> f ConfigureLogsForPlaybackConfigurationResponse
configureLogsForPlaybackConfigurationResponse_playbackConfigurationName = (ConfigureLogsForPlaybackConfigurationResponse -> Maybe Text)
-> (ConfigureLogsForPlaybackConfigurationResponse
    -> Maybe Text -> ConfigureLogsForPlaybackConfigurationResponse)
-> Lens
     ConfigureLogsForPlaybackConfigurationResponse
     ConfigureLogsForPlaybackConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigureLogsForPlaybackConfigurationResponse' {Maybe Text
playbackConfigurationName :: Maybe Text
$sel:playbackConfigurationName:ConfigureLogsForPlaybackConfigurationResponse' :: ConfigureLogsForPlaybackConfigurationResponse -> Maybe Text
playbackConfigurationName} -> Maybe Text
playbackConfigurationName) (\s :: ConfigureLogsForPlaybackConfigurationResponse
s@ConfigureLogsForPlaybackConfigurationResponse' {} Maybe Text
a -> ConfigureLogsForPlaybackConfigurationResponse
s {$sel:playbackConfigurationName:ConfigureLogsForPlaybackConfigurationResponse' :: Maybe Text
playbackConfigurationName = Maybe Text
a} :: ConfigureLogsForPlaybackConfigurationResponse)

-- | The percentage of session logs that MediaTailor sends to your Cloudwatch
-- Logs account.
configureLogsForPlaybackConfigurationResponse_percentEnabled :: Lens.Lens' ConfigureLogsForPlaybackConfigurationResponse (Prelude.Maybe Prelude.Int)
configureLogsForPlaybackConfigurationResponse_percentEnabled :: (Maybe Int -> f (Maybe Int))
-> ConfigureLogsForPlaybackConfigurationResponse
-> f ConfigureLogsForPlaybackConfigurationResponse
configureLogsForPlaybackConfigurationResponse_percentEnabled = (ConfigureLogsForPlaybackConfigurationResponse -> Maybe Int)
-> (ConfigureLogsForPlaybackConfigurationResponse
    -> Maybe Int -> ConfigureLogsForPlaybackConfigurationResponse)
-> Lens
     ConfigureLogsForPlaybackConfigurationResponse
     ConfigureLogsForPlaybackConfigurationResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigureLogsForPlaybackConfigurationResponse' {Maybe Int
percentEnabled :: Maybe Int
$sel:percentEnabled:ConfigureLogsForPlaybackConfigurationResponse' :: ConfigureLogsForPlaybackConfigurationResponse -> Maybe Int
percentEnabled} -> Maybe Int
percentEnabled) (\s :: ConfigureLogsForPlaybackConfigurationResponse
s@ConfigureLogsForPlaybackConfigurationResponse' {} Maybe Int
a -> ConfigureLogsForPlaybackConfigurationResponse
s {$sel:percentEnabled:ConfigureLogsForPlaybackConfigurationResponse' :: Maybe Int
percentEnabled = Maybe Int
a} :: ConfigureLogsForPlaybackConfigurationResponse)

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

instance
  Prelude.NFData
    ConfigureLogsForPlaybackConfigurationResponse