{-# 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.ChimeSdkMeetings.CreateMeeting
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new Amazon Chime SDK meeting in the specified media Region
-- with no initial attendees. For more information about specifying media
-- Regions, see
-- <https://docs.aws.amazon.com/chime/latest/dg/chime-sdk-meetings-regions.html Amazon Chime SDK Media Regions>
-- in the /Amazon Chime Developer Guide/. For more information about the
-- Amazon Chime SDK, see
-- <https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.html Using the Amazon Chime SDK>
-- in the /Amazon Chime Developer Guide/.
module Amazonka.ChimeSdkMeetings.CreateMeeting
  ( -- * Creating a Request
    CreateMeeting (..),
    newCreateMeeting,

    -- * Request Lenses
    createMeeting_meetingFeatures,
    createMeeting_meetingHostId,
    createMeeting_notificationsConfiguration,
    createMeeting_primaryMeetingId,
    createMeeting_tags,
    createMeeting_tenantIds,
    createMeeting_clientRequestToken,
    createMeeting_mediaRegion,
    createMeeting_externalMeetingId,

    -- * Destructuring the Response
    CreateMeetingResponse (..),
    newCreateMeetingResponse,

    -- * Response Lenses
    createMeetingResponse_meeting,
    createMeetingResponse_httpStatus,
  )
where

import Amazonka.ChimeSdkMeetings.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateMeeting' smart constructor.
data CreateMeeting = CreateMeeting'
  { -- | Lists the audio and video features enabled for a meeting, such as echo
    -- reduction.
    CreateMeeting -> Maybe MeetingFeaturesConfiguration
meetingFeatures :: Prelude.Maybe MeetingFeaturesConfiguration,
    -- | Reserved.
    CreateMeeting -> Maybe (Sensitive Text)
meetingHostId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The configuration for resource targets to receive notifications when
    -- meeting and attendee events occur.
    CreateMeeting -> Maybe NotificationsConfiguration
notificationsConfiguration :: Prelude.Maybe NotificationsConfiguration,
    -- | When specified, replicates the media from the primary meeting to the new
    -- meeting.
    CreateMeeting -> Maybe Text
primaryMeetingId :: Prelude.Maybe Prelude.Text,
    -- | Applies one or more tags to an Amazon Chime SDK meeting. Note the
    -- following:
    --
    -- -   Not all resources have tags. For a list of services with resources
    --     that support tagging using this operation, see
    --     <https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html Services that support the Resource Groups Tagging API>.
    --     If the resource doesn\'t yet support this operation, the resource\'s
    --     service might support tagging using its own API operations. For more
    --     information, refer to the documentation for that service.
    --
    -- -   Each resource can have up to 50 tags. For other limits, see
    --     <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions Tag Naming and Usage Conventions>
    --     in the /AWS General Reference/.
    --
    -- -   You can only tag resources that are located in the specified AWS
    --     Region for the AWS account.
    --
    -- -   To add tags to a resource, you need the necessary permissions for
    --     the service that the resource belongs to as well as permissions for
    --     adding tags. For more information, see the documentation for each
    --     service.
    --
    -- Do not store personally identifiable information (PII) or other
    -- confidential or sensitive information in tags. We use tags to provide
    -- you with billing and administration services. Tags are not intended to
    -- be used for private or sensitive data.
    --
    -- __Minimum permissions__
    --
    -- In addition to the @tag:TagResources @permission required by this
    -- operation, you must also have the tagging permission defined by the
    -- service that created the resource. For example, to tag a
    -- @ChimeSDKMeetings@ instance using the @TagResources@ operation, you must
    -- have both of the following permissions:
    --
    -- @tag:TagResources@
    --
    -- @ChimeSDKMeetings:CreateTags@
    --
    -- Some services might have specific requirements for tagging some
    -- resources. For example, to tag an Amazon S3 bucket, you must also have
    -- the @s3:GetBucketTagging@ permission. If the expected minimum
    -- permissions don\'t work, check the documentation for that service\'s
    -- tagging APIs for more information.
    CreateMeeting -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A consistent and opaque identifier, created and maintained by the
    -- builder to represent a segment of their users.
    CreateMeeting -> Maybe (NonEmpty Text)
tenantIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The unique identifier for the client request. Use a different token for
    -- different meetings.
    CreateMeeting -> Sensitive Text
clientRequestToken :: Data.Sensitive Prelude.Text,
    -- | The Region in which to create the meeting.
    --
    -- Available values: @af-south-1@, @ap-northeast-1@, @ap-northeast-2@,
    -- @ap-south-1@, @ap-southeast-1@, @ap-southeast-2@, @ca-central-1@,
    -- @eu-central-1@, @eu-north-1@, @eu-south-1@, @eu-west-1@, @eu-west-2@,
    -- @eu-west-3@, @sa-east-1@, @us-east-1@, @us-east-2@, @us-west-1@,
    -- @us-west-2@.
    --
    -- Available values in AWS GovCloud (US) Regions: @us-gov-east-1@,
    -- @us-gov-west-1@.
    CreateMeeting -> Text
mediaRegion :: Prelude.Text,
    -- | The external meeting ID.
    CreateMeeting -> Sensitive Text
externalMeetingId :: Data.Sensitive Prelude.Text
  }
  deriving (CreateMeeting -> CreateMeeting -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMeeting -> CreateMeeting -> Bool
$c/= :: CreateMeeting -> CreateMeeting -> Bool
== :: CreateMeeting -> CreateMeeting -> Bool
$c== :: CreateMeeting -> CreateMeeting -> Bool
Prelude.Eq, Int -> CreateMeeting -> ShowS
[CreateMeeting] -> ShowS
CreateMeeting -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMeeting] -> ShowS
$cshowList :: [CreateMeeting] -> ShowS
show :: CreateMeeting -> String
$cshow :: CreateMeeting -> String
showsPrec :: Int -> CreateMeeting -> ShowS
$cshowsPrec :: Int -> CreateMeeting -> ShowS
Prelude.Show, forall x. Rep CreateMeeting x -> CreateMeeting
forall x. CreateMeeting -> Rep CreateMeeting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMeeting x -> CreateMeeting
$cfrom :: forall x. CreateMeeting -> Rep CreateMeeting x
Prelude.Generic)

