{-# 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.ApplicationAutoScaling.DescribeScheduledActions
-- 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)
--
-- Describes the Application Auto Scaling scheduled actions for the
-- specified service namespace.
--
-- You can filter the results using the @ResourceId@, @ScalableDimension@,
-- and @ScheduledActionNames@ parameters.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html Scheduled scaling>
-- and
-- <https://docs.aws.amazon.com/autoscaling/application/userguide/scheduled-scaling-additional-cli-commands.html Managing scheduled scaling>
-- in the /Application Auto Scaling User Guide/.
--
-- This operation returns paginated results.
module Amazonka.ApplicationAutoScaling.DescribeScheduledActions
  ( -- * Creating a Request
    DescribeScheduledActions (..),
    newDescribeScheduledActions,

    -- * Request Lenses
    describeScheduledActions_scalableDimension,
    describeScheduledActions_resourceId,
    describeScheduledActions_nextToken,
    describeScheduledActions_scheduledActionNames,
    describeScheduledActions_maxResults,
    describeScheduledActions_serviceNamespace,

    -- * Destructuring the Response
    DescribeScheduledActionsResponse (..),
    newDescribeScheduledActionsResponse,

    -- * Response Lenses
    describeScheduledActionsResponse_nextToken,
    describeScheduledActionsResponse_scheduledActions,
    describeScheduledActionsResponse_httpStatus,
  )
where

import Amazonka.ApplicationAutoScaling.Types
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

-- | /See:/ 'newDescribeScheduledActions' smart constructor.
data DescribeScheduledActions = DescribeScheduledActions'
  { -- | The scalable dimension. This string consists of the service namespace,
    -- resource type, and scaling property. If you specify a scalable
    -- dimension, you must also specify a resource ID.
    --
    -- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
    --     service.
    --
    -- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
    --     of an EMR Instance Group.
    --
    -- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
    --     Spot Fleet.
    --
    -- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
    --     AppStream 2.0 fleet.
    --
    -- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
    --     for a DynamoDB table.
    --
    -- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
    --     for a DynamoDB table.
    --
    -- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
    --     for a DynamoDB global secondary index.
    --
    -- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
    --     for a DynamoDB global secondary index.
    --
    -- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
    --     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
    --     Aurora PostgreSQL-compatible edition.
    --
    -- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
    --     instances for an SageMaker model endpoint variant.
    --
    -- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
    --     a custom resource provided by your own application or service.
    --
    -- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
    --     The number of inference units for an Amazon Comprehend document
    --     classification endpoint.
    --
    -- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
    --     number of inference units for an Amazon Comprehend entity recognizer
    --     endpoint.
    --
    -- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
    --     concurrency for a Lambda function.
    --
    -- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
    --     for an Amazon Keyspaces table.
    --
    -- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
    --     capacity for an Amazon Keyspaces table.
    --
    -- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
    --     GiB) for brokers in an Amazon MSK cluster.
    --
    -- -   @elasticache:replication-group:NodeGroups@ - The number of node
    --     groups for an Amazon ElastiCache replication group.
    --
    -- -   @elasticache:replication-group:Replicas@ - The number of replicas
    --     per node group for an Amazon ElastiCache replication group.
    --
    -- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
    --     an Amazon Neptune DB cluster.
    DescribeScheduledActions -> Maybe ScalableDimension
