{-# 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.SageMaker.CreateMonitoringSchedule
-- 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 schedule that regularly starts Amazon SageMaker Processing
-- Jobs to monitor the data captured for an Amazon SageMaker Endoint.
module Amazonka.SageMaker.CreateMonitoringSchedule
  ( -- * Creating a Request
    CreateMonitoringSchedule (..),
    newCreateMonitoringSchedule,

    -- * Request Lenses
    createMonitoringSchedule_tags,
    createMonitoringSchedule_monitoringScheduleName,
    createMonitoringSchedule_monitoringScheduleConfig,

    -- * Destructuring the Response
    CreateMonitoringScheduleResponse (..),
    newCreateMonitoringScheduleResponse,

    -- * Response Lenses
    createMonitoringScheduleResponse_httpStatus,
    createMonitoringScheduleResponse_monitoringScheduleArn,
  )
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.SageMaker.Types

-- | /See:/ 'newCreateMonitoringSchedule' smart constructor.
data CreateMonitoringSchedule = CreateMonitoringSchedule'
  { -- | (Optional) An array of key-value pairs. For more information, see
    -- <%20https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
    -- in the /Amazon Web Services Billing and Cost Management User Guide/.
    CreateMonitoringSchedule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the monitoring schedule. The name must be unique within an
    -- Amazon Web Services Region within an Amazon Web Services account.
    CreateMonitoringSchedule -> Text
monitoringScheduleName :: Prelude.Text,
    -- | The configuration object that specifies the monitoring schedule and
    -- defines the monitoring job.
    CreateMonitoringSchedule -> MonitoringScheduleConfig
monitoringScheduleConfig :: MonitoringScheduleConfig
  }
  deriving (CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool
(CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool)
-> (CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool)
-> Eq CreateMonitoringSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool
$c/= :: CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool
== :: CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool
$c== :: CreateMonitoringSchedule -> CreateMonitoringSchedule -> Bool
Prelude.Eq, ReadPrec [CreateMonitoringSchedule]
ReadPrec CreateMonitoringSchedule
Int -> ReadS CreateMonitoringSchedule
ReadS [CreateMonitoringSchedule]
(Int -> ReadS CreateMonitoringSchedule)
-> ReadS [CreateMonitoringSchedule]
-> ReadPrec CreateMonitoringSchedule
-> ReadPrec [CreateMonitoringSchedule]
-> Read CreateMonitoringSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMonitoringSchedule]
$creadListPrec :: ReadPrec [CreateMonitoringSchedule]
readPrec :: ReadPrec CreateMonitoringSchedule
$creadPrec :: ReadPrec CreateMonitoringSchedule
readList :: ReadS [CreateMonitoringSchedule]
$creadList :: ReadS [CreateMonitoringSchedule]
readsPrec :: Int -> ReadS CreateMonitoringSchedule
$creadsPrec :: Int -> ReadS CreateMonitoringSchedule
Prelude.Read, Int -> CreateMonitoringSchedule -> ShowS
[CreateMonitoringSchedule] -> ShowS
CreateMonitoringSchedule -> String
(Int -> CreateMonitoringSchedule -> ShowS)
-> (CreateMonitoringSchedule -> String)
-> ([CreateMonitoringSchedule] -> ShowS)
-> Show CreateMonitoringSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMonitoringSchedule] -> ShowS
$cshowList :: [CreateMonitoringSchedule] -> ShowS
show :: CreateMonitoringSchedule -> String
$cshow :: CreateMonitoringSchedule -> String
showsPrec :: Int -> CreateMonitoringSchedule -> ShowS
$cshowsPrec :: Int -> CreateMonitoringSchedule -> ShowS
Prelude.Show, (forall x.
 CreateMonitoringSchedule -> Rep CreateMonitoringSchedule x)
-> (forall x.
    Rep CreateMonitoringSchedule x -> CreateMonitoringSchedule)
-> Generic CreateMonitoringSchedule
forall x.
Rep CreateMonitoringSchedule x -> CreateMonitoringSchedule
forall x.
CreateMonitoringSchedule -> Rep CreateMonitoringSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMonitoringSchedule x -> CreateMonitoringSchedule
$cfrom :: forall x.
CreateMonitoringSchedule -> Rep CreateMonitoringSchedule x
Prelude.Generic)