-- |
-- Create a value of 'CreateMeeting' 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:
--
-- 'meetingFeatures', 'createMeeting_meetingFeatures' - Lists the audio and video features enabled for a meeting, such as echo
-- reduction.
--
-- 'meetingHostId', 'createMeeting_meetingHostId' - Reserved.
--
-- 'notificationsConfiguration', 'createMeeting_notificationsConfiguration' - The configuration for resource targets to receive notifications when
-- meeting and attendee events occur.
--
-- 'primaryMeetingId', 'createMeeting_primaryMeetingId' - When specified, replicates the media from the primary meeting to the new
-- meeting.
--
-- 'tags', 'createMeeting_tags' - Applies one or more tags to an Amazon Chime SDK meeting. Note the
-- following:
--
-- -   Not all resources have tags. For a list of services with resources
--     that support tagging using this operation, see
--     <https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html Services that support the Resource Groups Tagging API>.
--     If the resource doesn\'t yet support this operation, the resource\'s
--     service might support tagging using its own API operations. For more
--     information, refer to the documentation for that service.
--
-- -   Each resource can have up to 50 tags. For other limits, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions Tag Naming and Usage Conventions>
--     in the /AWS General Reference/.
--
-- -   You can only tag resources that are located in the specified AWS
--     Region for the AWS account.
--
-- -   To add tags to a resource, you need the necessary permissions for
--     the service that the resource belongs to as well as permissions for
--     adding tags. For more information, see the documentation for each
--     service.
--
-- Do not store personally identifiable information (PII) or other
-- confidential or sensitive information in tags. We use tags to provide
-- you with billing and administration services. Tags are not intended to
-- be used for private or sensitive data.
--
-- __Minimum permissions__
--
-- In addition to the @tag:TagResources @permission required by this
-- operation, you must also have the tagging permission defined by the
-- service that created the resource. For example, to tag a
-- @ChimeSDKMeetings@ instance using the @TagResources@ operation, you must
-- have both of the following permissions:
--
-- @tag:TagResources@
--
-- @ChimeSDKMeetings:CreateTags@
--
-- Some services might have specific requirements for tagging some
-- resources. For example, to tag an Amazon S3 bucket, you must also have
-- the @s3:GetBucketTagging@ permission. If the expected minimum
-- permissions don\'t work, check the documentation for that service\'s
-- tagging APIs for more information.
--
-- 'tenantIds', 'createMeeting_tenantIds' - A consistent and opaque identifier, created and maintained by the
-- builder to represent a segment of their users.
--
-- 'clientRequestToken', 'createMeeting_clientRequestToken' - The unique identifier for the client request. Use a different token for
-- different meetings.
--
-- 'mediaRegion', 'createMeeting_mediaRegion' - The Region in which to create the meeting.
--
-- Available values: @af-south-1@, @ap-northeast-1@, @ap-northeast-2@,
-- @ap-south-1@, @ap-southeast-1@, @ap-southeast-2@, @ca-central-1@,
-- @eu-central-1@, @eu-north-1@, @eu-south-1@, @eu-west-1@, @eu-west-2@,
-- @eu-west-3@, @sa-east-1@, @us-east-1@, @us-east-2@, @us-west-1@,
-- @us-west-2@.
--
-- Available values in AWS GovCloud (US) Regions: @us-gov-east-1@,
-- @us-gov-west-1@.
--
-- 'externalMeetingId', 'createMeeting_externalMeetingId' - The external meeting ID.
newCreateMeeting ::
  -- | 'clientRequestToken'
  Prelude.Text ->
  -- | 'mediaRegion'
  Prelude.Text ->
  -- | 'externalMeetingId'
  Prelude.Text ->
  CreateMeeting