scalableDimension :: Prelude.Maybe ScalableDimension,
    -- | The identifier of the resource associated with the scheduled action.
    -- This string consists of the resource type and unique identifier.
    --
    -- -   ECS service - The resource type is @service@ and the unique
    --     identifier is the cluster name and service name. Example:
    --     @service\/default\/sample-webapp@.
    --
    -- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
    --     unique identifier is the Spot Fleet request ID. Example:
    --     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
    --
    -- -   EMR cluster - The resource type is @instancegroup@ and the unique
    --     identifier is the cluster ID and instance group ID. Example:
    --     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
    --
    -- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
    --     identifier is the fleet name. Example: @fleet\/sample-fleet@.
    --
    -- -   DynamoDB table - The resource type is @table@ and the unique
    --     identifier is the table name. Example: @table\/my-table@.
    --
    -- -   DynamoDB global secondary index - The resource type is @index@ and
    --     the unique identifier is the index name. Example:
    --     @table\/my-table\/index\/my-table-index@.
    --
    -- -   Aurora DB cluster - The resource type is @cluster@ and the unique
    --     identifier is the cluster name. Example: @cluster:my-db-cluster@.
    --
    -- -   SageMaker endpoint variant - The resource type is @variant@ and the
    --     unique identifier is the resource ID. Example:
    --     @endpoint\/my-end-point\/variant\/KMeansClustering@.
    --
    -- -   Custom resources are not supported with a resource type. This
    --     parameter must specify the @OutputValue@ from the CloudFormation
    --     template stack used to access the resources. The unique identifier
    --     is defined by the service provider. More information is available in
    --     our
    --     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
    --
    -- -   Amazon Comprehend document classification endpoint - The resource
    --     type and unique identifier are specified using the endpoint ARN.
    --     Example:
    --     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
    --
    -- -   Amazon Comprehend entity recognizer endpoint - The resource type and
    --     unique identifier are specified using the endpoint ARN. Example:
    --     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
    --
    -- -   Lambda provisioned concurrency - The resource type is @function@ and
    --     the unique identifier is the function name with a function version
    --     or alias name suffix that is not @$LATEST@. Example:
    --     @function:my-function:prod@ or @function:my-function:1@.
    --
    -- -   Amazon Keyspaces table - The resource type is @table@ and the unique
    --     identifier is the table name. Example:
    --     @keyspace\/mykeyspace\/table\/mytable@.
    --
    -- -   Amazon MSK cluster - The resource type and unique identifier are
    --     specified using the cluster ARN. Example:
    --     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
    --
    -- -   Amazon ElastiCache replication group - The resource type is
    --     @replication-group@ and the unique identifier is the replication
    --     group name. Example: @replication-group\/mycluster@.
    --
    -- -   Neptune cluster - The resource type is @cluster@ and the unique
    --     identifier is the cluster name. Example: @cluster:mycluster@.
    DescribeScheduledActions -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results.
    DescribeScheduledActions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The names of the scheduled actions to describe.
    DescribeScheduledActions -> Maybe [Text]
scheduledActionNames :: Prelude.Maybe [Prelude.Text],
    -- | The maximum number of scheduled action results. This value can be
    -- between 1 and 50. The default value is 50.
    --
    -- If this parameter is used, the operation returns up to @MaxResults@
    -- results at a time, along with a @NextToken@ value. To get the next set
    -- of results, include the @NextToken@ value in a subsequent call. If this
    -- parameter is not used, the operation returns up to 50 results and a
    -- @NextToken@ value, if applicable.
    DescribeScheduledActions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The namespace of the Amazon Web Services service that provides the
    -- resource. For a resource provided by your own application or service,
    -- use @custom-resource@ instead.
    DescribeScheduledActions -> ServiceNamespace
serviceNamespace :: ServiceNamespace
  }
  deriving (DescribeScheduledActions -> DescribeScheduledActions -> Bool
(DescribeScheduledActions -> DescribeScheduledActions -> Bool)
-> (DescribeScheduledActions -> DescribeScheduledActions -> Bool)
-> Eq DescribeScheduledActions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
$c/= :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
== :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
$c== :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledActions]
ReadPrec DescribeScheduledActions
Int -> ReadS DescribeScheduledActions
ReadS [DescribeScheduledActions]
(Int -> ReadS DescribeScheduledActions)
-> ReadS [DescribeScheduledActions]
-> ReadPrec DescribeScheduledActions
-> ReadPrec [DescribeScheduledActions]
-> Read DescribeScheduledActions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledActions]
$creadListPrec :: ReadPrec [DescribeScheduledActions]
readPrec :: ReadPrec DescribeScheduledActions
$creadPrec :: ReadPrec DescribeScheduledActions
readList :: ReadS [DescribeScheduledActions]
$creadList :: ReadS [DescribeScheduledActions]
readsPrec :: Int -> ReadS DescribeScheduledActions
$creadsPrec :: Int -> ReadS DescribeScheduledActions
Prelude.Read, Int -> DescribeScheduledActions -> ShowS
[DescribeScheduledActions] -> ShowS
DescribeScheduledActions -> String
(Int -> DescribeScheduledActions -> ShowS)
-> (DescribeScheduledActions -> String)
-> ([DescribeScheduledActions] -> ShowS)
-> Show DescribeScheduledActions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledActions] -> ShowS
$cshowList :: [DescribeScheduledActions] -> ShowS
show :: DescribeScheduledActions -> String
$cshow :: DescribeScheduledActions -> String
showsPrec :: Int -> DescribeScheduledActions -> ShowS
$cshowsPrec :: Int -> DescribeScheduledActions -> ShowS
Prelude.Show, (forall x.
 DescribeScheduledActions -> Rep DescribeScheduledActions x)
