antimatter.builders.data_policy#

Module Contents#

Classes#

RuleEffect

Create a collection of name/value pairs.

TokenScope

Create a collection of name/value pairs.

TokenFormat

Create a collection of name/value pairs.

AssignPriority

Create a collection of name/value pairs.

ClauseOperator

Create a collection of name/value pairs.

Attachment

Create a collection of name/value pairs.

ExpressionBuilder

TagExpressionBuilder

CapabilityExpressionBuilder

ReadParameterExpressionBuilder

FactExpressionBuilder

FactExpressionArgumentBuilder

VariableBuilder

DataPolicyClauseBuilder

NewDataPolicyRuleBuilder

DataPolicyRuleChangesBuilder

class antimatter.builders.data_policy.RuleEffect(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

DENYCAPSULE#
DENYRECORD#
REDACT#
TOKENIZE#
ALLOW#
class antimatter.builders.data_policy.TokenScope(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

UNIQUE = 'unique'#
CAPSULE = 'capsule'#
DOMAIN = 'domain'#
class antimatter.builders.data_policy.TokenFormat(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

EXPLICIT = 'explicit'#
SYNTHETIC = 'synthetic'#
class antimatter.builders.data_policy.AssignPriority(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

FIRST = 'first'#
LAST = 'last'#
class antimatter.builders.data_policy.ClauseOperator(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

AllOf = 'AllOf'#
NotAllOf = 'NotAllOf'#
AnyOf = 'AnyOf'#
NotAnyOf = 'NotAnyOf'#
Always = 'Always'#
class antimatter.builders.data_policy.Attachment(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Inherit = 'Inherit'#
NotAttached = 'NotAttached'#
Attached = 'Attached'#
class antimatter.builders.data_policy.ExpressionBuilder#
set_name(name: str) ExpressionBuilder#
add_value(value: str) ExpressionBuilder#
set_operator(operator: str) ExpressionBuilder#
add_variable(variable: VariableBuilder) ExpressionBuilder#
class antimatter.builders.data_policy.TagExpressionBuilder#

Bases: ExpressionBuilder

build() antimatter_api.TagExpression#
class antimatter.builders.data_policy.CapabilityExpressionBuilder#

Bases: ExpressionBuilder

build() antimatter_api.CapabilityExpression#
class antimatter.builders.data_policy.ReadParameterExpressionBuilder#

Bases: ExpressionBuilder

build() antimatter_api.ReadParameterExpression#
class antimatter.builders.data_policy.FactExpressionBuilder#
set_type(fact_type: str) FactExpressionBuilder#
set_operator(operator: str) FactExpressionBuilder#
add_argument(operator: antimatter.constants.Operator, values: List[str] = []) FactExpressionBuilder#
add_variable(variable: VariableBuilder) FactExpressionBuilder#
build() antimatter_api.FactExpression#
class antimatter.builders.data_policy.FactExpressionArgumentBuilder#
set_operator(operator: str) FactExpressionArgumentBuilder#
add_value(value: str) FactExpressionArgumentBuilder#
build() antimatter_api.FactExpressionArgumentsInner#
class antimatter.builders.data_policy.VariableBuilder#
set_variable_name(name: str) VariableBuilder#
set_source(source: str) VariableBuilder#
set_tag_name(tag_name: str) VariableBuilder#
set_capability_name(capability_name: str) VariableBuilder#
set_fact_type(fact_type: str) VariableBuilder#
add_fact_argument(argument: FactExpressionArgumentBuilder) VariableBuilder#
add_variable(variable: VariableBuilder) VariableBuilder#
build() antimatter_api.VariableDefinition#
class antimatter.builders.data_policy.DataPolicyClauseBuilder(operator: ClauseOperator)#
add_tag(tag: TagExpressionBuilder) DataPolicyClauseBuilder#
add_capability(capability: CapabilityExpressionBuilder) DataPolicyClauseBuilder#
add_fact(fact: FactExpressionBuilder) DataPolicyClauseBuilder#
add_read_parameter(read_parameter: ReadParameterExpressionBuilder) DataPolicyClauseBuilder#
build() antimatter_api.DataPolicyClause#
class antimatter.builders.data_policy.NewDataPolicyRuleBuilder(effect: RuleEffect, comment: str | None = None, token_scope: TokenScope | None = None, token_format: TokenFormat | None = None, assign_priority: AssignPriority | None = None, priority: int | None = None)#
add_clause(clause: DataPolicyClauseBuilder) NewDataPolicyRuleBuilder#
build() antimatter_api.NewDataPolicyRule#
class antimatter.builders.data_policy.DataPolicyRuleChangesBuilder#
add_rule(rule: NewDataPolicyRuleBuilder) DataPolicyRuleChangesBuilder#
delete_rules(rule_ids: List[str]) DataPolicyRuleChangesBuilder#
build() antimatter_api.DataPolicyRuleChanges#