newCreateMeeting :: Text -> Text -> Text -> CreateMeeting
newCreateMeeting
  Text
pClientRequestToken_
  Text
pMediaRegion_
  Text
pExternalMeetingId_ =
    CreateMeeting'
      { $sel:meetingFeatures:CreateMeeting' :: Maybe MeetingFeaturesConfiguration
meetingFeatures = forall a. Maybe a
Prelude.Nothing,
        $sel:meetingHostId:CreateMeeting' :: Maybe (Sensitive Text)
meetingHostId = forall a. Maybe a
Prelude.Nothing,
        $sel:notificationsConfiguration:CreateMeeting' :: Maybe NotificationsConfiguration
notificationsConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:primaryMeetingId:CreateMeeting' :: Maybe Text
primaryMeetingId = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateMeeting' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:tenantIds:CreateMeeting' :: Maybe (NonEmpty Text)
tenantIds = forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:CreateMeeting' :: Sensitive Text
clientRequestToken =
          forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pClientRequestToken_,
        $sel:mediaRegion:CreateMeeting' :: Text
mediaRegion = Text
pMediaRegion_,
        $sel:externalMeetingId:CreateMeeting' :: Sensitive Text
externalMeetingId =
          forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pExternalMeetingId_
      }

-- | Lists the audio and video features enabled for a meeting, such as echo
-- reduction.
createMeeting_meetingFeatures :: Lens.Lens' CreateMeeting (Prelude.Maybe MeetingFeaturesConfiguration)
createMeeting_meetingFeatures :: Lens' CreateMeeting (Maybe MeetingFeaturesConfiguration)
createMeeting_meetingFeatures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe MeetingFeaturesConfiguration
meetingFeatures :: Maybe MeetingFeaturesConfiguration
$sel:meetingFeatures:CreateMeeting' :: CreateMeeting -> Maybe MeetingFeaturesConfiguration
meetingFeatures} -> Maybe MeetingFeaturesConfiguration
meetingFeatures) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe MeetingFeaturesConfiguration
a -> CreateMeeting
s {$sel:meetingFeatures:CreateMeeting' :: Maybe MeetingFeaturesConfiguration
meetingFeatures = Maybe MeetingFeaturesConfiguration
a} :: CreateMeeting)

