{-# 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.XRay.CreateSamplingRule
-- 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 rule to control sampling behavior for instrumented
-- applications. Services retrieve rules with
-- <https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html GetSamplingRules>,
-- and evaluate each rule in ascending order of /priority/ for each
-- request. If a rule matches, the service records a trace, borrowing it
-- from the reservoir size. After 10 seconds, the service reports back to
-- X-Ray with
-- <https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html GetSamplingTargets>
-- to get updated versions of each in-use rule. The updated rule contains a
-- trace quota that the service can use instead of borrowing from the
-- reservoir.
module Amazonka.XRay.CreateSamplingRule
  ( -- * Creating a Request
    CreateSamplingRule (..),
    newCreateSamplingRule,

    -- * Request Lenses
    createSamplingRule_tags,
    createSamplingRule_samplingRule,

    -- * Destructuring the Response
    CreateSamplingRuleResponse (..),
    newCreateSamplingRuleResponse,

    -- * Response Lenses
    createSamplingRuleResponse_samplingRuleRecord,
    createSamplingRuleResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateSamplingRule' smart constructor.
data CreateSamplingRule = CreateSamplingRule'
  { -- | A map that contains one or more tag keys and tag values to attach to an
    -- X-Ray sampling rule. For more information about ways to use tags, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
    -- in the /Amazon Web Services General Reference/.
    --
    -- The following restrictions apply to tags:
    --
    -- -   Maximum number of user-applied tags per resource: 50
    --
    -- -   Maximum tag key length: 128 Unicode characters
    --
    -- -   Maximum tag value length: 256 Unicode characters
    --
    -- -   Valid values for key and value: a-z, A-Z, 0-9, space, and the
    --     following characters: _ . : \/ = + - and \@
    --
    -- -   Tag keys and values are case sensitive.
    --
    -- -   Don\'t use @aws:@ as a prefix for keys; it\'s reserved for Amazon
    --     Web Services use.
    CreateSamplingRule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The rule definition.
    CreateSamplingRule -> SamplingRule
samplingRule :: SamplingRule
  }
  deriving (CreateSamplingRule -> CreateSamplingRule -> Bool
(CreateSamplingRule -> CreateSamplingRule -> Bool)
-> (CreateSamplingRule -> CreateSamplingRule -> Bool)
-> Eq CreateSamplingRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSamplingRule -> CreateSamplingRule -> Bool
$c/= :: CreateSamplingRule -> CreateSamplingRule -> Bool
== :: CreateSamplingRule -> CreateSamplingRule -> Bool
$c== :: CreateSamplingRule -> CreateSamplingRule -> Bool
Prelude.Eq, ReadPrec [CreateSamplingRule]
ReadPrec CreateSamplingRule
Int -> ReadS CreateSamplingRule
ReadS [CreateSamplingRule]
(Int -> ReadS CreateSamplingRule)
-> ReadS [CreateSamplingRule]
-> ReadPrec CreateSamplingRule
-> ReadPrec [CreateSamplingRule]
-> Read CreateSamplingRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSamplingRule]
$creadListPrec :: ReadPrec [CreateSamplingRule]
readPrec :: ReadPrec CreateSamplingRule
$creadPrec :: ReadPrec CreateSamplingRule
readList :: ReadS [CreateSamplingRule]
$creadList :: ReadS [CreateSamplingRule]
readsPrec :: Int -> ReadS CreateSamplingRule
$creadsPrec :: Int -> ReadS CreateSamplingRule
Prelude.Read, Int -> CreateSamplingRule -> ShowS
[CreateSamplingRule] -> ShowS
CreateSamplingRule -> String
(Int -> CreateSamplingRule -> ShowS)
-> (CreateSamplingRule -> String)
-> ([CreateSamplingRule] -> ShowS)
-> Show CreateSamplingRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSamplingRule] -> ShowS
$cshowList :: [CreateSamplingRule] -> ShowS
show :: CreateSamplingRule -> String
$cshow :: CreateSamplingRule -> String
showsPrec :: Int -> CreateSamplingRule -> ShowS
$cshowsPrec :: Int -> CreateSamplingRule -> ShowS
Prelude.Show, (forall x. CreateSamplingRule -> Rep CreateSamplingRule x)
-> (forall x. Rep CreateSamplingRule x -> CreateSamplingRule)
-> Generic CreateSamplingRule
forall x. Rep CreateSamplingRule x -> CreateSamplingRule
forall x. CreateSamplingRule -> Rep CreateSamplingRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSamplingRule x -> CreateSamplingRule
$cfrom :: forall x. CreateSamplingRule -> Rep CreateSamplingRule x
Prelude.Generic)

