module Stratosphere.EC2.ClientVpnEndpoint.ConnectionLogOptionsProperty ( ConnectionLogOptionsProperty(..), mkConnectionLogOptionsProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data ConnectionLogOptionsProperty = -- | See: ConnectionLogOptionsProperty {haddock_workaround_ :: (), -- | See: cloudwatchLogGroup :: (Prelude.Maybe (Value Prelude.Text)), -- | See: cloudwatchLogStream :: (Prelude.Maybe (Value Prelude.Text)), -- | See: enabled :: (Value Prelude.Bool)} deriving stock (Prelude.Eq, Prelude.Show) mkConnectionLogOptionsProperty :: Value Prelude.Bool -> ConnectionLogOptionsProperty mkConnectionLogOptionsProperty enabled = ConnectionLogOptionsProperty {haddock_workaround_ = (), enabled = enabled, cloudwatchLogGroup = Prelude.Nothing, cloudwatchLogStream = Prelude.Nothing} instance ToResourceProperties ConnectionLogOptionsProperty where toResourceProperties ConnectionLogOptionsProperty {..} = ResourceProperties {awsType = "AWS::EC2::ClientVpnEndpoint.ConnectionLogOptions", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["Enabled" JSON..= enabled] (Prelude.catMaybes [(JSON..=) "CloudwatchLogGroup" Prelude.<$> cloudwatchLogGroup, (JSON..=) "CloudwatchLogStream" Prelude.<$> cloudwatchLogStream]))} instance JSON.ToJSON ConnectionLogOptionsProperty where toJSON ConnectionLogOptionsProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Enabled" JSON..= enabled] (Prelude.catMaybes [(JSON..=) "CloudwatchLogGroup" Prelude.<$> cloudwatchLogGroup, (JSON..=) "CloudwatchLogStream" Prelude.<$> cloudwatchLogStream]))) instance Property "CloudwatchLogGroup" ConnectionLogOptionsProperty where type PropertyType "CloudwatchLogGroup" ConnectionLogOptionsProperty = Value Prelude.Text set newValue ConnectionLogOptionsProperty {..} = ConnectionLogOptionsProperty {cloudwatchLogGroup = Prelude.pure newValue, ..} instance Property "CloudwatchLogStream" ConnectionLogOptionsProperty where type PropertyType "CloudwatchLogStream" ConnectionLogOptionsProperty = Value Prelude.Text set newValue ConnectionLogOptionsProperty {..} = ConnectionLogOptionsProperty {cloudwatchLogStream = Prelude.pure newValue, ..} instance Property "Enabled" ConnectionLogOptionsProperty where type PropertyType "Enabled" ConnectionLogOptionsProperty = Value Prelude.Bool set newValue ConnectionLogOptionsProperty {..} = ConnectionLogOptionsProperty {enabled = newValue, ..}