-- | Reserved.
createMeeting_meetingHostId :: Lens.Lens' CreateMeeting (Prelude.Maybe Prelude.Text)
createMeeting_meetingHostId :: Lens' CreateMeeting (Maybe Text)
createMeeting_meetingHostId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe (Sensitive Text)
meetingHostId :: Maybe (Sensitive Text)
$sel:meetingHostId:CreateMeeting' :: CreateMeeting -> Maybe (Sensitive Text)
meetingHostId} -> Maybe (Sensitive Text)
meetingHostId) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe (Sensitive Text)
a -> CreateMeeting
s {$sel:meetingHostId:CreateMeeting' :: Maybe (Sensitive Text)
meetingHostId = Maybe (Sensitive Text)
a} :: CreateMeeting) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The configuration for resource targets to receive notifications when
-- meeting and attendee events occur.
createMeeting_notificationsConfiguration :: Lens.Lens' CreateMeeting (Prelude.Maybe NotificationsConfiguration)
createMeeting_notificationsConfiguration :: Lens' CreateMeeting (Maybe NotificationsConfiguration)
createMeeting_notificationsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe NotificationsConfiguration
notificationsConfiguration :: Maybe NotificationsConfiguration
$sel:notificationsConfiguration:CreateMeeting' :: CreateMeeting -> Maybe NotificationsConfiguration
notificationsConfiguration} -> Maybe NotificationsConfiguration
notificationsConfiguration) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe NotificationsConfiguration
a -> CreateMeeting
s {$sel:notificationsConfiguration:CreateMeeting' :: Maybe NotificationsConfiguration
notificationsConfiguration = Maybe NotificationsConfiguration
a} :: CreateMeeting)

-- | When specified, replicates the media from the primary meeting to the new
-- meeting.
createMeeting_primaryMeetingId :: Lens.Lens' CreateMeeting (Prelude.Maybe Prelude.Text)
createMeeting_primaryMeetingId :: Lens' CreateMeeting (Maybe Text)
createMeeting_primaryMeetingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe Text
primaryMeetingId :: Maybe Text
$sel:primaryMeetingId:CreateMeeting' :: CreateMeeting -> Maybe Text
primaryMeetingId} -> Maybe Text
primaryMeetingId) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe Text
a -> CreateMeeting
s {$sel:primaryMeetingId:CreateMeeting' :: Maybe Text
primaryMeetingId = Maybe Text
a} :: CreateMeeting)

