{-# 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.MediaTailor.DeleteChannel -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Deletes a channel. For information about MediaTailor channels, see -- -- in the /MediaTailor User Guide/. module Amazonka.MediaTailor.DeleteChannel ( -- * Creating a Request DeleteChannel (..), newDeleteChannel, -- * Request Lenses deleteChannel_channelName, -- * Destructuring the Response DeleteChannelResponse (..), newDeleteChannelResponse, -- * Response Lenses deleteChannelResponse_httpStatus, ) where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.MediaTailor.Types import qualified Amazonka.Prelude as Prelude import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | /See:/ 'newDeleteChannel' smart constructor. data DeleteChannel = DeleteChannel' { -- | The name of the channel. channelName :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteChannel' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'channelName', 'deleteChannel_channelName' - The name of the channel. newDeleteChannel :: -- | 'channelName' Prelude.Text -> DeleteChannel newDeleteChannel pChannelName_ = DeleteChannel' {channelName = pChannelName_} -- | The name of the channel. deleteChannel_channelName :: Lens.Lens' DeleteChannel Prelude.Text deleteChannel_channelName = Lens.lens (\DeleteChannel' {channelName} -> channelName) (\s@DeleteChannel' {} a -> s {channelName = a} :: DeleteChannel) instance Core.AWSRequest DeleteChannel where type AWSResponse DeleteChannel = DeleteChannelResponse request overrides = Request.delete (overrides defaultService) response = Response.receiveEmpty ( \s h x -> DeleteChannelResponse' Prelude.<$> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable DeleteChannel where hashWithSalt _salt DeleteChannel' {..} = _salt `Prelude.hashWithSalt` channelName instance Prelude.NFData DeleteChannel where rnf DeleteChannel' {..} = Prelude.rnf channelName instance Data.ToHeaders DeleteChannel where toHeaders = Prelude.const ( Prelude.mconcat [ "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToPath DeleteChannel where toPath DeleteChannel' {..} = Prelude.mconcat ["/channel/", Data.toBS channelName] instance Data.ToQuery DeleteChannel where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newDeleteChannelResponse' smart constructor. data DeleteChannelResponse = DeleteChannelResponse' { -- | The response's http status code. httpStatus :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteChannelResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'httpStatus', 'deleteChannelResponse_httpStatus' - The response's http status code. newDeleteChannelResponse :: -- | 'httpStatus' Prelude.Int -> DeleteChannelResponse newDeleteChannelResponse pHttpStatus_ = DeleteChannelResponse' {httpStatus = pHttpStatus_} -- | The response's http status code. deleteChannelResponse_httpStatus :: Lens.Lens' DeleteChannelResponse Prelude.Int deleteChannelResponse_httpStatus = Lens.lens (\DeleteChannelResponse' {httpStatus} -> httpStatus) (\s@DeleteChannelResponse' {} a -> s {httpStatus = a} :: DeleteChannelResponse) instance Prelude.NFData DeleteChannelResponse where rnf DeleteChannelResponse' {..} = Prelude.rnf httpStatus