{-# 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.AlexaBusiness.DeleteNetworkProfile -- 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 network profile by the network profile ARN. module Amazonka.AlexaBusiness.DeleteNetworkProfile ( -- * Creating a Request DeleteNetworkProfile (..), newDeleteNetworkProfile, -- * Request Lenses deleteNetworkProfile_networkProfileArn, -- * Destructuring the Response DeleteNetworkProfileResponse (..), newDeleteNetworkProfileResponse, -- * Response Lenses deleteNetworkProfileResponse_httpStatus, ) where import Amazonka.AlexaBusiness.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:/ 'newDeleteNetworkProfile' smart constructor. data DeleteNetworkProfile = DeleteNetworkProfile' { -- | The ARN of the network profile associated with a device. networkProfileArn :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteNetworkProfile' 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: -- -- 'networkProfileArn', 'deleteNetworkProfile_networkProfileArn' - The ARN of the network profile associated with a device. newDeleteNetworkProfile :: -- | 'networkProfileArn' Prelude.Text -> DeleteNetworkProfile newDeleteNetworkProfile pNetworkProfileArn_ = DeleteNetworkProfile' { networkProfileArn = pNetworkProfileArn_ } -- | The ARN of the network profile associated with a device. deleteNetworkProfile_networkProfileArn :: Lens.Lens' DeleteNetworkProfile Prelude.Text deleteNetworkProfile_networkProfileArn = Lens.lens (\DeleteNetworkProfile' {networkProfileArn} -> networkProfileArn) (\s@DeleteNetworkProfile' {} a -> s {networkProfileArn = a} :: DeleteNetworkProfile) instance Core.AWSRequest DeleteNetworkProfile where type AWSResponse DeleteNetworkProfile = DeleteNetworkProfileResponse request overrides = Request.postJSON (overrides defaultService) response = Response.receiveEmpty ( \s h x -> DeleteNetworkProfileResponse' Prelude.<$> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable DeleteNetworkProfile where hashWithSalt _salt DeleteNetworkProfile' {..} = _salt `Prelude.hashWithSalt` networkProfileArn instance Prelude.NFData DeleteNetworkProfile where rnf DeleteNetworkProfile' {..} = Prelude.rnf networkProfileArn instance Data.ToHeaders DeleteNetworkProfile where toHeaders = Prelude.const ( Prelude.mconcat [ "X-Amz-Target" Data.=# ( "AlexaForBusiness.DeleteNetworkProfile" :: Prelude.ByteString ), "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON DeleteNetworkProfile where toJSON DeleteNetworkProfile' {..} = Data.object ( Prelude.catMaybes [ Prelude.Just ("NetworkProfileArn" Data..= networkProfileArn) ] ) instance Data.ToPath DeleteNetworkProfile where toPath = Prelude.const "/" instance Data.ToQuery DeleteNetworkProfile where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newDeleteNetworkProfileResponse' smart constructor. data DeleteNetworkProfileResponse = DeleteNetworkProfileResponse' { -- | The response's http status code. httpStatus :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteNetworkProfileResponse' 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', 'deleteNetworkProfileResponse_httpStatus' - The response's http status code. newDeleteNetworkProfileResponse :: -- | 'httpStatus' Prelude.Int -> DeleteNetworkProfileResponse newDeleteNetworkProfileResponse pHttpStatus_ = DeleteNetworkProfileResponse' { httpStatus = pHttpStatus_ } -- | The response's http status code. deleteNetworkProfileResponse_httpStatus :: Lens.Lens' DeleteNetworkProfileResponse Prelude.Int deleteNetworkProfileResponse_httpStatus = Lens.lens (\DeleteNetworkProfileResponse' {httpStatus} -> httpStatus) (\s@DeleteNetworkProfileResponse' {} a -> s {httpStatus = a} :: DeleteNetworkProfileResponse) instance Prelude.NFData DeleteNetworkProfileResponse where rnf DeleteNetworkProfileResponse' {..} = Prelude.rnf httpStatus