-- |
-- Create a value of 'CreateSamplingRule' 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:
--
-- 'tags', 'createSamplingRule_tags' - A map that contains one or more tag keys and tag values to attach to an
-- X-Ray sampling rule. For more information about ways to use tags, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference/.
--
-- The following restrictions apply to tags:
--
-- -   Maximum number of user-applied tags per resource: 50
--
-- -   Maximum tag key length: 128 Unicode characters
--
-- -   Maximum tag value length: 256 Unicode characters
--
-- -   Valid values for key and value: a-z, A-Z, 0-9, space, and the
--     following characters: _ . : \/ = + - and \@
--
-- -   Tag keys and values are case sensitive.
--
-- -   Don\'t use @aws:@ as a prefix for keys; it\'s reserved for Amazon
--     Web Services use.
--
-- 'samplingRule', 'createSamplingRule_samplingRule' - The rule definition.
newCreateSamplingRule ::
  -- | 'samplingRule'
  SamplingRule ->
  CreateSamplingRule
newCreateSamplingRule :: SamplingRule -> CreateSamplingRule
newCreateSamplingRule SamplingRule
pSamplingRule_ =
  CreateSamplingRule' :: Maybe [Tag] -> SamplingRule -> CreateSamplingRule
CreateSamplingRule'
    { $sel:tags:CreateSamplingRule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:samplingRule:CreateSamplingRule' :: SamplingRule
samplingRule = SamplingRule
pSamplingRule_
    }

-- | A map that contains one or more tag keys and tag values to attach to an
-- X-Ray sampling rule. For more information about ways to use tags, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference/.
--
-- The following restrictions apply to tags:
--
-- -   Maximum number of user-applied tags per resource: 50
--
-- -   Maximum tag key length: 128 Unicode characters
--
-- -   Maximum tag value length: 256 Unicode characters
--
-- -   Valid values for key and value: a-z, A-Z, 0-9, space, and the
--     following characters: _ . : \/ = + - and \@
--
-- -   Tag keys and values are case sensitive.
--
-- -   Don\'t use @aws:@ as a prefix for keys; it\'s reserved for Amazon
--     Web Services use.
createSamplingRule_tags :: Lens.Lens' CreateSamplingRule (Prelude.Maybe [Tag])
createSamplingRule_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateSamplingRule -> f CreateSamplingRule
createSamplingRule_tags = (CreateSamplingRule -> Maybe [Tag])
-> (CreateSamplingRule -> Maybe [Tag] -> CreateSamplingRule)
-> Lens
     CreateSamplingRule CreateSamplingRule (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSamplingRule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateSamplingRule' :: CreateSamplingRule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateSamplingRule
s@CreateSamplingRule' {} Maybe [Tag]
a -> CreateSamplingRule
s {$sel:tags:CreateSamplingRule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateSamplingRule) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateSamplingRule -> f CreateSamplingRule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateSamplingRule
-> f CreateSamplingRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The rule definition.
createSamplingRule_samplingRule :: Lens.Lens' CreateSamplingRule SamplingRule
createSamplingRule_samplingRule :: (SamplingRule -> f SamplingRule)
-> CreateSamplingRule -> f CreateSamplingRule
createSamplingRule_samplingRule = (CreateSamplingRule -> SamplingRule)
-> (CreateSamplingRule -> SamplingRule -> CreateSamplingRule)
-> Lens
     CreateSamplingRule CreateSamplingRule SamplingRule SamplingRule
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSamplingRule' {SamplingRule
samplingRule :: SamplingRule
$sel:samplingRule:CreateSamplingRule' :: CreateSamplingRule -> SamplingRule
samplingRule} -> SamplingRule
samplingRule) (\s :: CreateSamplingRule
s@CreateSamplingRule' {} SamplingRule
a -> CreateSamplingRule
s {$sel:samplingRule:CreateSamplingRule' :: SamplingRule
samplingRule = SamplingRule
a} :: CreateSamplingRule)

