{-# 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.CloudFront.CreateRealtimeLogConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a real-time log configuration.
--
-- After you create a real-time log configuration, you can attach it to one
-- or more cache behaviors to send real-time log data to the specified
-- Amazon Kinesis data stream.
--
-- For more information about real-time log configurations, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html Real-time logs>
-- in the /Amazon CloudFront Developer Guide/.
module Amazonka.CloudFront.CreateRealtimeLogConfig
  ( -- * Creating a Request
    CreateRealtimeLogConfig (..),
    newCreateRealtimeLogConfig,

    -- * Request Lenses
    createRealtimeLogConfig_endPoints,
    createRealtimeLogConfig_fields,
    createRealtimeLogConfig_name,
    createRealtimeLogConfig_samplingRate,

    -- * Destructuring the Response
    CreateRealtimeLogConfigResponse (..),
    newCreateRealtimeLogConfigResponse,

    -- * Response Lenses
    createRealtimeLogConfigResponse_realtimeLogConfig,
    createRealtimeLogConfigResponse_httpStatus,
  )
where

import Amazonka.CloudFront.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateRealtimeLogConfig' smart constructor.
data CreateRealtimeLogConfig = CreateRealtimeLogConfig'
  { -- | Contains information about the Amazon Kinesis data stream where you are
    -- sending real-time log data.
    CreateRealtimeLogConfig -> [EndPoint]
endPoints :: [EndPoint],
    -- | A list of fields to include in each real-time log record.
    --
    -- For more information about fields, see
    -- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields Real-time log configuration fields>
    -- in the /Amazon CloudFront Developer Guide/.
    CreateRealtimeLogConfig -> [Text]
fields :: [Prelude.Text],
    -- | A unique name to identify this real-time log configuration.
    CreateRealtimeLogConfig -> Text
name :: Prelude.Text,
    -- | The sampling rate for this real-time log configuration. The sampling
    -- rate determines the percentage of viewer requests that are represented
    -- in the real-time log data. You must provide an integer between 1 and
    -- 100, inclusive.
    CreateRealtimeLogConfig -> Integer
samplingRate :: Prelude.Integer
  }
  deriving (CreateRealtimeLogConfig -> CreateRealtimeLogConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRealtimeLogConfig -> CreateRealtimeLogConfig -> Bool
$c/= :: CreateRealtimeLogConfig -> CreateRealtimeLogConfig -> Bool
== :: CreateRealtimeLogConfig -> CreateRealtimeLogConfig -> Bool
$c== :: CreateRealtimeLogConfig -> CreateRealtimeLogConfig -> Bool
Prelude.Eq, ReadPrec [CreateRealtimeLogConfig]
ReadPrec CreateRealtimeLogConfig
Int -> ReadS CreateRealtimeLogConfig
ReadS [CreateRealtimeLogConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRealtimeLogConfig]
$creadListPrec :: ReadPrec [CreateRealtimeLogConfig]
readPrec :: ReadPrec CreateRealtimeLogConfig
$creadPrec :: ReadPrec CreateRealtimeLogConfig
readList :: ReadS [CreateRealtimeLogConfig]
$creadList :: ReadS [CreateRealtimeLogConfig]
readsPrec :: Int -> ReadS CreateRealtimeLogConfig
$creadsPrec :: Int -> ReadS CreateRealtimeLogConfig
Prelude.Read, Int -> CreateRealtimeLogConfig -> ShowS
[CreateRealtimeLogConfig] -> ShowS
CreateRealtimeLogConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRealtimeLogConfig] -> ShowS
$cshowList :: [CreateRealtimeLogConfig] -> ShowS
show :: CreateRealtimeLogConfig -> String
$cshow :: CreateRealtimeLogConfig -> String
showsPrec :: Int -> CreateRealtimeLogConfig -> ShowS
$cshowsPrec :: Int -> CreateRealtimeLogConfig -> ShowS
Prelude.Show, forall x. Rep CreateRealtimeLogConfig x -> CreateRealtimeLogConfig
forall x. CreateRealtimeLogConfig -> Rep CreateRealtimeLogConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRealtimeLogConfig x -> CreateRealtimeLogConfig
$cfrom :: forall x. CreateRealtimeLogConfig -> Rep CreateRealtimeLogConfig x
Prelude.Generic)

