{-# 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.DeviceFarm.DeleteProject -- 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 an AWS Device Farm project, given the project ARN. -- -- Deleting this resource does not stop an in-progress run. module Amazonka.DeviceFarm.DeleteProject ( -- * Creating a Request DeleteProject (..), newDeleteProject, -- * Request Lenses deleteProject_arn, -- * Destructuring the Response DeleteProjectResponse (..), newDeleteProjectResponse, -- * Response Lenses deleteProjectResponse_httpStatus, ) where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.DeviceFarm.Types import qualified Amazonka.Prelude as Prelude import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | Represents a request to the delete project operation. -- -- /See:/ 'newDeleteProject' smart constructor. data DeleteProject = DeleteProject' { -- | Represents the Amazon Resource Name (ARN) of the Device Farm project to -- delete. arn :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteProject' 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: -- -- 'arn', 'deleteProject_arn' - Represents the Amazon Resource Name (ARN) of the Device Farm project to -- delete. newDeleteProject :: -- | 'arn' Prelude.Text -> DeleteProject newDeleteProject pArn_ = DeleteProject' {arn = pArn_} -- | Represents the Amazon Resource Name (ARN) of the Device Farm project to -- delete. deleteProject_arn :: Lens.Lens' DeleteProject Prelude.Text deleteProject_arn = Lens.lens (\DeleteProject' {arn} -> arn) (\s@DeleteProject' {} a -> s {arn = a} :: DeleteProject) instance Core.AWSRequest DeleteProject where type AWSResponse DeleteProject = DeleteProjectResponse request overrides = Request.postJSON (overrides defaultService) response = Response.receiveEmpty ( \s h x -> DeleteProjectResponse' Prelude.<$> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable DeleteProject where hashWithSalt _salt DeleteProject' {..} = _salt `Prelude.hashWithSalt` arn instance Prelude.NFData DeleteProject where rnf DeleteProject' {..} = Prelude.rnf arn instance Data.ToHeaders DeleteProject where toHeaders = Prelude.const ( Prelude.mconcat [ "X-Amz-Target" Data.=# ( "DeviceFarm_20150623.DeleteProject" :: Prelude.ByteString ), "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON DeleteProject where toJSON DeleteProject' {..} = Data.object ( Prelude.catMaybes [Prelude.Just ("arn" Data..= arn)] ) instance Data.ToPath DeleteProject where toPath = Prelude.const "/" instance Data.ToQuery DeleteProject where toQuery = Prelude.const Prelude.mempty -- | Represents the result of a delete project request. -- -- /See:/ 'newDeleteProjectResponse' smart constructor. data DeleteProjectResponse = DeleteProjectResponse' { -- | The response's http status code. httpStatus :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteProjectResponse' 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', 'deleteProjectResponse_httpStatus' - The response's http status code. newDeleteProjectResponse :: -- | 'httpStatus' Prelude.Int -> DeleteProjectResponse newDeleteProjectResponse pHttpStatus_ = DeleteProjectResponse' {httpStatus = pHttpStatus_} -- | The response's http status code. deleteProjectResponse_httpStatus :: Lens.Lens' DeleteProjectResponse Prelude.Int deleteProjectResponse_httpStatus = Lens.lens (\DeleteProjectResponse' {httpStatus} -> httpStatus) (\s@DeleteProjectResponse' {} a -> s {httpStatus = a} :: DeleteProjectResponse) instance Prelude.NFData DeleteProjectResponse where rnf DeleteProjectResponse' {..} = Prelude.rnf httpStatus