-- |
-- Create a value of 'CreateMonitoringSchedule' 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', 'createMonitoringSchedule_tags' - (Optional) An array of key-value pairs. For more information, see
-- <%20https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
-- in the /Amazon Web Services Billing and Cost Management User Guide/.
--
-- 'monitoringScheduleName', 'createMonitoringSchedule_monitoringScheduleName' - The name of the monitoring schedule. The name must be unique within an
-- Amazon Web Services Region within an Amazon Web Services account.
--
-- 'monitoringScheduleConfig', 'createMonitoringSchedule_monitoringScheduleConfig' - The configuration object that specifies the monitoring schedule and
-- defines the monitoring job.
newCreateMonitoringSchedule ::
  -- | 'monitoringScheduleName'
  Prelude.Text ->
  -- | 'monitoringScheduleConfig'
  MonitoringScheduleConfig ->
  CreateMonitoringSchedule
newCreateMonitoringSchedule :: Text -> MonitoringScheduleConfig -> CreateMonitoringSchedule
newCreateMonitoringSchedule
  Text
pMonitoringScheduleName_
  MonitoringScheduleConfig
pMonitoringScheduleConfig_ =
    CreateMonitoringSchedule' :: Maybe [Tag]
-> Text -> MonitoringScheduleConfig -> CreateMonitoringSchedule
CreateMonitoringSchedule'
      { $sel:tags:CreateMonitoringSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringScheduleName:CreateMonitoringSchedule' :: Text
monitoringScheduleName = Text
pMonitoringScheduleName_,
        $sel:monitoringScheduleConfig:CreateMonitoringSchedule' :: MonitoringScheduleConfig
monitoringScheduleConfig =
          MonitoringScheduleConfig
pMonitoringScheduleConfig_
      }

-- | (Optional) An array of key-value pairs. For more information, see
-- <%20https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
-- in the /Amazon Web Services Billing and Cost Management User Guide/.
createMonitoringSchedule_tags :: Lens.Lens' CreateMonitoringSchedule (Prelude.Maybe [Tag])
createMonitoringSchedule_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateMonitoringSchedule -> f CreateMonitoringSchedule
createMonitoringSchedule_tags = (CreateMonitoringSchedule -> Maybe [Tag])
-> (CreateMonitoringSchedule
    -> Maybe [Tag] -> CreateMonitoringSchedule)
-> Lens
     CreateMonitoringSchedule
     CreateMonitoringSchedule
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMonitoringSchedule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateMonitoringSchedule
s@CreateMonitoringSchedule' {} Maybe [Tag]
a -> CreateMonitoringSchedule
s {$sel:tags:CreateMonitoringSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateMonitoringSchedule) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateMonitoringSchedule -> f CreateMonitoringSchedule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateMonitoringSchedule
-> f CreateMonitoringSchedule
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 name of the monitoring schedule. The name must be unique within an
-- Amazon Web Services Region within an Amazon Web Services account.
createMonitoringSchedule_monitoringScheduleName :: Lens.Lens' CreateMonitoringSchedule Prelude.Text
createMonitoringSchedule_monitoringScheduleName :: (Text -> f Text)
-> CreateMonitoringSchedule -> f CreateMonitoringSchedule
createMonitoringSchedule_monitoringScheduleName = (CreateMonitoringSchedule -> Text)
-> (CreateMonitoringSchedule -> Text -> CreateMonitoringSchedule)
-> Lens CreateMonitoringSchedule CreateMonitoringSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMonitoringSchedule' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> Text
monitoringScheduleName} -> Text
monitoringScheduleName) (\s :: CreateMonitoringSchedule
s@CreateMonitoringSchedule' {} Text
a -> CreateMonitoringSchedule
s {$sel:monitoringScheduleName:CreateMonitoringSchedule' :: Text
monitoringScheduleName = Text
a} :: CreateMonitoringSchedule)

-- | The configuration object that specifies the monitoring schedule and
-- defines the monitoring job.
createMonitoringSchedule_monitoringScheduleConfig :: Lens.Lens' CreateMonitoringSchedule MonitoringScheduleConfig
createMonitoringSchedule_monitoringScheduleConfig :: (MonitoringScheduleConfig -> f MonitoringScheduleConfig)
-> CreateMonitoringSchedule -> f CreateMonitoringSchedule
createMonitoringSchedule_monitoringScheduleConfig = (CreateMonitoringSchedule -> MonitoringScheduleConfig)
-> (CreateMonitoringSchedule
    -> MonitoringScheduleConfig -> CreateMonitoringSchedule)