instance Core.AWSRequest CreateSamplingRule where
  type
    AWSResponse CreateSamplingRule =
      CreateSamplingRuleResponse
  request :: CreateSamplingRule -> Request CreateSamplingRule
request = Service -> CreateSamplingRule -> Request CreateSamplingRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateSamplingRule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSamplingRule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateSamplingRule))
-> Logger
-> Service
-> Proxy CreateSamplingRule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSamplingRule)))
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 SamplingRuleRecord -> Int -> CreateSamplingRuleResponse
CreateSamplingRuleResponse'
            (Maybe SamplingRuleRecord -> Int -> CreateSamplingRuleResponse)
-> Either String (Maybe SamplingRuleRecord)
-> Either String (Int -> CreateSamplingRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Key -> Either String (Maybe SamplingRuleRecord)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"SamplingRuleRecord")
            Either String (Int -> CreateSamplingRuleResponse)
-> Either String Int -> Either String CreateSamplingRuleResponse
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 CreateSamplingRule

instance Prelude.NFData CreateSamplingRule

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

instance Core.ToJSON CreateSamplingRule where
  toJSON :: CreateSamplingRule -> Value
toJSON CreateSamplingRule' {Maybe [Tag]
SamplingRule
samplingRule :: SamplingRule
tags :: Maybe [Tag]
$sel:samplingRule:CreateSamplingRule' :: CreateSamplingRule -> SamplingRule
$sel:tags:CreateSamplingRule' :: CreateSamplingRule -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Tags" Key -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Key
"SamplingRule" Key -> SamplingRule -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= SamplingRule
samplingRule)
          ]
      )

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

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

-- | /See:/ 'newCreateSamplingRuleResponse' smart constructor.
data CreateSamplingRuleResponse = CreateSamplingRuleResponse'
  { -- | The saved rule definition and metadata.
    CreateSamplingRuleResponse -> Maybe SamplingRuleRecord
samplingRuleRecord :: Prelude.Maybe SamplingRuleRecord,
    -- | The response's http status code.
    CreateSamplingRuleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool
(CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool)
-> (CreateSamplingRuleResponse
    -> CreateSamplingRuleResponse -> Bool)
-> Eq CreateSamplingRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool
$c/= :: CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool
== :: CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool
$c== :: CreateSamplingRuleResponse -> CreateSamplingRuleResponse -> Bool
Prelude.Eq, ReadPrec [CreateSamplingRuleResponse]
ReadPrec CreateSamplingRuleResponse
Int -> ReadS CreateSamplingRuleResponse
ReadS [CreateSamplingRuleResponse]
(Int -> ReadS CreateSamplingRuleResponse)
-> ReadS [CreateSamplingRuleResponse]
-> ReadPrec CreateSamplingRuleResponse
-> ReadPrec [CreateSamplingRuleResponse]
-> Read CreateSamplingRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSamplingRuleResponse]
$creadListPrec :: ReadPrec [CreateSamplingRuleResponse]
readPrec :: ReadPrec CreateSamplingRuleResponse
$creadPrec :: ReadPrec CreateSamplingRuleResponse
readList :: ReadS [CreateSamplingRuleResponse]
$creadList :: ReadS [CreateSamplingRuleResponse]
readsPrec :: Int -> ReadS CreateSamplingRuleResponse
$creadsPrec :: Int -> ReadS CreateSamplingRuleResponse
Prelude.Read, Int -> CreateSamplingRuleResponse -> ShowS
[CreateSamplingRuleResponse] -> ShowS
CreateSamplingRuleResponse -> String
(Int -> CreateSamplingRuleResponse -> ShowS)
-> (CreateSamplingRuleResponse -> String)
-> ([CreateSamplingRuleResponse] -> ShowS)
-> Show CreateSamplingRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSamplingRuleResponse] -> ShowS
$cshowList :: [CreateSamplingRuleResponse] -> ShowS
show :: CreateSamplingRuleResponse -> String
$cshow :: CreateSamplingRuleResponse -> String
showsPrec :: Int -> CreateSamplingRuleResponse -> ShowS
$cshowsPrec :: Int -> CreateSamplingRuleResponse -> ShowS
Prelude.Show, (forall x.
 CreateSamplingRuleResponse -> Rep CreateSamplingRuleResponse x)
