Skip to main content

ItemPolicyValue

Enumeration of values available for configuring Policies for Items

Constants

rawValue : ``

The corresponding value of the raw type. A new instance initialized with rawValue will be equivalent to this instance. For example:

all : Enum Case

All Context users can perform this action

none : Enum Case

No one can perform this action

default : Enum Case

Take the default value

inherit : Enum Case

Take the value from the Context

owner : Enum Case

Only Container owner can perform this action

itemOwner : Enum Case

Only item owner can perform this action

user : Enum Case

All Container users can perform this action

manager : Enum Case

All Container managers can perform this action

complex(_:) : Enum Case

This case sould not be used directly, It’s here to represent values generated by and(_:) &or(_:)

Methods

init(rawValue:)

Creates a new instance with the specified raw value. If there is no value of the type that corresponds with the specified raw value, this initializer returns nil. For example:

public init?(rawValue: std.string)

NameTypeDescription
rawValuestd.stringThe raw value to use for the new instance.

andMutating(_:)

Changes self to .complex, where the associated value consists of self.rawValue and val.rawValueconnected with &.

public mutating func andMutating(
_ val:ItemPolicyValue
) -> ItemPolicyValue

NameTypeDescription
valItemPolicyValuePolicy value to be appended with “AND” operator

TypeDescription
ItemPolicyValue modified `self`

orMutating(_:)

Changes self to .complex, where the associated value consists of self.rawValue and val.rawValueconnected with ,.

public mutating func orMutating(
_ val:ItemPolicyValue
) -> ItemPolicyValue

NameTypeDescription
valItemPolicyValuePolicy value to be appended with “OR” operator

TypeDescription
ItemPolicyValue modified `self`

and(_:)

Creates a new ItemPolicyValue.complex with the the associated value consisting of self.rawValue and val.rawValueconnected with &.

public func and(
_ val:ItemPolicyValue
) -> ItemPolicyValue

NameTypeDescription
valItemPolicyValuePolicy value to be appended with “AND” operator

TypeDescription
ItemPolicyValue new `.complex` `ItemPolicyValue`

or(_:)

Creates a new ItemPolicyValue.complex with the the associated value consisting of self.rawValue and val.rawValueconnected with &

public func or(
_ val:ItemPolicyValue
) -> ItemPolicyValue

NameTypeDescription
valItemPolicyValuePolicy value to be appended with “OR” operator

TypeDescription
ItemPolicyValue modified `self`