diff --git a/models.go b/models.go index dd10b692..81d23581 100644 --- a/models.go +++ b/models.go @@ -476,13 +476,13 @@ type AdapterConfiguration struct { } // PolicyEnforcementMode is an enum type for PolicyEnforcementMode of ResourceServerRepresentation -type PolicyEnforcementMode int +type PolicyEnforcementMode string // PolicyEnforcementMode values -const ( - ENFORCING PolicyEnforcementMode = iota - PERMISSIVE - DISABLED +var ( + ENFORCING = PolicyEnforcementModeP("ENFORCING") + PERMISSIVE = PolicyEnforcementModeP("PERMISSIVE") + DISABLED = PolicyEnforcementModeP("DISABLED") ) // Logic is an enum type for policy logic diff --git a/utils.go b/utils.go index e9421ab1..fce663bf 100644 --- a/utils.go +++ b/utils.go @@ -122,11 +122,16 @@ func DecisionStrategyP(value DecisionStrategy) *DecisionStrategy { return &value } -// LogicP returns a pointer for a LogicP value +// LogicP returns a pointer for a Logic value func LogicP(value Logic) *Logic { return &value } +// PolicyEnforcementModeP returns a pointer for a PolicyEnforcementMode value +func PolicyEnforcementModeP(value PolicyEnforcementMode) *PolicyEnforcementMode { + return &value +} + // PStringSlice converts a pointer to []string or returns ampty slice if nill value func PStringSlice(value *[]string) []string { if value == nil {