-> (forall x.
    Rep DescribeScheduledActions x -> DescribeScheduledActions)
-> Generic DescribeScheduledActions
forall x.
Rep DescribeScheduledActions x -> DescribeScheduledActions
forall x.
DescribeScheduledActions -> Rep DescribeScheduledActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduledActions x -> DescribeScheduledActions
$cfrom :: forall x.
DescribeScheduledActions -> Rep DescribeScheduledActions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScheduledActions' 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:
--
-- 'scalableDimension', 'describeScheduledActions_scalableDimension' - The scalable dimension. This string consists of the service namespace,
-- resource type, and scaling property. If you specify a scalable
-- dimension, you must also specify a resource ID.
--
-- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
--     service.
--
-- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
--     of an EMR Instance Group.
--
-- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
--     Spot Fleet.
--
-- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
--     AppStream 2.0 fleet.
--
-- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB global secondary index.
--
-- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB global secondary index.
--
-- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
--     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
--     Aurora PostgreSQL-compatible edition.
--
-- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
--     instances for an SageMaker model endpoint variant.
--
-- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
--     a custom resource provided by your own application or service.
--
-- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
--     The number of inference units for an Amazon Comprehend document
--     classification endpoint.
--
-- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
--     number of inference units for an Amazon Comprehend entity recognizer
--     endpoint.
--
-- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
--     concurrency for a Lambda function.
--
-- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
--     for an Amazon Keyspaces table.
--
-- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
--     capacity for an Amazon Keyspaces table.
--
-- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
--     GiB) for brokers in an Amazon MSK cluster.
--
-- -   @elasticache:replication-group:NodeGroups@ - The number of node
--     groups for an Amazon ElastiCache replication group.
--
-- -   @elasticache:replication-group:Replicas@ - The number of replicas
--     per node group for an Amazon ElastiCache replication group.
--
-- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
--     an Amazon Neptune DB cluster.
--
-- 'resourceId', 'describeScheduledActions_resourceId' - The identifier of the resource associated with the scheduled action.
-- This string consists of the resource type and unique identifier.
--
-- -   ECS service - The resource type is @service@ and the unique
--     identifier is the cluster name and service name. Example:
--     @service\/default\/sample-webapp@.
--
-- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
--     unique identifier is the Spot Fleet request ID. Example:
--     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
--
-- -   EMR cluster - The resource type is @instancegroup@ and the unique
--     identifier is the cluster ID and instance group ID. Example:
--     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
--
-- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
--     identifier is the fleet name. Example: @fleet\/sample-fleet@.
--
-- -   DynamoDB table - The resource type is @table@ and the unique
--     identifier is the table name. Example: @table\/my-table@.
--
-- -   DynamoDB global secondary index - The resource type is @index@ and
--     the unique identifier is the index name. Example:
--     @table\/my-table\/index\/my-table-index@.
--
-- -   Aurora DB cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:my-db-cluster@.
--
-- -   SageMaker endpoint variant - The resource type is @variant@ and the
--     unique identifier is the resource ID. Example:
--     @endpoint\/my-end-point\/variant\/KMeansClustering@.
--
-- -   Custom resources are not supported with a resource type. This
--     parameter must specify the @OutputValue@ from the CloudFormation
--     template stack used to access the resources. The unique identifier
--     is defined by the service provider. More information is available in
--     our
--     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
--
-- -   Amazon Comprehend document classification endpoint - The resource
--     type and unique identifier are specified using the endpoint ARN.
--     Example:
--     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
--
-- -   Amazon Comprehend entity recognizer endpoint - The resource type and
--     unique identifier are specified using the endpoint ARN. Example:
--     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
--
-- -   Lambda provisioned concurrency - The resource type is @function@ and
--     the unique identifier is the function name with a function version
--     or alias name suffix that is not @$LATEST@. Example:
--     @function:my-function:prod@ or @function:my-function:1@.
--
-- -   Amazon Keyspaces table - The resource type is @table@ and the unique
--     identifier is the table name. Example:
--     @keyspace\/mykeyspace\/table\/mytable@.
--
-- -   Amazon MSK cluster - The resource type and unique identifier are
--     specified using the cluster ARN. Example:
--     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
--
-- -   Amazon ElastiCache replication group - The resource type is
--     @replication-group@ and the unique identifier is the replication
--     group name. Example: @replication-group\/mycluster@.
--
-- -   Neptune cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:mycluster@.
--
-- 'nextToken', 'describeScheduledActions_nextToken' - The token for the next set of results.
--
-- 'scheduledActionNames', 'describeScheduledActions_scheduledActionNames' - The names of the scheduled actions to describe.
--
-- 'maxResults', 'describeScheduledActions_maxResults' - The maximum number of scheduled action results. This value can be
-- between 1 and 50. The default value is 50.
--
-- If this parameter is used, the operation returns up to @MaxResults@
-- results at a time, along with a @NextToken@ value. To get the next set
-- of results, include the @NextToken@ value in a subsequent call. If this
-- parameter is not used, the operation returns up to 50 results and a
-- @NextToken@ value, if applicable.
--
-- 'serviceNamespace', 'describeScheduledActions_serviceNamespace' - The namespace of the Amazon Web Services service that provides the
-- resource. For a resource provided by your own application or service,
-- use @custom-resource@ instead.
newDescribeScheduledActions ::
  -- | 'serviceNamespace'
  ServiceNamespace ->
  DescribeScheduledActions