-> (forall x.
    Rep CreateSamplingRuleResponse x -> CreateSamplingRuleResponse)
-> Generic CreateSamplingRuleResponse
forall x.
Rep CreateSamplingRuleResponse x -> CreateSamplingRuleResponse
forall x.
CreateSamplingRuleResponse -> Rep CreateSamplingRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSamplingRuleResponse x -> CreateSamplingRuleResponse
$cfrom :: forall x.
CreateSamplingRuleResponse -> Rep CreateSamplingRuleResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSamplingRuleResponse' 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:
--
-- 'samplingRuleRecord', 'createSamplingRuleResponse_samplingRuleRecord' - The saved rule definition and metadata.
--
-- 'httpStatus', 'createSamplingRuleResponse_httpStatus' - The response's http status code.
newCreateSamplingRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSamplingRuleResponse
newCreateSamplingRuleResponse :: Int -> CreateSamplingRuleResponse
newCreateSamplingRuleResponse Int
pHttpStatus_ =
  CreateSamplingRuleResponse' :: Maybe SamplingRuleRecord -> Int -> CreateSamplingRuleResponse
CreateSamplingRuleResponse'
    { $sel:samplingRuleRecord:CreateSamplingRuleResponse' :: Maybe SamplingRuleRecord
samplingRuleRecord =
        Maybe SamplingRuleRecord
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSamplingRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The saved rule definition and metadata.
createSamplingRuleResponse_samplingRuleRecord :: Lens.Lens' CreateSamplingRuleResponse (Prelude.Maybe SamplingRuleRecord)
createSamplingRuleResponse_samplingRuleRecord :: (Maybe SamplingRuleRecord -> f (Maybe SamplingRuleRecord))
-> CreateSamplingRuleResponse -> f CreateSamplingRuleResponse
createSamplingRuleResponse_samplingRuleRecord = (CreateSamplingRuleResponse -> Maybe SamplingRuleRecord)
-> (CreateSamplingRuleResponse
    -> Maybe SamplingRuleRecord -> CreateSamplingRuleResponse)
-> Lens
     CreateSamplingRuleResponse
     CreateSamplingRuleResponse
     (Maybe SamplingRuleRecord)
     (Maybe SamplingRuleRecord)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSamplingRuleResponse' {Maybe SamplingRuleRecord
samplingRuleRecord :: Maybe SamplingRuleRecord
$sel:samplingRuleRecord:CreateSamplingRuleResponse' :: CreateSamplingRuleResponse -> Maybe SamplingRuleRecord
samplingRuleRecord} -> Maybe SamplingRuleRecord
samplingRuleRecord) (\s :: CreateSamplingRuleResponse
s@CreateSamplingRuleResponse' {} Maybe SamplingRuleRecord
a -> CreateSamplingRuleResponse
s {$sel:samplingRuleRecord:CreateSamplingRuleResponse' :: Maybe SamplingRuleRecord
samplingRuleRecord = Maybe SamplingRuleRecord
a} :: CreateSamplingRuleResponse)

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

instance Prelude.NFData CreateSamplingRuleResponse