PrivMX DOCS
API Reference/PrivMX Endpoint Swift Extra/Core

ItemPolicyValue

Enumeration of values available for configuring Policies for Items

Fields

rawValue

std.__1.basic_string<CChar, std.__1.char_traits<CChar>, std.__1.allocator<CChar>> 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:

Params

rawValue

std.string

The raw value to use for the new instance.

public init?(rawValue: std.string)

andMutating(_:)

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

Params

val

ItemPolicyValue

Policy value to be appended with “AND” operator

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

Returns

ItemPolicyValue · modified self

orMutating(_:)

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

Params

val

ItemPolicyValue

Policy value to be appended with “OR” operator

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

Returns

ItemPolicyValue · modified self

and(_:)

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

Params

val

ItemPolicyValue

Policy value to be appended with “AND” operator

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

Returns

ItemPolicyValue · new .complex ItemPolicyValue

or(_:)

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

Params

val

ItemPolicyValue

Policy value to be appended with “OR” operator

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

Returns

ItemPolicyValue · modified self

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.