newDescribeScheduledActions :: ServiceNamespace -> DescribeScheduledActions
newDescribeScheduledActions ServiceNamespace
pServiceNamespace_ =
  DescribeScheduledActions' :: Maybe ScalableDimension
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> ServiceNamespace
-> DescribeScheduledActions
DescribeScheduledActions'
    { $sel:scalableDimension:DescribeScheduledActions' :: Maybe ScalableDimension
scalableDimension =
        Maybe ScalableDimension
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:DescribeScheduledActions' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeScheduledActions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledActionNames:DescribeScheduledActions' :: Maybe [Text]
scheduledActionNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeScheduledActions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceNamespace:DescribeScheduledActions' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_
    }

-- | The scalable dimension. This string consists of the service namespace,
-- resource type, and scaling property. If you specify a scalable
-- dimension, you must also specify a resource ID.
--
-- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
--     service.
--
-- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
--     of an EMR Instance Group.
--
-- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
--     Spot Fleet.
--
-- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
--     AppStream 2.0 fleet.
--
-- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB global secondary index.
--
-- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB global secondary index.
--
-- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
--     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
--     Aurora PostgreSQL-compatible edition.
--
-- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
--     instances for an SageMaker model endpoint variant.
--
-- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
--     a custom resource provided by your own application or service.
--
-- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
--     The number of inference units for an Amazon Comprehend document
--     classification endpoint.
--
-- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
--     number of inference units for an Amazon Comprehend entity recognizer
--     endpoint.
--
-- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
--     concurrency for a Lambda function.
--
-- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
--     for an Amazon Keyspaces table.
--
-- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
--     capacity for an Amazon Keyspaces table.
--
-- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
--     GiB) for brokers in an Amazon MSK cluster.
--
-- -   @elasticache:replication-group:NodeGroups@ - The number of node
--     groups for an Amazon ElastiCache replication group.
--
-- -   @elasticache:replication-group:Replicas@ - The number of replicas
--     per node group for an Amazon ElastiCache replication group.
--
-- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
--     an Amazon Neptune DB cluster.
describeScheduledActions_scalableDimension :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe ScalableDimension)
describeScheduledActions_scalableDimension :: (Maybe ScalableDimension -> f (Maybe ScalableDimension))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_scalableDimension = (DescribeScheduledActions -> Maybe ScalableDimension)
-> (DescribeScheduledActions
    -> Maybe ScalableDimension -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     (Maybe ScalableDimension)
     (Maybe ScalableDimension)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe ScalableDimension
scalableDimension :: Maybe ScalableDimension
$sel:scalableDimension:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ScalableDimension
scalableDimension} -> Maybe ScalableDimension
scalableDimension) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe ScalableDimension
a -> DescribeScheduledActions
s {$sel:scalableDimension:DescribeScheduledActions' :: Maybe ScalableDimension
scalableDimension = Maybe ScalableDimension
a} :: DescribeScheduledActions)