-> Lens
     CreateMonitoringSchedule
     CreateMonitoringSchedule
     MonitoringScheduleConfig
     MonitoringScheduleConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMonitoringSchedule' {MonitoringScheduleConfig
monitoringScheduleConfig :: MonitoringScheduleConfig
$sel:monitoringScheduleConfig:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> MonitoringScheduleConfig
monitoringScheduleConfig} -> MonitoringScheduleConfig
monitoringScheduleConfig) (\s :: CreateMonitoringSchedule
s@CreateMonitoringSchedule' {} MonitoringScheduleConfig
a -> CreateMonitoringSchedule
s {$sel:monitoringScheduleConfig:CreateMonitoringSchedule' :: MonitoringScheduleConfig
monitoringScheduleConfig = MonitoringScheduleConfig
a} :: CreateMonitoringSchedule)

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

instance Prelude.Hashable CreateMonitoringSchedule

instance Prelude.NFData CreateMonitoringSchedule

instance Core.ToHeaders CreateMonitoringSchedule where
  toHeaders :: CreateMonitoringSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateMonitoringSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.CreateMonitoringSchedule" ::
                          Prelude.ByteString
                      ),
            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 CreateMonitoringSchedule where
  toJSON :: CreateMonitoringSchedule -> Value
toJSON CreateMonitoringSchedule' {Maybe [Tag]
Text
MonitoringScheduleConfig
monitoringScheduleConfig :: MonitoringScheduleConfig
monitoringScheduleName :: Text
tags :: Maybe [Tag]
$sel:monitoringScheduleConfig:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> MonitoringScheduleConfig
$sel:monitoringScheduleName:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> Text
$sel:tags:CreateMonitoringSchedule' :: CreateMonitoringSchedule -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> 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
              ( Text
"MonitoringScheduleName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
monitoringScheduleName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"MonitoringScheduleConfig"
                  Text -> MonitoringScheduleConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MonitoringScheduleConfig
monitoringScheduleConfig
              )
          ]
      )

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

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

-- | /See:/ 'newCreateMonitoringScheduleResponse' smart constructor.
data CreateMonitoringScheduleResponse = CreateMonitoringScheduleResponse'
  { -- | The response's http status code.
    CreateMonitoringScheduleResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the monitoring schedule.
    CreateMonitoringScheduleResponse -> Text
monitoringScheduleArn :: Prelude.Text
  }
  deriving (CreateMonitoringScheduleResponse
-> CreateMonitoringScheduleResponse -> Bool
(CreateMonitoringScheduleResponse
 -> CreateMonitoringScheduleResponse -> Bool)
-> (CreateMonitoringScheduleResponse
    -> CreateMonitoringScheduleResponse -> Bool)
-> Eq CreateMonitoringScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMonitoringScheduleResponse
-> CreateMonitoringScheduleResponse -> Bool
$c/= :: CreateMonitoringScheduleResponse
-> CreateMonitoringScheduleResponse -> Bool
== :: CreateMonitoringScheduleResponse
-> CreateMonitoringScheduleResponse -> Bool
$c== :: CreateMonitoringScheduleResponse
-> CreateMonitoringScheduleResponse -> Bool
Prelude.Eq, ReadPrec [CreateMonitoringScheduleResponse]
ReadPrec CreateMonitoringScheduleResponse
Int -> ReadS CreateMonitoringScheduleResponse
ReadS [CreateMonitoringScheduleResponse]
(Int -> ReadS CreateMonitoringScheduleResponse)
-> ReadS [CreateMonitoringScheduleResponse]
-> ReadPrec CreateMonitoringScheduleResponse
-> ReadPrec [CreateMonitoringScheduleResponse]
-> Read CreateMonitoringScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMonitoringScheduleResponse]
$creadListPrec :: ReadPrec [CreateMonitoringScheduleResponse]
readPrec :: ReadPrec CreateMonitoringScheduleResponse
$creadPrec :: ReadPrec CreateMonitoringScheduleResponse
readList :: ReadS [CreateMonitoringScheduleResponse]
$creadList :: ReadS [CreateMonitoringScheduleResponse]
readsPrec :: Int -> ReadS CreateMonitoringScheduleResponse
$creadsPrec :: Int -> ReadS CreateMonitoringScheduleResponse
Prelude.Read, Int -> CreateMonitoringScheduleResponse -> ShowS
[CreateMonitoringScheduleResponse] -> ShowS
CreateMonitoringScheduleResponse -> String
(Int -> CreateMonitoringScheduleResponse -> ShowS)
-> (CreateMonitoringScheduleResponse -> String)
-> ([CreateMonitoringScheduleResponse] -> ShowS)
-> Show CreateMonitoringScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMonitoringScheduleResponse] -> ShowS
$cshowList :: [CreateMonitoringScheduleResponse] -> ShowS
show :: CreateMonitoringScheduleResponse -> String
$cshow :: CreateMonitoringScheduleResponse -> String
showsPrec :: Int -> CreateMonitoringScheduleResponse -> ShowS
$cshowsPrec :: Int -> CreateMonitoringScheduleResponse -> ShowS
Prelude.Show, (forall x.
 CreateMonitoringScheduleResponse
 -> Rep CreateMonitoringScheduleResponse x)