-- | Applies one or more tags to an Amazon Chime SDK meeting. Note the
-- following:
--
-- -   Not all resources have tags. For a list of services with resources
--     that support tagging using this operation, see
--     <https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html Services that support the Resource Groups Tagging API>.
--     If the resource doesn\'t yet support this operation, the resource\'s
--     service might support tagging using its own API operations. For more
--     information, refer to the documentation for that service.
--
-- -   Each resource can have up to 50 tags. For other limits, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions Tag Naming and Usage Conventions>
--     in the /AWS General Reference/.
--
-- -   You can only tag resources that are located in the specified AWS
--     Region for the AWS account.
--
-- -   To add tags to a resource, you need the necessary permissions for
--     the service that the resource belongs to as well as permissions for
--     adding tags. For more information, see the documentation for each
--     service.
--
-- Do not store personally identifiable information (PII) or other
-- confidential or sensitive information in tags. We use tags to provide
-- you with billing and administration services. Tags are not intended to
-- be used for private or sensitive data.
--
-- __Minimum permissions__
--
-- In addition to the @tag:TagResources @permission required by this
-- operation, you must also have the tagging permission defined by the
-- service that created the resource. For example, to tag a
-- @ChimeSDKMeetings@ instance using the @TagResources@ operation, you must
-- have both of the following permissions:
--
-- @tag:TagResources@
--
-- @ChimeSDKMeetings:CreateTags@
--
-- Some services might have specific requirements for tagging some
-- resources. For example, to tag an Amazon S3 bucket, you must also have
-- the @s3:GetBucketTagging@ permission. If the expected minimum
-- permissions don\'t work, check the documentation for that service\'s
-- tagging APIs for more information.
createMeeting_tags :: Lens.Lens' CreateMeeting (Prelude.Maybe [Tag])
createMeeting_tags :: Lens' CreateMeeting (Maybe [Tag])
createMeeting_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateMeeting' :: CreateMeeting -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe [Tag]
a -> CreateMeeting
s {$sel:tags:CreateMeeting' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateMeeting) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A consistent and opaque identifier, created and maintained by the
-- builder to represent a segment of their users.
createMeeting_tenantIds :: Lens.Lens' CreateMeeting (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createMeeting_tenantIds :: Lens' CreateMeeting (Maybe (NonEmpty Text))
createMeeting_tenantIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Maybe (NonEmpty Text)
tenantIds :: Maybe (NonEmpty Text)
$sel:tenantIds:CreateMeeting' :: CreateMeeting -> Maybe (NonEmpty Text)
tenantIds} -> Maybe (NonEmpty Text)
tenantIds) (\s :: CreateMeeting
s@CreateMeeting' {} Maybe (NonEmpty Text)
a -> CreateMeeting
s {$sel:tenantIds:CreateMeeting' :: Maybe (NonEmpty Text)
tenantIds = Maybe (NonEmpty Text)
a} :: CreateMeeting) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier for the client request. Use a different token for
-- different meetings.
createMeeting_clientRequestToken :: Lens.Lens' CreateMeeting Prelude.Text
createMeeting_clientRequestToken :: Lens' CreateMeeting Text
createMeeting_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Sensitive Text
clientRequestToken :: Sensitive Text
$sel:clientRequestToken:CreateMeeting' :: CreateMeeting -> Sensitive Text
clientRequestToken} -> Sensitive Text
clientRequestToken) (\s :: CreateMeeting
s@CreateMeeting' {} Sensitive Text
a -> CreateMeeting
s {$sel:clientRequestToken:CreateMeeting' :: Sensitive Text
clientRequestToken = Sensitive Text
a} :: CreateMeeting) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The Region in which to create the meeting.
--
-- Available values: @af-south-1@, @ap-northeast-1@, @ap-northeast-2@,
-- @ap-south-1@, @ap-southeast-1@, @ap-southeast-2@, @ca-central-1@,
-- @eu-central-1@, @eu-north-1@, @eu-south-1@, @eu-west-1@, @eu-west-2@,
-- @eu-west-3@, @sa-east-1@, @us-east-1@, @us-east-2@, @us-west-1@,
-- @us-west-2@.
--
-- Available values in AWS GovCloud (US) Regions: @us-gov-east-1@,
-- @us-gov-west-1@.
createMeeting_mediaRegion :: Lens.Lens' CreateMeeting Prelude.Text
createMeeting_mediaRegion :: Lens' CreateMeeting Text
createMeeting_mediaRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Text
mediaRegion :: Text
$sel:mediaRegion:CreateMeeting' :: CreateMeeting -> Text
mediaRegion} -> Text
mediaRegion) (\s :: CreateMeeting
s@CreateMeeting' {} Text
a -> CreateMeeting
s {$sel:mediaRegion:CreateMeeting' :: Text
mediaRegion = Text
a} :: CreateMeeting)

-- | The external meeting ID.
createMeeting_externalMeetingId :: Lens.Lens' CreateMeeting Prelude.Text
createMeeting_externalMeetingId :: Lens' CreateMeeting Text
createMeeting_externalMeetingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeeting' {Sensitive Text
externalMeetingId :: Sensitive Text
$sel:externalMeetingId:CreateMeeting' :: CreateMeeting -> Sensitive Text
externalMeetingId} -> Sensitive Text
externalMeetingId) (\s :: CreateMeeting
s@CreateMeeting' {} Sensitive Text
a -> CreateMeeting
s {$sel:externalMeetingId:CreateMeeting' :: Sensitive Text
externalMeetingId = Sensitive Text
a} :: CreateMeeting) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

instance Core.AWSRequest CreateMeeting where
  type
    AWSResponse CreateMeeting =
      CreateMeetingResponse
  request :: (Service -> Service) -> CreateMeeting -> Request CreateMeeting
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateMeeting
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateMeeting)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Meeting -> Int -> CreateMeetingResponse
CreateMeetingResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Meeting")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateMeeting where
  hashWithSalt :: Int -> CreateMeeting -> Int