-- |
-- Create a value of 'CreateRealtimeLogConfig' 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:
--
-- 'endPoints', 'createRealtimeLogConfig_endPoints' - Contains information about the Amazon Kinesis data stream where you are
-- sending real-time log data.
--
-- 'fields', 'createRealtimeLogConfig_fields' - A list of fields to include in each real-time log record.
--
-- For more information about fields, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields Real-time log configuration fields>
-- in the /Amazon CloudFront Developer Guide/.
--
-- 'name', 'createRealtimeLogConfig_name' - A unique name to identify this real-time log configuration.
--
-- 'samplingRate', 'createRealtimeLogConfig_samplingRate' - The sampling rate for this real-time log configuration. The sampling
-- rate determines the percentage of viewer requests that are represented
-- in the real-time log data. You must provide an integer between 1 and
-- 100, inclusive.
newCreateRealtimeLogConfig ::
  -- | 'name'
  Prelude.Text ->
  -- | 'samplingRate'
  Prelude.Integer ->
  CreateRealtimeLogConfig
newCreateRealtimeLogConfig :: Text -> Integer -> CreateRealtimeLogConfig
newCreateRealtimeLogConfig Text
pName_ Integer
pSamplingRate_ =
  CreateRealtimeLogConfig'
    { $sel:endPoints:CreateRealtimeLogConfig' :: [EndPoint]
endPoints =
        forall a. Monoid a => a
Prelude.mempty,
      $sel:fields:CreateRealtimeLogConfig' :: [Text]
fields = forall a. Monoid a => a
Prelude.mempty,
      $sel:name:CreateRealtimeLogConfig' :: Text
name = Text
pName_,
      $sel:samplingRate:CreateRealtimeLogConfig' :: Integer
samplingRate = Integer
pSamplingRate_
    }

-- | Contains information about the Amazon Kinesis data stream where you are
-- sending real-time log data.
createRealtimeLogConfig_endPoints :: Lens.Lens' CreateRealtimeLogConfig [EndPoint]
createRealtimeLogConfig_endPoints :: Lens' CreateRealtimeLogConfig [EndPoint]
createRealtimeLogConfig_endPoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRealtimeLogConfig' {[EndPoint]
endPoints :: [EndPoint]
$sel:endPoints:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [EndPoint]
endPoints} -> [EndPoint]
endPoints) (\s :: CreateRealtimeLogConfig
s@CreateRealtimeLogConfig' {} [EndPoint]
a -> CreateRealtimeLogConfig
s {$sel:endPoints:CreateRealtimeLogConfig' :: [EndPoint]
endPoints = [EndPoint]
a} :: CreateRealtimeLogConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of fields to include in each real-time log record.
--
-- For more information about fields, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields Real-time log configuration fields>
-- in the /Amazon CloudFront Developer Guide/.
createRealtimeLogConfig_fields :: Lens.Lens' CreateRealtimeLogConfig [Prelude.Text]
createRealtimeLogConfig_fields :: Lens' CreateRealtimeLogConfig [Text]
createRealtimeLogConfig_fields = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRealtimeLogConfig' {[Text]
fields :: [Text]
$sel:fields:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [Text]
fields} -> [Text]
fields) (\s :: CreateRealtimeLogConfig
s@CreateRealtimeLogConfig' {} [Text]
a -> CreateRealtimeLogConfig
s {$sel:fields:CreateRealtimeLogConfig' :: [Text]
fields = [Text]
a} :: CreateRealtimeLogConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique name to identify this real-time log configuration.
createRealtimeLogConfig_name :: Lens.Lens' CreateRealtimeLogConfig Prelude.Text
createRealtimeLogConfig_name :: Lens' CreateRealtimeLogConfig Text
createRealtimeLogConfig_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRealtimeLogConfig' {Text
name :: Text
$sel:name:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Text
name} -> Text
name) (\s :: CreateRealtimeLogConfig
s@CreateRealtimeLogConfig' {} Text
a -> CreateRealtimeLogConfig
s {$sel:name:CreateRealtimeLogConfig' :: Text
name = Text
a} :: CreateRealtimeLogConfig)

-- | The sampling rate for this real-time log configuration. The sampling
-- rate determines the percentage of viewer requests that are represented
-- in the real-time log data. You must provide an integer between 1 and
-- 100, inclusive.
createRealtimeLogConfig_samplingRate :: Lens.Lens' CreateRealtimeLogConfig Prelude.Integer
createRealtimeLogConfig_samplingRate :: Lens' CreateRealtimeLogConfig Integer
createRealtimeLogConfig_samplingRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRealtimeLogConfig' {Integer
samplingRate :: Integer
$sel:samplingRate:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Integer
samplingRate} -> Integer
samplingRate) (\s :: CreateRealtimeLogConfig
s@CreateRealtimeLogConfig' {} Integer
a -> CreateRealtimeLogConfig
s {$sel:samplingRate:CreateRealtimeLogConfig' :: Integer
samplingRate = Integer
a} :: CreateRealtimeLogConfig)