-- | The identifier of the resource associated with the scheduled action.
-- This string consists of the resource type and unique identifier.
--
-- -   ECS service - The resource type is @service@ and the unique
--     identifier is the cluster name and service name. Example:
--     @service\/default\/sample-webapp@.
--
-- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
--     unique identifier is the Spot Fleet request ID. Example:
--     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
--
-- -   EMR cluster - The resource type is @instancegroup@ and the unique
--     identifier is the cluster ID and instance group ID. Example:
--     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
--
-- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
--     identifier is the fleet name. Example: @fleet\/sample-fleet@.
--
-- -   DynamoDB table - The resource type is @table@ and the unique
--     identifier is the table name. Example: @table\/my-table@.
--
-- -   DynamoDB global secondary index - The resource type is @index@ and
--     the unique identifier is the index name. Example:
--     @table\/my-table\/index\/my-table-index@.
--
-- -   Aurora DB cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:my-db-cluster@.
--
-- -   SageMaker endpoint variant - The resource type is @variant@ and the
--     unique identifier is the resource ID. Example:
--     @endpoint\/my-end-point\/variant\/KMeansClustering@.
--
-- -   Custom resources are not supported with a resource type. This
--     parameter must specify the @OutputValue@ from the CloudFormation
--     template stack used to access the resources. The unique identifier
--     is defined by the service provider. More information is available in
--     our
--     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
--
-- -   Amazon Comprehend document classification endpoint - The resource
--     type and unique identifier are specified using the endpoint ARN.
--     Example:
--     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
--
-- -   Amazon Comprehend entity recognizer endpoint - The resource type and
--     unique identifier are specified using the endpoint ARN. Example:
--     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
--
-- -   Lambda provisioned concurrency - The resource type is @function@ and
--     the unique identifier is the function name with a function version
--     or alias name suffix that is not @$LATEST@. Example:
--     @function:my-function:prod@ or @function:my-function:1@.
--
-- -   Amazon Keyspaces table - The resource type is @table@ and the unique
--     identifier is the table name. Example:
--     @keyspace\/mykeyspace\/table\/mytable@.
--
-- -   Amazon MSK cluster - The resource type and unique identifier are
--     specified using the cluster ARN. Example:
--     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
--
-- -   Amazon ElastiCache replication group - The resource type is
--     @replication-group@ and the unique identifier is the replication
--     group name. Example: @replication-group\/mycluster@.
--
-- -   Neptune cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:mycluster@.
describeScheduledActions_resourceId :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_resourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_resourceId = (DescribeScheduledActions -> Maybe Text)
-> (DescribeScheduledActions
    -> Maybe Text -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:resourceId:DescribeScheduledActions' :: Maybe Text
resourceId = Maybe Text
a} :: DescribeScheduledActions)

-- | The token for the next set of results.
describeScheduledActions_nextToken :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_nextToken = (DescribeScheduledActions -> Maybe Text)
-> (DescribeScheduledActions
    -> Maybe Text -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:nextToken:DescribeScheduledActions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScheduledActions)