hashWithSalt Int
_salt CreateMeeting' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe MeetingFeaturesConfiguration
Maybe NotificationsConfiguration
Text
Sensitive Text
externalMeetingId :: Sensitive Text
mediaRegion :: Text
clientRequestToken :: Sensitive Text
tenantIds :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
primaryMeetingId :: Maybe Text
notificationsConfiguration :: Maybe NotificationsConfiguration
meetingHostId :: Maybe (Sensitive Text)
meetingFeatures :: Maybe MeetingFeaturesConfiguration
$sel:externalMeetingId:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:mediaRegion:CreateMeeting' :: CreateMeeting -> Text
$sel:clientRequestToken:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:tenantIds:CreateMeeting' :: CreateMeeting -> Maybe (NonEmpty Text)
$sel:tags:CreateMeeting' :: CreateMeeting -> Maybe [Tag]
$sel:primaryMeetingId:CreateMeeting' :: CreateMeeting -> Maybe Text
$sel:notificationsConfiguration:CreateMeeting' :: CreateMeeting -> Maybe NotificationsConfiguration
$sel:meetingHostId:CreateMeeting' :: CreateMeeting -> Maybe (Sensitive Text)
$sel:meetingFeatures:CreateMeeting' :: CreateMeeting -> Maybe MeetingFeaturesConfiguration
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MeetingFeaturesConfiguration
meetingFeatures
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
meetingHostId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationsConfiguration
notificationsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
primaryMeetingId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
tenantIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
mediaRegion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
externalMeetingId

instance Prelude.NFData CreateMeeting where
  rnf :: CreateMeeting -> ()
rnf CreateMeeting' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe MeetingFeaturesConfiguration
Maybe NotificationsConfiguration
Text
Sensitive Text
externalMeetingId :: Sensitive Text
mediaRegion :: Text
clientRequestToken :: Sensitive Text
tenantIds :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
primaryMeetingId :: Maybe Text
notificationsConfiguration :: Maybe NotificationsConfiguration
meetingHostId :: Maybe (Sensitive Text)
meetingFeatures :: Maybe MeetingFeaturesConfiguration
$sel:externalMeetingId:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:mediaRegion:CreateMeeting' :: CreateMeeting -> Text
$sel:clientRequestToken:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:tenantIds:CreateMeeting' :: CreateMeeting -> Maybe (NonEmpty Text)
$sel:tags:CreateMeeting' :: CreateMeeting -> Maybe [Tag]
$sel:primaryMeetingId:CreateMeeting' :: CreateMeeting -> Maybe Text
$sel:notificationsConfiguration:CreateMeeting' :: CreateMeeting -> Maybe NotificationsConfiguration
$sel:meetingHostId:CreateMeeting' :: CreateMeeting -> Maybe (Sensitive Text)
$sel:meetingFeatures:CreateMeeting' :: CreateMeeting -> Maybe MeetingFeaturesConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe MeetingFeaturesConfiguration
meetingFeatures
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
meetingHostId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationsConfiguration
notificationsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
primaryMeetingId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
tenantIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
mediaRegion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
externalMeetingId

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

instance Data.ToJSON CreateMeeting where
  toJSON :: CreateMeeting -> Value