instance Core.AWSRequest CreateRealtimeLogConfig where
  type
    AWSResponse CreateRealtimeLogConfig =
      CreateRealtimeLogConfigResponse
  request :: (Service -> Service)
-> CreateRealtimeLogConfig -> Request CreateRealtimeLogConfig
request Service -> Service
overrides =
    forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateRealtimeLogConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRealtimeLogConfig)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe RealtimeLogConfig -> Int -> CreateRealtimeLogConfigResponse
CreateRealtimeLogConfigResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"RealtimeLogConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateRealtimeLogConfig where
  hashWithSalt :: Int -> CreateRealtimeLogConfig -> Int
hashWithSalt Int
_salt CreateRealtimeLogConfig' {Integer
[Text]
[EndPoint]
Text
samplingRate :: Integer
name :: Text
fields :: [Text]
endPoints :: [EndPoint]
$sel:samplingRate:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Integer
$sel:name:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Text
$sel:fields:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [Text]
$sel:endPoints:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [EndPoint]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [EndPoint]
endPoints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
fields
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
samplingRate

instance Prelude.NFData CreateRealtimeLogConfig where
  rnf :: CreateRealtimeLogConfig -> ()
rnf CreateRealtimeLogConfig' {Integer
[Text]
[EndPoint]
Text
samplingRate :: Integer
name :: Text
fields :: [Text]
endPoints :: [EndPoint]
$sel:samplingRate:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Integer
$sel:name:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Text
$sel:fields:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [Text]
$sel:endPoints:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [EndPoint]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf [EndPoint]
endPoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
fields
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
samplingRate

instance Data.ToElement CreateRealtimeLogConfig where
  toElement :: CreateRealtimeLogConfig -> Element
toElement =
    forall a. ToXML a => Name -> a -> Element
Data.mkElement
      Name
"{http://cloudfront.amazonaws.com/doc/2020-05-31/}CreateRealtimeLogConfigRequest"

instance Data.ToHeaders CreateRealtimeLogConfig where
  toHeaders :: CreateRealtimeLogConfig -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath CreateRealtimeLogConfig where
  toPath :: CreateRealtimeLogConfig -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/realtime-log-config"

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

instance Data.ToXML CreateRealtimeLogConfig where
  toXML :: CreateRealtimeLogConfig -> XML
toXML CreateRealtimeLogConfig' {Integer
[Text]
[EndPoint]
Text
samplingRate :: Integer
name :: Text
fields :: [Text]
endPoints :: [EndPoint]
$sel:samplingRate:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Integer
$sel:name:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> Text
$sel:fields:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [Text]
$sel:endPoints:CreateRealtimeLogConfig' :: CreateRealtimeLogConfig -> [EndPoint]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ Name
"EndPoints"
          forall a. ToXML a => Name -> a -> XML
Data.@= forall a. (IsList a, ToXML (Item a)) => Name -> a -> XML
Data.toXMLList Name
"member" [EndPoint]
endPoints,
        Name
"Fields" forall a. ToXML a => Name -> a -> XML
Data.@= forall a. (IsList a, ToXML (Item a)) => Name -> a -> XML
Data.toXMLList Name
"Field" [Text]
fields,
        Name
"Name" forall a. ToXML a => Name -> a -> XML
Data.@= Text
name,
        Name
"SamplingRate" forall a. ToXML a => Name -> a -> XML
Data.@= Integer
samplingRate
      ]