-- | The names of the scheduled actions to describe.
describeScheduledActions_scheduledActionNames :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe [Prelude.Text])
describeScheduledActions_scheduledActionNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_scheduledActionNames = (DescribeScheduledActions -> Maybe [Text])
-> (DescribeScheduledActions
    -> Maybe [Text] -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe [Text]
scheduledActionNames :: Maybe [Text]
$sel:scheduledActionNames:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [Text]
scheduledActionNames} -> Maybe [Text]
scheduledActionNames) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe [Text]
a -> DescribeScheduledActions
s {$sel:scheduledActionNames:DescribeScheduledActions' :: Maybe [Text]
scheduledActionNames = Maybe [Text]
a} :: DescribeScheduledActions) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeScheduledActions -> f DescribeScheduledActions)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledActions
-> f DescribeScheduledActions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of scheduled action results. This value can be
-- between 1 and 50. The default value is 50.
--
-- If this parameter is used, the operation returns up to @MaxResults@
-- results at a time, along with a @NextToken@ value. To get the next set
-- of results, include the @NextToken@ value in a subsequent call. If this
-- parameter is not used, the operation returns up to 50 results and a
-- @NextToken@ value, if applicable.
describeScheduledActions_maxResults :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Int)
describeScheduledActions_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_maxResults = (DescribeScheduledActions -> Maybe Int)
-> (DescribeScheduledActions
    -> Maybe Int -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Int
a -> DescribeScheduledActions
s {$sel:maxResults:DescribeScheduledActions' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeScheduledActions)

-- | The namespace of the Amazon Web Services service that provides the
-- resource. For a resource provided by your own application or service,
-- use @custom-resource@ instead.
describeScheduledActions_serviceNamespace :: Lens.Lens' DescribeScheduledActions ServiceNamespace
describeScheduledActions_serviceNamespace :: (ServiceNamespace -> f ServiceNamespace)
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_serviceNamespace = (DescribeScheduledActions -> ServiceNamespace)
-> (DescribeScheduledActions
    -> ServiceNamespace -> DescribeScheduledActions)
-> Lens
     DescribeScheduledActions
     DescribeScheduledActions
     ServiceNamespace
     ServiceNamespace
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {ServiceNamespace
serviceNamespace :: ServiceNamespace
$sel:serviceNamespace:DescribeScheduledActions' :: DescribeScheduledActions -> ServiceNamespace
serviceNamespace} -> ServiceNamespace
serviceNamespace) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} ServiceNamespace
a -> DescribeScheduledActions
s {$sel:serviceNamespace:DescribeScheduledActions' :: ServiceNamespace
serviceNamespace = ServiceNamespace
a} :: DescribeScheduledActions)

instance Core.AWSPager DescribeScheduledActions where
  page :: DescribeScheduledActions
-> AWSResponse DescribeScheduledActions
-> Maybe DescribeScheduledActions
page DescribeScheduledActions
rq AWSResponse DescribeScheduledActions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
            DescribeScheduledActionsResponse
-> Getting (First Text) DescribeScheduledActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe Text)
describeScheduledActionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeScheduledActionsResponse
 -> Const (First Text) DescribeScheduledActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScheduledActionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeScheduledActions
forall a. Maybe a
Prelude.Nothing
    | Maybe [ScheduledAction] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
            DescribeScheduledActionsResponse
-> Getting
     (First [ScheduledAction])
     DescribeScheduledActionsResponse
     [ScheduledAction]
-> Maybe [ScheduledAction]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScheduledAction]
 -> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> Const (First [ScheduledAction]) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe [ScheduledAction])
describeScheduledActionsResponse_scheduledActions
              ((Maybe [ScheduledAction]
  -> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
 -> DescribeScheduledActionsResponse
 -> Const
      (First [ScheduledAction]) DescribeScheduledActionsResponse)
-> (([ScheduledAction]
     -> Const (First [ScheduledAction]) [ScheduledAction])
    -> Maybe [ScheduledAction]
    -> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
-> Getting
     (First [ScheduledAction])
     DescribeScheduledActionsResponse
     [ScheduledAction]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScheduledAction]
 -> Const (First [ScheduledAction]) [ScheduledAction])
-> Maybe [ScheduledAction]
-> Const (First [ScheduledAction]) (Maybe [ScheduledAction])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeScheduledActions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeScheduledActions -> Maybe DescribeScheduledActions
forall a. a -> Maybe a
Prelude.Just (DescribeScheduledActions -> Maybe DescribeScheduledActions)
-> DescribeScheduledActions -> Maybe DescribeScheduledActions
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeScheduledActions
rq
          DescribeScheduledActions
-> (DescribeScheduledActions -> DescribeScheduledActions)
-> DescribeScheduledActions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeScheduledActions -> Identity DescribeScheduledActions
Lens
  DescribeScheduledActions
  DescribeScheduledActions
  (Maybe Text)
  (Maybe Text)
describeScheduledActions_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeScheduledActions -> Identity DescribeScheduledActions)
-> Maybe Text
-> DescribeScheduledActions
-> DescribeScheduledActions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
          DescribeScheduledActionsResponse
-> Getting (First Text) DescribeScheduledActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe Text)
describeScheduledActionsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeScheduledActionsResponse
 -> Const (First Text) DescribeScheduledActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScheduledActionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeScheduledActions where
  type
    AWSResponse DescribeScheduledActions =
      DescribeScheduledActionsResponse
  request :: DescribeScheduledActions -> Request DescribeScheduledActions