-> (forall x.
    Rep CreateMonitoringScheduleResponse x
    -> CreateMonitoringScheduleResponse)
-> Generic CreateMonitoringScheduleResponse
forall x.
Rep CreateMonitoringScheduleResponse x
-> CreateMonitoringScheduleResponse
forall x.
CreateMonitoringScheduleResponse
-> Rep CreateMonitoringScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMonitoringScheduleResponse x
-> CreateMonitoringScheduleResponse
$cfrom :: forall x.
CreateMonitoringScheduleResponse
-> Rep CreateMonitoringScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateMonitoringScheduleResponse' 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:
--
-- 'httpStatus', 'createMonitoringScheduleResponse_httpStatus' - The response's http status code.
--
-- 'monitoringScheduleArn', 'createMonitoringScheduleResponse_monitoringScheduleArn' - The Amazon Resource Name (ARN) of the monitoring schedule.
newCreateMonitoringScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'monitoringScheduleArn'
  Prelude.Text ->
  CreateMonitoringScheduleResponse
newCreateMonitoringScheduleResponse :: Int -> Text -> CreateMonitoringScheduleResponse
newCreateMonitoringScheduleResponse
  Int
pHttpStatus_
  Text
pMonitoringScheduleArn_ =
    CreateMonitoringScheduleResponse' :: Int -> Text -> CreateMonitoringScheduleResponse
CreateMonitoringScheduleResponse'
      { $sel:httpStatus:CreateMonitoringScheduleResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:monitoringScheduleArn:CreateMonitoringScheduleResponse' :: Text
monitoringScheduleArn =
          Text
pMonitoringScheduleArn_
      }

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

-- | The Amazon Resource Name (ARN) of the monitoring schedule.
createMonitoringScheduleResponse_monitoringScheduleArn :: Lens.Lens' CreateMonitoringScheduleResponse Prelude.Text
createMonitoringScheduleResponse_monitoringScheduleArn :: (Text -> f Text)
-> CreateMonitoringScheduleResponse
-> f CreateMonitoringScheduleResponse
createMonitoringScheduleResponse_monitoringScheduleArn = (CreateMonitoringScheduleResponse -> Text)
-> (CreateMonitoringScheduleResponse
    -> Text -> CreateMonitoringScheduleResponse)
-> Lens
     CreateMonitoringScheduleResponse
     CreateMonitoringScheduleResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMonitoringScheduleResponse' {Text
monitoringScheduleArn :: Text
$sel:monitoringScheduleArn:CreateMonitoringScheduleResponse' :: CreateMonitoringScheduleResponse -> Text
monitoringScheduleArn} -> Text
monitoringScheduleArn) (\s :: CreateMonitoringScheduleResponse
s@CreateMonitoringScheduleResponse' {} Text
a -> CreateMonitoringScheduleResponse
s {$sel:monitoringScheduleArn:CreateMonitoringScheduleResponse' :: Text
monitoringScheduleArn = Text
a} :: CreateMonitoringScheduleResponse)

instance
  Prelude.NFData
    CreateMonitoringScheduleResponse