Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Io.Superposition.Model.CreateWorkspaceInput (
setAutoPopulateControl,
setEnableContextValidation,
setEnableChangeReasonValidation,
setChangeReason,
build,
CreateWorkspaceInputBuilder,
CreateWorkspaceInput,
Expand All @@ -19,7 +20,8 @@ module Io.Superposition.Model.CreateWorkspaceInput (
allow_experiment_self_approval,
auto_populate_control,
enable_context_validation,
enable_change_reason_validation
enable_change_reason_validation,
change_reason
) where
import qualified Control.Applicative
import qualified Control.Monad.State.Strict
Expand All @@ -44,7 +46,8 @@ data CreateWorkspaceInput = CreateWorkspaceInput {
allow_experiment_self_approval :: Data.Maybe.Maybe Bool,
auto_populate_control :: Data.Maybe.Maybe Bool,
enable_context_validation :: Data.Maybe.Maybe Bool,
enable_change_reason_validation :: Data.Maybe.Maybe Bool
enable_change_reason_validation :: Data.Maybe.Maybe Bool,
change_reason :: Data.Text.Text
} deriving (
GHC.Show.Show,
Data.Eq.Eq,
Expand All @@ -61,7 +64,8 @@ instance Data.Aeson.ToJSON CreateWorkspaceInput where
"allow_experiment_self_approval" Data.Aeson..= allow_experiment_self_approval a,
"auto_populate_control" Data.Aeson..= auto_populate_control a,
"enable_context_validation" Data.Aeson..= enable_context_validation a,
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a,
"change_reason" Data.Aeson..= change_reason a
]


Expand All @@ -78,6 +82,7 @@ instance Data.Aeson.FromJSON CreateWorkspaceInput where
Control.Applicative.<*> (v Data.Aeson..:? "auto_populate_control")
Control.Applicative.<*> (v Data.Aeson..:? "enable_context_validation")
Control.Applicative.<*> (v Data.Aeson..:? "enable_change_reason_validation")
Control.Applicative.<*> (v Data.Aeson..: "change_reason")



Expand All @@ -91,7 +96,8 @@ data CreateWorkspaceInputBuilderState = CreateWorkspaceInputBuilderState {
allow_experiment_self_approvalBuilderState :: Data.Maybe.Maybe Bool,
auto_populate_controlBuilderState :: Data.Maybe.Maybe Bool,
enable_context_validationBuilderState :: Data.Maybe.Maybe Bool,
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool,
change_reasonBuilderState :: Data.Maybe.Maybe Data.Text.Text
} deriving (
GHC.Generics.Generic
)
Expand All @@ -106,7 +112,8 @@ defaultBuilderState = CreateWorkspaceInputBuilderState {
allow_experiment_self_approvalBuilderState = Data.Maybe.Nothing,
auto_populate_controlBuilderState = Data.Maybe.Nothing,
enable_context_validationBuilderState = Data.Maybe.Nothing,
enable_change_reason_validationBuilderState = Data.Maybe.Nothing
enable_change_reason_validationBuilderState = Data.Maybe.Nothing,
change_reasonBuilderState = Data.Maybe.Nothing
}

type CreateWorkspaceInputBuilder = Control.Monad.State.Strict.State CreateWorkspaceInputBuilderState
Expand Down Expand Up @@ -147,6 +154,10 @@ setEnableChangeReasonValidation :: Data.Maybe.Maybe Bool -> CreateWorkspaceInput
setEnableChangeReasonValidation value =
Control.Monad.State.Strict.modify (\s -> (s { enable_change_reason_validationBuilderState = value }))

setChangeReason :: Data.Text.Text -> CreateWorkspaceInputBuilder ()
setChangeReason value =
Control.Monad.State.Strict.modify (\s -> (s { change_reasonBuilderState = Data.Maybe.Just value }))

build :: CreateWorkspaceInputBuilder () -> Data.Either.Either Data.Text.Text CreateWorkspaceInput
build builder = do
let (_, st) = Control.Monad.State.Strict.runState builder defaultBuilderState
Expand All @@ -159,6 +170,7 @@ build builder = do
auto_populate_control' <- Data.Either.Right (auto_populate_controlBuilderState st)
enable_context_validation' <- Data.Either.Right (enable_context_validationBuilderState st)
enable_change_reason_validation' <- Data.Either.Right (enable_change_reason_validationBuilderState st)
change_reason' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.CreateWorkspaceInput.CreateWorkspaceInput.change_reason is a required property.") Data.Either.Right (change_reasonBuilderState st)
Data.Either.Right (CreateWorkspaceInput {
org_id = org_id',
workspace_admin_email = workspace_admin_email',
Expand All @@ -168,7 +180,8 @@ build builder = do
allow_experiment_self_approval = allow_experiment_self_approval',
auto_populate_control = auto_populate_control',
enable_context_validation = enable_context_validation',
enable_change_reason_validation = enable_change_reason_validation'
enable_change_reason_validation = enable_change_reason_validation',
change_reason = change_reason'
})


Expand All @@ -181,6 +194,7 @@ instance Io.Superposition.Utility.IntoRequestBuilder CreateWorkspaceInput where

Io.Superposition.Utility.serHeader "x-org-id" (org_id self)
Io.Superposition.Utility.serField "allow_experiment_self_approval" (allow_experiment_self_approval self)
Io.Superposition.Utility.serField "change_reason" (change_reason self)
Io.Superposition.Utility.serField "workspace_admin_email" (workspace_admin_email self)
Io.Superposition.Utility.serField "auto_populate_control" (auto_populate_control self)
Io.Superposition.Utility.serField "enable_context_validation" (enable_context_validation self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Io.Superposition.Model.CreateWorkspaceOutput (
setAutoPopulateControl,
setEnableContextValidation,
setEnableChangeReasonValidation,
setChangeReason,
build,
CreateWorkspaceOutputBuilder,
CreateWorkspaceOutput,
Expand All @@ -35,7 +36,8 @@ module Io.Superposition.Model.CreateWorkspaceOutput (
allow_experiment_self_approval,
auto_populate_control,
enable_context_validation,
enable_change_reason_validation
enable_change_reason_validation,
change_reason
) where
import qualified Control.Applicative
import qualified Control.Monad.State.Strict
Expand Down Expand Up @@ -69,7 +71,8 @@ data CreateWorkspaceOutput = CreateWorkspaceOutput {
allow_experiment_self_approval :: Bool,
auto_populate_control :: Bool,
enable_context_validation :: Bool,
enable_change_reason_validation :: Bool
enable_change_reason_validation :: Bool,
change_reason :: Data.Text.Text
} deriving (
GHC.Show.Show,
Data.Eq.Eq,
Expand All @@ -94,7 +97,8 @@ instance Data.Aeson.ToJSON CreateWorkspaceOutput where
"allow_experiment_self_approval" Data.Aeson..= allow_experiment_self_approval a,
"auto_populate_control" Data.Aeson..= auto_populate_control a,
"enable_context_validation" Data.Aeson..= enable_context_validation a,
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a,
"change_reason" Data.Aeson..= change_reason a
]


Expand All @@ -119,6 +123,7 @@ instance Data.Aeson.FromJSON CreateWorkspaceOutput where
Control.Applicative.<*> (v Data.Aeson..: "auto_populate_control")
Control.Applicative.<*> (v Data.Aeson..: "enable_context_validation")
Control.Applicative.<*> (v Data.Aeson..: "enable_change_reason_validation")
Control.Applicative.<*> (v Data.Aeson..: "change_reason")



Expand All @@ -140,7 +145,8 @@ data CreateWorkspaceOutputBuilderState = CreateWorkspaceOutputBuilderState {
allow_experiment_self_approvalBuilderState :: Data.Maybe.Maybe Bool,
auto_populate_controlBuilderState :: Data.Maybe.Maybe Bool,
enable_context_validationBuilderState :: Data.Maybe.Maybe Bool,
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool,
change_reasonBuilderState :: Data.Maybe.Maybe Data.Text.Text
} deriving (
GHC.Generics.Generic
)
Expand All @@ -163,7 +169,8 @@ defaultBuilderState = CreateWorkspaceOutputBuilderState {
allow_experiment_self_approvalBuilderState = Data.Maybe.Nothing,
auto_populate_controlBuilderState = Data.Maybe.Nothing,
enable_context_validationBuilderState = Data.Maybe.Nothing,
enable_change_reason_validationBuilderState = Data.Maybe.Nothing
enable_change_reason_validationBuilderState = Data.Maybe.Nothing,
change_reasonBuilderState = Data.Maybe.Nothing
}

type CreateWorkspaceOutputBuilder = Control.Monad.State.Strict.State CreateWorkspaceOutputBuilderState
Expand Down Expand Up @@ -236,6 +243,10 @@ setEnableChangeReasonValidation :: Bool -> CreateWorkspaceOutputBuilder ()
setEnableChangeReasonValidation value =
Control.Monad.State.Strict.modify (\s -> (s { enable_change_reason_validationBuilderState = Data.Maybe.Just value }))

setChangeReason :: Data.Text.Text -> CreateWorkspaceOutputBuilder ()
setChangeReason value =
Control.Monad.State.Strict.modify (\s -> (s { change_reasonBuilderState = Data.Maybe.Just value }))

build :: CreateWorkspaceOutputBuilder () -> Data.Either.Either Data.Text.Text CreateWorkspaceOutput
build builder = do
let (_, st) = Control.Monad.State.Strict.runState builder defaultBuilderState
Expand All @@ -256,6 +267,7 @@ build builder = do
auto_populate_control' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.CreateWorkspaceOutput.CreateWorkspaceOutput.auto_populate_control is a required property.") Data.Either.Right (auto_populate_controlBuilderState st)
enable_context_validation' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.CreateWorkspaceOutput.CreateWorkspaceOutput.enable_context_validation is a required property.") Data.Either.Right (enable_context_validationBuilderState st)
enable_change_reason_validation' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.CreateWorkspaceOutput.CreateWorkspaceOutput.enable_change_reason_validation is a required property.") Data.Either.Right (enable_change_reason_validationBuilderState st)
change_reason' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.CreateWorkspaceOutput.CreateWorkspaceOutput.change_reason is a required property.") Data.Either.Right (change_reasonBuilderState st)
Data.Either.Right (CreateWorkspaceOutput {
workspace_name = workspace_name',
organisation_id = organisation_id',
Expand All @@ -273,7 +285,8 @@ build builder = do
allow_experiment_self_approval = allow_experiment_self_approval',
auto_populate_control = auto_populate_control',
enable_context_validation = enable_context_validation',
enable_change_reason_validation = enable_change_reason_validation'
enable_change_reason_validation = enable_change_reason_validation',
change_reason = change_reason'
})


Expand All @@ -295,14 +308,15 @@ instance Io.Superposition.Utility.FromResponseParser CreateWorkspaceOutput where
var11 <- Io.Superposition.Utility.deSerField "last_modified_at"
var12 <- Io.Superposition.Utility.deSerField "organisation_id"
var13 <- Io.Superposition.Utility.deSerField "allow_experiment_self_approval"
var14 <- Io.Superposition.Utility.deSerField "workspace_schema_name"
var15 <- Io.Superposition.Utility.deSerField "metrics"
var16 <- Io.Superposition.Utility.deSerField "workspace_name"
var14 <- Io.Superposition.Utility.deSerField "change_reason"
var15 <- Io.Superposition.Utility.deSerField "workspace_schema_name"
var16 <- Io.Superposition.Utility.deSerField "metrics"
var17 <- Io.Superposition.Utility.deSerField "workspace_name"
pure $ CreateWorkspaceOutput {
workspace_name = var16,
workspace_name = var17,
organisation_id = var12,
organisation_name = var4,
workspace_schema_name = var14,
workspace_schema_name = var15,
workspace_status = var10,
workspace_admin_email = var0,
config_version = var7,
Expand All @@ -311,10 +325,11 @@ instance Io.Superposition.Utility.FromResponseParser CreateWorkspaceOutput where
last_modified_at = var11,
created_at = var3,
mandatory_dimensions = var8,
metrics = var15,
metrics = var16,
allow_experiment_self_approval = var13,
auto_populate_control = var1,
enable_context_validation = var2,
enable_change_reason_validation = var9
enable_change_reason_validation = var9,
change_reason = var14
}

41 changes: 28 additions & 13 deletions clients/haskell/sdk/Io/Superposition/Model/GetWorkspaceOutput.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Io.Superposition.Model.GetWorkspaceOutput (
setAutoPopulateControl,
setEnableContextValidation,
setEnableChangeReasonValidation,
setChangeReason,
build,
GetWorkspaceOutputBuilder,
GetWorkspaceOutput,
Expand All @@ -35,7 +36,8 @@ module Io.Superposition.Model.GetWorkspaceOutput (
allow_experiment_self_approval,
auto_populate_control,
enable_context_validation,
enable_change_reason_validation
enable_change_reason_validation,
change_reason
) where
import qualified Control.Applicative
import qualified Control.Monad.State.Strict
Expand Down Expand Up @@ -69,7 +71,8 @@ data GetWorkspaceOutput = GetWorkspaceOutput {
allow_experiment_self_approval :: Bool,
auto_populate_control :: Bool,
enable_context_validation :: Bool,
enable_change_reason_validation :: Bool
enable_change_reason_validation :: Bool,
change_reason :: Data.Text.Text
} deriving (
GHC.Show.Show,
Data.Eq.Eq,
Expand All @@ -94,7 +97,8 @@ instance Data.Aeson.ToJSON GetWorkspaceOutput where
"allow_experiment_self_approval" Data.Aeson..= allow_experiment_self_approval a,
"auto_populate_control" Data.Aeson..= auto_populate_control a,
"enable_context_validation" Data.Aeson..= enable_context_validation a,
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a
"enable_change_reason_validation" Data.Aeson..= enable_change_reason_validation a,
"change_reason" Data.Aeson..= change_reason a
]


Expand All @@ -119,6 +123,7 @@ instance Data.Aeson.FromJSON GetWorkspaceOutput where
Control.Applicative.<*> (v Data.Aeson..: "auto_populate_control")
Control.Applicative.<*> (v Data.Aeson..: "enable_context_validation")
Control.Applicative.<*> (v Data.Aeson..: "enable_change_reason_validation")
Control.Applicative.<*> (v Data.Aeson..: "change_reason")



Expand All @@ -140,7 +145,8 @@ data GetWorkspaceOutputBuilderState = GetWorkspaceOutputBuilderState {
allow_experiment_self_approvalBuilderState :: Data.Maybe.Maybe Bool,
auto_populate_controlBuilderState :: Data.Maybe.Maybe Bool,
enable_context_validationBuilderState :: Data.Maybe.Maybe Bool,
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool
enable_change_reason_validationBuilderState :: Data.Maybe.Maybe Bool,
change_reasonBuilderState :: Data.Maybe.Maybe Data.Text.Text
} deriving (
GHC.Generics.Generic
)
Expand All @@ -163,7 +169,8 @@ defaultBuilderState = GetWorkspaceOutputBuilderState {
allow_experiment_self_approvalBuilderState = Data.Maybe.Nothing,
auto_populate_controlBuilderState = Data.Maybe.Nothing,
enable_context_validationBuilderState = Data.Maybe.Nothing,
enable_change_reason_validationBuilderState = Data.Maybe.Nothing
enable_change_reason_validationBuilderState = Data.Maybe.Nothing,
change_reasonBuilderState = Data.Maybe.Nothing
}

type GetWorkspaceOutputBuilder = Control.Monad.State.Strict.State GetWorkspaceOutputBuilderState
Expand Down Expand Up @@ -236,6 +243,10 @@ setEnableChangeReasonValidation :: Bool -> GetWorkspaceOutputBuilder ()
setEnableChangeReasonValidation value =
Control.Monad.State.Strict.modify (\s -> (s { enable_change_reason_validationBuilderState = Data.Maybe.Just value }))

setChangeReason :: Data.Text.Text -> GetWorkspaceOutputBuilder ()
setChangeReason value =
Control.Monad.State.Strict.modify (\s -> (s { change_reasonBuilderState = Data.Maybe.Just value }))

build :: GetWorkspaceOutputBuilder () -> Data.Either.Either Data.Text.Text GetWorkspaceOutput
build builder = do
let (_, st) = Control.Monad.State.Strict.runState builder defaultBuilderState
Expand All @@ -256,6 +267,7 @@ build builder = do
auto_populate_control' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.GetWorkspaceOutput.GetWorkspaceOutput.auto_populate_control is a required property.") Data.Either.Right (auto_populate_controlBuilderState st)
enable_context_validation' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.GetWorkspaceOutput.GetWorkspaceOutput.enable_context_validation is a required property.") Data.Either.Right (enable_context_validationBuilderState st)
enable_change_reason_validation' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.GetWorkspaceOutput.GetWorkspaceOutput.enable_change_reason_validation is a required property.") Data.Either.Right (enable_change_reason_validationBuilderState st)
change_reason' <- Data.Maybe.maybe (Data.Either.Left "Io.Superposition.Model.GetWorkspaceOutput.GetWorkspaceOutput.change_reason is a required property.") Data.Either.Right (change_reasonBuilderState st)
Data.Either.Right (GetWorkspaceOutput {
workspace_name = workspace_name',
organisation_id = organisation_id',
Expand All @@ -273,7 +285,8 @@ build builder = do
allow_experiment_self_approval = allow_experiment_self_approval',
auto_populate_control = auto_populate_control',
enable_context_validation = enable_context_validation',
enable_change_reason_validation = enable_change_reason_validation'
enable_change_reason_validation = enable_change_reason_validation',
change_reason = change_reason'
})


Expand All @@ -295,14 +308,15 @@ instance Io.Superposition.Utility.FromResponseParser GetWorkspaceOutput where
var11 <- Io.Superposition.Utility.deSerField "last_modified_at"
var12 <- Io.Superposition.Utility.deSerField "organisation_id"
var13 <- Io.Superposition.Utility.deSerField "allow_experiment_self_approval"
var14 <- Io.Superposition.Utility.deSerField "workspace_schema_name"
var15 <- Io.Superposition.Utility.deSerField "metrics"
var16 <- Io.Superposition.Utility.deSerField "workspace_name"
var14 <- Io.Superposition.Utility.deSerField "change_reason"
var15 <- Io.Superposition.Utility.deSerField "workspace_schema_name"
var16 <- Io.Superposition.Utility.deSerField "metrics"
var17 <- Io.Superposition.Utility.deSerField "workspace_name"
pure $ GetWorkspaceOutput {
workspace_name = var16,
workspace_name = var17,
organisation_id = var12,
organisation_name = var4,
workspace_schema_name = var14,
workspace_schema_name = var15,
workspace_status = var10,
workspace_admin_email = var0,
config_version = var7,
Expand All @@ -311,10 +325,11 @@ instance Io.Superposition.Utility.FromResponseParser GetWorkspaceOutput where
last_modified_at = var11,
created_at = var3,
mandatory_dimensions = var8,
metrics = var15,
metrics = var16,
allow_experiment_self_approval = var13,
auto_populate_control = var1,
enable_context_validation = var2,
enable_change_reason_validation = var9
enable_change_reason_validation = var9,
change_reason = var14
}

Loading
Loading