module Stratosphere.DataZone.FormType ( module Exports, FormType(..), mkFormType ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.DataZone.FormType.ModelProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Value data FormType = -- | See: FormType {haddock_workaround_ :: (), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: domainIdentifier :: (Value Prelude.Text), -- | See: model :: ModelProperty, -- | See: name :: (Value Prelude.Text), -- | See: owningProjectIdentifier :: (Value Prelude.Text), -- | See: status :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkFormType :: Value Prelude.Text -> ModelProperty -> Value Prelude.Text -> Value Prelude.Text -> FormType mkFormType domainIdentifier model name owningProjectIdentifier = FormType {haddock_workaround_ = (), domainIdentifier = domainIdentifier, model = model, name = name, owningProjectIdentifier = owningProjectIdentifier, description = Prelude.Nothing, status = Prelude.Nothing} instance ToResourceProperties FormType where toResourceProperties FormType {..} = ResourceProperties {awsType = "AWS::DataZone::FormType", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["DomainIdentifier" JSON..= domainIdentifier, "Model" JSON..= model, "Name" JSON..= name, "OwningProjectIdentifier" JSON..= owningProjectIdentifier] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Status" Prelude.<$> status]))} instance JSON.ToJSON FormType where toJSON FormType {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["DomainIdentifier" JSON..= domainIdentifier, "Model" JSON..= model, "Name" JSON..= name, "OwningProjectIdentifier" JSON..= owningProjectIdentifier] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Status" Prelude.<$> status]))) instance Property "Description" FormType where type PropertyType "Description" FormType = Value Prelude.Text set newValue FormType {..} = FormType {description = Prelude.pure newValue, ..} instance Property "DomainIdentifier" FormType where type PropertyType "DomainIdentifier" FormType = Value Prelude.Text set newValue FormType {..} = FormType {domainIdentifier = newValue, ..} instance Property "Model" FormType where type PropertyType "Model" FormType = ModelProperty set newValue FormType {..} = FormType {model = newValue, ..} instance Property "Name" FormType where type PropertyType "Name" FormType = Value Prelude.Text set newValue FormType {..} = FormType {name = newValue, ..} instance Property "OwningProjectIdentifier" FormType where type PropertyType "OwningProjectIdentifier" FormType = Value Prelude.Text set newValue FormType {..} = FormType {owningProjectIdentifier = newValue, ..} instance Property "Status" FormType where type PropertyType "Status" FormType = Value Prelude.Text set newValue FormType {..} = FormType {status = Prelude.pure newValue, ..}