request = Service
-> DescribeScheduledActions -> Request DescribeScheduledActions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScheduledActions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeScheduledActions))
-> Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScheduledActions)))
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 [ScheduledAction]
-> Int
-> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
            (Maybe Text
 -> Maybe [ScheduledAction]
 -> Int
 -> DescribeScheduledActionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ScheduledAction]
      -> Int -> DescribeScheduledActionsResponse)
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
"NextToken")
            Either
  String
  (Maybe [ScheduledAction]
   -> Int -> DescribeScheduledActionsResponse)
-> Either String (Maybe [ScheduledAction])
-> Either String (Int -> DescribeScheduledActionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ScheduledAction]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScheduledActions"
                            Either String (Maybe (Maybe [ScheduledAction]))
-> Maybe [ScheduledAction]
-> Either String (Maybe [ScheduledAction])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScheduledAction]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> DescribeScheduledActionsResponse)
-> Either String Int
-> Either String DescribeScheduledActionsResponse
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 DescribeScheduledActions

instance Prelude.NFData DescribeScheduledActions

instance Core.ToHeaders DescribeScheduledActions where
  toHeaders :: DescribeScheduledActions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeScheduledActions -> 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
"AnyScaleFrontendService.DescribeScheduledActions" ::
                          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 DescribeScheduledActions where
  toJSON :: DescribeScheduledActions -> Value
toJSON DescribeScheduledActions' {Maybe Int
Maybe [Text]
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
maxResults :: Maybe Int
scheduledActionNames :: Maybe [Text]
nextToken :: Maybe Text
resourceId :: Maybe Text
scalableDimension :: Maybe ScalableDimension
$sel:serviceNamespace:DescribeScheduledActions' :: DescribeScheduledActions -> ServiceNamespace
$sel:maxResults:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
$sel:scheduledActionNames:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [Text]
$sel:nextToken:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:resourceId:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:scalableDimension:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ScalableDimension
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ScalableDimension" Text -> ScalableDimension -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ScalableDimension -> Pair)
-> Maybe ScalableDimension -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScalableDimension
scalableDimension,
            (Text
"ResourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceId,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"ScheduledActionNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
scheduledActionNames,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ServiceNamespace" Text -> ServiceNamespace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ServiceNamespace
serviceNamespace)
          ]
      )

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

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

-- | /See:/ 'newDescribeScheduledActionsResponse' smart constructor.
data DescribeScheduledActionsResponse = DescribeScheduledActionsResponse'
  { -- | The token required to get the next set of results. This value is @null@
    -- if there are no more results to return.
    DescribeScheduledActionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the scheduled actions.
    DescribeScheduledActionsResponse -> Maybe [ScheduledAction]
scheduledActions :: Prelude.Maybe [ScheduledAction],
    -- | The response's http status code.
    DescribeScheduledActionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
(DescribeScheduledActionsResponse
 -> DescribeScheduledActionsResponse -> Bool)
-> (DescribeScheduledActionsResponse
    -> DescribeScheduledActionsResponse -> Bool)
-> Eq DescribeScheduledActionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
$c/= :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
== :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
$c== :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledActionsResponse]
ReadPrec DescribeScheduledActionsResponse
Int -> ReadS DescribeScheduledActionsResponse
ReadS [DescribeScheduledActionsResponse]
(Int -> ReadS DescribeScheduledActionsResponse)
-> ReadS [DescribeScheduledActionsResponse]
-> ReadPrec DescribeScheduledActionsResponse
-> ReadPrec [DescribeScheduledActionsResponse]
-> Read DescribeScheduledActionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledActionsResponse]
$creadListPrec :: ReadPrec [DescribeScheduledActionsResponse]
readPrec :: ReadPrec DescribeScheduledActionsResponse
$creadPrec :: ReadPrec DescribeScheduledActionsResponse
readList :: ReadS [DescribeScheduledActionsResponse]
$creadList :: ReadS [DescribeScheduledActionsResponse]
readsPrec :: Int -> ReadS DescribeScheduledActionsResponse
$creadsPrec :: Int -> ReadS DescribeScheduledActionsResponse
Prelude.Read, Int -> DescribeScheduledActionsResponse -> ShowS
[DescribeScheduledActionsResponse] -> ShowS
DescribeScheduledActionsResponse -> String
(Int -> DescribeScheduledActionsResponse -> ShowS)
-> (DescribeScheduledActionsResponse -> String)
-> ([DescribeScheduledActionsResponse] -> ShowS)
-> Show DescribeScheduledActionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledActionsResponse] -> ShowS
$cshowList :: [DescribeScheduledActionsResponse] -> ShowS
show :: DescribeScheduledActionsResponse -> String
$cshow :: DescribeScheduledActionsResponse -> String
showsPrec :: Int -> DescribeScheduledActionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeScheduledActionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeScheduledActionsResponse
 -> Rep DescribeScheduledActionsResponse x)