toJSON CreateMeeting' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe MeetingFeaturesConfiguration
Maybe NotificationsConfiguration
Text
Sensitive Text
externalMeetingId :: Sensitive Text
mediaRegion :: Text
clientRequestToken :: Sensitive Text
tenantIds :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
primaryMeetingId :: Maybe Text
notificationsConfiguration :: Maybe NotificationsConfiguration
meetingHostId :: Maybe (Sensitive Text)
meetingFeatures :: Maybe MeetingFeaturesConfiguration
$sel:externalMeetingId:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:mediaRegion:CreateMeeting' :: CreateMeeting -> Text
$sel:clientRequestToken:CreateMeeting' :: CreateMeeting -> Sensitive Text
$sel:tenantIds:CreateMeeting' :: CreateMeeting -> Maybe (NonEmpty Text)
$sel:tags:CreateMeeting' :: CreateMeeting -> Maybe [Tag]
$sel:primaryMeetingId:CreateMeeting' :: CreateMeeting -> Maybe Text
$sel:notificationsConfiguration:CreateMeeting' :: CreateMeeting -> Maybe NotificationsConfiguration
$sel:meetingHostId:CreateMeeting' :: CreateMeeting -> Maybe (Sensitive Text)
$sel:meetingFeatures:CreateMeeting' :: CreateMeeting -> Maybe MeetingFeaturesConfiguration
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MeetingFeatures" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeetingFeaturesConfiguration
meetingFeatures,
            (Key
"MeetingHostId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
meetingHostId,
            (Key
"NotificationsConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationsConfiguration
notificationsConfiguration,
            (Key
"PrimaryMeetingId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
primaryMeetingId,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"TenantIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
tenantIds,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
clientRequestToken),
            forall a. a -> Maybe a
Prelude.Just (Key
"MediaRegion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
mediaRegion),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ExternalMeetingId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
externalMeetingId)
          ]
      )

instance Data.ToPath CreateMeeting where
  toPath :: CreateMeeting -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/meetings"

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

-- | /See:/ 'newCreateMeetingResponse' smart constructor.
data CreateMeetingResponse = CreateMeetingResponse'
  { -- | The meeting information, including the meeting ID and @MediaPlacement@.
    CreateMeetingResponse -> Maybe Meeting
meeting :: Prelude.Maybe Meeting,
    -- | The response's http status code.
    CreateMeetingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateMeetingResponse -> CreateMeetingResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMeetingResponse -> CreateMeetingResponse -> Bool
$c/= :: CreateMeetingResponse -> CreateMeetingResponse -> Bool
== :: CreateMeetingResponse -> CreateMeetingResponse -> Bool
$c== :: CreateMeetingResponse -> CreateMeetingResponse -> Bool
Prelude.Eq, Int -> CreateMeetingResponse -> ShowS
[CreateMeetingResponse] -> ShowS
CreateMeetingResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMeetingResponse] -> ShowS
$cshowList :: [CreateMeetingResponse] -> ShowS
show :: CreateMeetingResponse -> String
$cshow :: CreateMeetingResponse -> String
showsPrec :: Int -> CreateMeetingResponse -> ShowS
$cshowsPrec :: Int -> CreateMeetingResponse -> ShowS
Prelude.Show, forall x. Rep CreateMeetingResponse x -> CreateMeetingResponse
forall x. CreateMeetingResponse -> Rep CreateMeetingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMeetingResponse x -> CreateMeetingResponse
$cfrom :: forall x. CreateMeetingResponse -> Rep CreateMeetingResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateMeetingResponse' 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:
--
-- 'meeting', 'createMeetingResponse_meeting' - The meeting information, including the meeting ID and @MediaPlacement@.
--
-- 'httpStatus', 'createMeetingResponse_httpStatus' - The response's http status code.
newCreateMeetingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateMeetingResponse
newCreateMeetingResponse :: Int -> CreateMeetingResponse
newCreateMeetingResponse Int
pHttpStatus_ =
  CreateMeetingResponse'
    { $sel:meeting:CreateMeetingResponse' :: Maybe Meeting
meeting = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateMeetingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The meeting information, including the meeting ID and @MediaPlacement@.
createMeetingResponse_meeting :: Lens.Lens' CreateMeetingResponse (Prelude.Maybe Meeting)
createMeetingResponse_meeting :: Lens' CreateMeetingResponse (Maybe Meeting)
createMeetingResponse_meeting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMeetingResponse' {Maybe Meeting
meeting :: Maybe Meeting
$sel:meeting:CreateMeetingResponse' :: CreateMeetingResponse -> Maybe Meeting
meeting} -> Maybe Meeting
meeting) (\s :: CreateMeetingResponse
s@CreateMeetingResponse' {} Maybe Meeting
a -> CreateMeetingResponse
s {$sel:meeting:CreateMeetingResponse' :: Maybe Meeting
meeting = Maybe Meeting
a} :: CreateMeetingResponse)

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

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