-- | /See:/ 'newCreateRealtimeLogConfigResponse' smart constructor.
data CreateRealtimeLogConfigResponse = CreateRealtimeLogConfigResponse'
  { -- | A real-time log configuration.
    CreateRealtimeLogConfigResponse -> Maybe RealtimeLogConfig
realtimeLogConfig :: Prelude.Maybe RealtimeLogConfig,
    -- | The response's http status code.
    CreateRealtimeLogConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRealtimeLogConfigResponse
-> CreateRealtimeLogConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRealtimeLogConfigResponse
-> CreateRealtimeLogConfigResponse -> Bool
$c/= :: CreateRealtimeLogConfigResponse
-> CreateRealtimeLogConfigResponse -> Bool
== :: CreateRealtimeLogConfigResponse
-> CreateRealtimeLogConfigResponse -> Bool
$c== :: CreateRealtimeLogConfigResponse
-> CreateRealtimeLogConfigResponse -> Bool
Prelude.Eq, ReadPrec [CreateRealtimeLogConfigResponse]
ReadPrec CreateRealtimeLogConfigResponse
Int -> ReadS CreateRealtimeLogConfigResponse
ReadS [CreateRealtimeLogConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRealtimeLogConfigResponse]
$creadListPrec :: ReadPrec [CreateRealtimeLogConfigResponse]
readPrec :: ReadPrec CreateRealtimeLogConfigResponse
$creadPrec :: ReadPrec CreateRealtimeLogConfigResponse
readList :: ReadS [CreateRealtimeLogConfigResponse]
$creadList :: ReadS [CreateRealtimeLogConfigResponse]
readsPrec :: Int -> ReadS CreateRealtimeLogConfigResponse
$creadsPrec :: Int -> ReadS CreateRealtimeLogConfigResponse
Prelude.Read, Int -> CreateRealtimeLogConfigResponse -> ShowS
[CreateRealtimeLogConfigResponse] -> ShowS
CreateRealtimeLogConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRealtimeLogConfigResponse] -> ShowS
$cshowList :: [CreateRealtimeLogConfigResponse] -> ShowS
show :: CreateRealtimeLogConfigResponse -> String
$cshow :: CreateRealtimeLogConfigResponse -> String
showsPrec :: Int -> CreateRealtimeLogConfigResponse -> ShowS
$cshowsPrec :: Int -> CreateRealtimeLogConfigResponse -> ShowS
Prelude.Show, forall x.
Rep CreateRealtimeLogConfigResponse x
-> CreateRealtimeLogConfigResponse
forall x.
CreateRealtimeLogConfigResponse
-> Rep CreateRealtimeLogConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRealtimeLogConfigResponse x
-> CreateRealtimeLogConfigResponse
$cfrom :: forall x.
CreateRealtimeLogConfigResponse
-> Rep CreateRealtimeLogConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRealtimeLogConfigResponse' 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:
--
-- 'realtimeLogConfig', 'createRealtimeLogConfigResponse_realtimeLogConfig' - A real-time log configuration.
--
-- 'httpStatus', 'createRealtimeLogConfigResponse_httpStatus' - The response's http status code.
newCreateRealtimeLogConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRealtimeLogConfigResponse
newCreateRealtimeLogConfigResponse :: Int -> CreateRealtimeLogConfigResponse
newCreateRealtimeLogConfigResponse Int
pHttpStatus_ =
  CreateRealtimeLogConfigResponse'
    { $sel:realtimeLogConfig:CreateRealtimeLogConfigResponse' :: Maybe RealtimeLogConfig
realtimeLogConfig =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRealtimeLogConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A real-time log configuration.
createRealtimeLogConfigResponse_realtimeLogConfig :: Lens.Lens' CreateRealtimeLogConfigResponse (Prelude.Maybe RealtimeLogConfig)
createRealtimeLogConfigResponse_realtimeLogConfig :: Lens' CreateRealtimeLogConfigResponse (Maybe RealtimeLogConfig)
createRealtimeLogConfigResponse_realtimeLogConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRealtimeLogConfigResponse' {Maybe RealtimeLogConfig
realtimeLogConfig :: Maybe RealtimeLogConfig
$sel:realtimeLogConfig:CreateRealtimeLogConfigResponse' :: CreateRealtimeLogConfigResponse -> Maybe RealtimeLogConfig
realtimeLogConfig} -> Maybe RealtimeLogConfig
realtimeLogConfig) (\s :: CreateRealtimeLogConfigResponse
s@CreateRealtimeLogConfigResponse' {} Maybe RealtimeLogConfig
a -> CreateRealtimeLogConfigResponse
s {$sel:realtimeLogConfig:CreateRealtimeLogConfigResponse' :: Maybe RealtimeLogConfig
realtimeLogConfig = Maybe RealtimeLogConfig
a} :: CreateRealtimeLogConfigResponse)

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

instance
  Prelude.NFData
    CreateRealtimeLogConfigResponse
  where
  rnf :: CreateRealtimeLogConfigResponse -> ()
rnf CreateRealtimeLogConfigResponse' {Int
Maybe RealtimeLogConfig
httpStatus :: Int
realtimeLogConfig :: Maybe RealtimeLogConfig
$sel:httpStatus:CreateRealtimeLogConfigResponse' :: CreateRealtimeLogConfigResponse -> Int
$sel:realtimeLogConfig:CreateRealtimeLogConfigResponse' :: CreateRealtimeLogConfigResponse -> Maybe RealtimeLogConfig
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe RealtimeLogConfig
realtimeLogConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus