roboto.updates
Module Contents
CustomFieldChangeset
Bases: pydantic.BaseModel
Describes a set of changes to apply to an entity’s custom-field values.
Each referenced field name must be a custom field defined for the entity’s type in the caller’s organization, and that field must be Ready. Any value supplied must satisfy that field’s declared type. Field names not mentioned by the changeset are left unchanged. A cleared field reads back as None.
Parameters
data AnyCustomFieldChangeset.Builder
CustomFieldChangeset.Builder.build()
Return type
CustomFieldChangeset.Builder.clear_field()
Parameters
name strReturn type
CustomFieldChangeset.Builder.set_field()
Parameters
name strvalue AnyReturn type
CustomFieldChangeset.apply_field_updates()
Apply this changeset to an existing custom-field map.
Parameters
existing dict[str, Any]Current custom-field name-to-value map. Not mutated.
Returns
A new map reflecting the changeset. set_fields entries overwrite existing values; clear_fields entries set their values to None. Field names not mentioned by the changeset are carried through unchanged.
Attributes
CustomFieldChangeset.clear_fields
Field names whose values should be cleared to None.
CustomFieldChangeset.combine()
Merge this changeset with other such that other wins on conflicts.
For any field name appearing in both set_fields maps, other’s value wins. A field appearing in one side’s set_fields and the other side’s clear_fields resolves to whichever side is other.
Parameters
other CustomFieldChangesetReturn type
CustomFieldChangeset.is_empty()
Return True when applying this changeset would not change any value.
Return type
Attributes
CustomFieldChangeset.set_fields
Field names to set or overwrite, mapped to their new values.
Each value’s Python type must match the corresponding field’s declared CustomFieldType.
MetadataChangeset
Bases: pydantic.BaseModel
Changeset for metadata
Parameters
data AnyMetadataChangeset.Builder
MetadataChangeset.Builder.build()
Return type
MetadataChangeset.Builder.put_field()
Parameters
key strvalue AnyReturn type
MetadataChangeset.Builder.put_tag()
Parameters
tag strReturn type
MetadataChangeset.Builder.remove_field()
Parameters
key strReturn type
MetadataChangeset.Builder.remove_tag()
Parameters
tag strReturn type
MetadataChangeset.apply_field_updates()
Parameters
existing_metadata dict[str, Any]Return type
MetadataChangeset.apply_tag_updates()
Parameters
existing_tags list[str]Return type
MetadataChangeset.combine()
Parameters
other MetadataChangesetReturn type
MetadataChangeset.from_metadata()
Creates a changeset that will replace any existing metadata with what’s provided.
Parameters
metadata Mapping[str, Any]Return type
MetadataChangeset.is_empty()
Return type
Attributes
MetadataChangeset.put_fields
MetadataChangeset.put_tags
MetadataChangeset.remove_fields
MetadataChangeset.remove_tags
MetadataChangeset.replace_all
StrSequence
TaglessMetadataChangeset
Bases: pydantic.BaseModel
Changeset for tagless metadata
Parameters
data AnyTaglessMetadataChangeset.Builder
TaglessMetadataChangeset.Builder.build()
Return type
TaglessMetadataChangeset.Builder.put_field()
Parameters
key strvalue AnyReturn type
TaglessMetadataChangeset.Builder.remove_field()
Parameters
key strReturn type
TaglessMetadataChangeset.apply_field_updates()
Parameters
existing_metadata dict[str, Any]Return type
TaglessMetadataChangeset.from_replacement_metadata()
Creates a changeset to replace any existing metadata with the metadata provided.
Parameters
metadata dict[str, Any]Return type
TaglessMetadataChangeset.has_changes()
Checks whether applying this changeset would result in any metadata changes.
Return type
Attributes
TaglessMetadataChangeset.put_fields
TaglessMetadataChangeset.remove_fields
TaglessMetadataChangeset.replace_all
UpdateCondition
Bases: pydantic.BaseModel
A condition to be applied to an update operation, succeeding only if the condition evaluates to True at update-time.
value is compared to the resource’s current value of key using comparator.
This is a severely constrainted subset of the conditions supported by DynamoDB. See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html
Parameters
data Any