-> (forall x.
    Rep DescribeScheduledActionsResponse x
    -> DescribeScheduledActionsResponse)
-> Generic DescribeScheduledActionsResponse
forall x.
Rep DescribeScheduledActionsResponse x
-> DescribeScheduledActionsResponse
forall x.
DescribeScheduledActionsResponse
-> Rep DescribeScheduledActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduledActionsResponse x
-> DescribeScheduledActionsResponse
$cfrom :: forall x.
DescribeScheduledActionsResponse
-> Rep DescribeScheduledActionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScheduledActionsResponse' 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:
--
-- 'nextToken', 'describeScheduledActionsResponse_nextToken' - The token required to get the next set of results. This value is @null@
-- if there are no more results to return.
--
-- 'scheduledActions', 'describeScheduledActionsResponse_scheduledActions' - Information about the scheduled actions.
--
-- 'httpStatus', 'describeScheduledActionsResponse_httpStatus' - The response's http status code.
newDescribeScheduledActionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeScheduledActionsResponse
newDescribeScheduledActionsResponse :: Int -> DescribeScheduledActionsResponse
newDescribeScheduledActionsResponse Int
pHttpStatus_ =
  DescribeScheduledActionsResponse' :: Maybe Text
-> Maybe [ScheduledAction]
-> Int
-> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
    { $sel:nextToken:DescribeScheduledActionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledActions:DescribeScheduledActionsResponse' :: Maybe [ScheduledAction]
scheduledActions = Maybe [ScheduledAction]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeScheduledActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token required to get the next set of results. This value is @null@
-- if there are no more results to return.
describeScheduledActionsResponse_nextToken :: Lens.Lens' DescribeScheduledActionsResponse (Prelude.Maybe Prelude.Text)
describeScheduledActionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_nextToken = (DescribeScheduledActionsResponse -> Maybe Text)
-> (DescribeScheduledActionsResponse
    -> Maybe Text -> DescribeScheduledActionsResponse)
-> Lens' DescribeScheduledActionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Maybe Text
a -> DescribeScheduledActionsResponse
s {$sel:nextToken:DescribeScheduledActionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScheduledActionsResponse)

-- | Information about the scheduled actions.
describeScheduledActionsResponse_scheduledActions :: Lens.Lens' DescribeScheduledActionsResponse (Prelude.Maybe [ScheduledAction])
describeScheduledActionsResponse_scheduledActions :: (Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_scheduledActions = (DescribeScheduledActionsResponse -> Maybe [ScheduledAction])
-> (DescribeScheduledActionsResponse
    -> Maybe [ScheduledAction] -> DescribeScheduledActionsResponse)
-> Lens' DescribeScheduledActionsResponse (Maybe [ScheduledAction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActionsResponse' {Maybe [ScheduledAction]
scheduledActions :: Maybe [ScheduledAction]
$sel:scheduledActions:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Maybe [ScheduledAction]
scheduledActions} -> Maybe [ScheduledAction]
scheduledActions) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Maybe [ScheduledAction]
a -> DescribeScheduledActionsResponse
s {$sel:scheduledActions:DescribeScheduledActionsResponse' :: Maybe [ScheduledAction]
scheduledActions = Maybe [ScheduledAction]
a} :: DescribeScheduledActionsResponse) ((Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
 -> DescribeScheduledActionsResponse
 -> f DescribeScheduledActionsResponse)
-> ((Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
    -> Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> (Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ScheduledAction]
  [ScheduledAction]
  [ScheduledAction]
  [ScheduledAction]
-> Iso
     (Maybe [ScheduledAction])
     (Maybe [ScheduledAction])
     (Maybe [ScheduledAction])
     (Maybe [ScheduledAction])
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
  [ScheduledAction]
  [ScheduledAction]
  [ScheduledAction]
  [ScheduledAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeScheduledActionsResponse