class

PlaceOS::Model::Module

Inherits PlaceOS::Model::Utilities::SettingsHelper < PlaceOS::Model::Timestamps < PlaceOS::Model::ModelBase < PlaceOS::Model::Associations < Neuroplastic < PgORM::Base < PgORM::Validators < PgORM::Table < PgORM::Persistence < PgORM::Associations < ActiveModel::Callbacks < ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object

Constants

CALLBACKS = { before_save: [:set_name_and_role] of Nil, after_save: [] of Nil, before_create: [do self.created_at = self.updated_at = Time.utc end, :set_edge_hint, :set_alert_level] of Nil, after_create: [:add_logic_module] of Nil, before_update: [do self.updated_at = Time.utc end] of Nil, after_update: [] of Nil, before_destroy: [:destroy_settings_and_versions, :remove_module] of Nil, after_destroy: [] of Nil, }
Log = ::Log.for(self)
PRIMARY_KEY_TYPES = {:id => (String | Nil)} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

Constructors

from_json(string_or_io : String | IO, trusted : Bool = false) : self
from_json(string_or_io : String | IO, root : String, trusted : Bool = false) : self

Deserializes the given JSON in string_or_io into an instance of self, assuming the JSON consists of an JSON object with key root, and whose value is the value to deserialize. Will not deserialise from fields with mass_assign: false

class User < ActiveModel::Model
  attribute name : String
  attribute google_id : UUID, mass_assign: false
end

User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
from_trusted_json(string_or_io : String | IO, root : String) : self
from_trusted_json(string_or_io : String | IO) : self

Serialize from a trusted JSON source

from_trusted_yaml(string_or_io : String | IO) : self

Serialize from a trusted YAML source

from_yaml(string_or_io : String | IO, trusted : Bool = false) : self
new(rs : DB::ResultSet)
new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, ip : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, port : Int32 | ActiveModel::Model::None = ::ActiveModel::Model::None.new, tls : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, udp : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, makebreak : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, uri : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, custom_name : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, role : PlaceOS::Model::Driver::Role | ActiveModel::Model::None = ::ActiveModel::Model::None.new, alert_level : PlaceOS::Model::Alert::Severity | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, connected : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, running : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, notes : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, ignore_connected : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, ignore_startstop : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, has_runtime_error : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, error_timestamp : Time | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, launch_on_execute : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, control_system_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, driver_id : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, edge_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)

Initialize PlaceOS::Model::Module from HTTP::Params.

Class methods

attributes

Returns all attribute keys.

by_control_system_id(id)

Look up instances of this model dependent on the foreign key

Source
by_driver_id(id)

Look up instances of this model dependent on the foreign key

Source
by_edge_id(id)

Look up instances of this model dependent on the foreign key

Source
changes(id : String | Nil | Nil = nil) : ChangeFeed

Changefeed at row (if id passed) or whole table level. Returns a ChangeFeed instance which can be used to invoke async callbacks via on or use blocking Iterator via each method.

elastic
from_rs(__temp_1946 : DB::ResultSet)
has_edge_hint?(module_id : String)

Hint in the model id whether the module is an edge module

Source
in_control_system(control_system_id : String)
Source
in_zone(zone_id : String)
Source
logic_for(control_system_id : String)

Fetch Modules who have a direct parent ControlSystem

Source
on_edge(edge_id : String)

Find Modules allocated to an Edge

Source
on_error(err : Exception | IO::Error)
primary_key

Base class for all Engine models

Source
table_name

Instance methods

__control_system

Control System the logic module may be assigned to

__control_system=(__control_system : ControlSystem | Nil)

Control System the logic module may be assigned to

__driver

The binary the module is to run on

__driver=(__driver : Driver | Nil)

The binary the module is to run on

__edge

The edge node the module may be assigned to

__edge=(__edge : Edge | Nil)

The edge node the module may be assigned to

after_create

Base class for all Engine models

after_destroy

Base class for all Engine models

after_initialize(trusted : Bool)
after_save

Base class for all Engine models

after_update

Base class for all Engine models

alert_level

alert_level getter

alert_level=(value : PlaceOS::Model::Alert::Severity | Nil)

alert_level setter

alert_level_assigned?
alert_level_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

alert_level_changed?
alert_level_default

alert_level's default value

Source
alert_level_present?
alert_level_removed?
alert_level_was
alert_level_will_change!

Include alert_level in the set of changed attributes, whether it has changed or not.

apply_defaults

Generate code to apply default values

assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, ip : String | Missing = Missing, port : Int32 | Missing = Missing, tls : Bool | Missing = Missing, udp : Bool | Missing = Missing, makebreak : Bool | Missing = Missing, uri : String | Missing = Missing, name : String | Missing = Missing, custom_name : String | Nil | Missing = Missing, role : PlaceOS::Model::Driver::Role | Missing = Missing, alert_level : PlaceOS::Model::Alert::Severity | Nil | Missing = Missing, connected : Bool | Missing = Missing, running : Bool | Missing = Missing, notes : String | Missing = Missing, ignore_connected : Bool | Missing = Missing, ignore_startstop : Bool | Missing = Missing, has_runtime_error : Bool | Missing = Missing, error_timestamp : Time | Nil | Missing = Missing, launch_on_execute : Bool | Missing = Missing, control_system_id : String | Nil | Missing = Missing, driver_id : String | Missing = Missing, edge_id : String | Nil | Missing = Missing, id : String | Nil | Missing = Missing)

Assign to multiple attributes.

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::Module)

Assign to multiple attributes from a model object

assign_attributes_from_json(json, root : String)
assign_attributes_from_json(json)
assign_attributes_from_trusted_json(json, root : String)
assign_attributes_from_trusted_json(json)

Assign each field from JSON if field exists in JSON and has changed in model

assign_attributes_from_trusted_yaml(yaml)
assign_attributes_from_yaml(yaml)

Uses the YAML parser as JSON is valid YAML

attributes

Returns a Hash of all attribute values

attributes_tuple

Returns a NamedTuple of all attribute values.

before_create

Base class for all Engine models

before_destroy

Base class for all Engine models

before_save

Base class for all Engine models

before_update

Base class for all Engine models

changed?

Check if any attributes have changed.

changed_attributes

Returns a Hash with all changed attributes.

changed_json(io : IO) : Nil

Serialize the set of changed attributes to JSON.

changed_json

Serialize the set of changed attributes to JSON.

changed_persist_attributes
changed_yaml(io : IO) : Nil

Serialize the set of changed attributes to YAML.

changed_yaml

Serialize the set of changed attributes to YAML.

clear_changes_information

Reset changes for all attributes.

connected

connected getter

connected=(value : Bool)

connected setter

connected?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

connected_assigned?
connected_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

connected_changed?
connected_default

connected's default value

Source
connected_present?

Connected state in model so we can filter and search on it

connected_removed?
connected_was
connected_will_change!

Include connected in the set of changed attributes, whether it has changed or not.

control_system

Retrieves the parent relationship

Source
control_system!

Control System the logic module may be assigned to

Source
control_system=(parent : ControlSystem)

Sets the parent relationship

Source
control_system_id

control_system_id getter

control_system_id=(value : String | Nil)

control_system_id setter

control_system_id_assigned?
control_system_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

control_system_id_changed?
control_system_id_default

control_system_id's default value

control_system_id_present?

Control System the logic module may be assigned to

control_system_id_removed?
control_system_id_was
control_system_id_will_change!

Include control_system_id in the set of changed attributes, whether it has changed or not.

created_at

created_at getter

created_at=(value : Time)

Setters created_at setter

created_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

created_at_assigned?
created_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

created_at_changed?
created_at_default

created_at's default value

created_at_present?
created_at_removed?
created_at_was
created_at_will_change!

Include created_at in the set of changed attributes, whether it has changed or not.

custom_name

custom_name getter

custom_name=(value : String | Nil)

custom_name setter

custom_name_assigned?
custom_name_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

custom_name_changed?
custom_name_default

custom_name's default value

Source
custom_name_present?

Custom module names (in addition to what is defined in the driver)

custom_name_removed?
custom_name_was
custom_name_will_change!

Include custom_name in the set of changed attributes, whether it has changed or not.

destroy_settings_and_versions

Encrypted yaml settings, with metadata

driver

Retrieves the parent relationship

Source
driver!

The binary the module is to run on

Source
driver=(driver : Driver)

Set driver and role

Source
driver_id

driver_id getter

driver_id=(value : String)

driver_id setter

driver_id?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

driver_id_assigned?
driver_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

driver_id_changed?
driver_id_default

driver_id's default value

driver_id_present?

The binary the module is to run on

driver_id_removed?
driver_id_was
driver_id_will_change!

Include driver_id in the set of changed attributes, whether it has changed or not.

edge

Retrieves the parent relationship

Source
edge!

The edge node the module may be assigned to

Source
edge=(parent : Edge)

Sets the parent relationship

Source
edge_id

edge_id getter

edge_id=(value : String | Nil)

edge_id setter

edge_id_assigned?
edge_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

edge_id_changed?
edge_id_default

edge_id's default value

edge_id_present?

The edge node the module may be assigned to

edge_id_removed?
edge_id_was
edge_id_will_change!

Include edge_id in the set of changed attributes, whether it has changed or not.

error_timestamp

error_timestamp getter

error_timestamp=(value : Time | Nil)

error_timestamp setter

error_timestamp_assigned?
error_timestamp_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

error_timestamp_changed?
error_timestamp_default

error_timestamp's default value

Source
error_timestamp_present?
error_timestamp_removed?
error_timestamp_was
error_timestamp_will_change!

Include error_timestamp in the set of changed attributes, whether it has changed or not.

has_runtime_error

has_runtime_error getter

has_runtime_error=(value : Bool)

has_runtime_error setter

has_runtime_error?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

has_runtime_error_assigned?
has_runtime_error_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

has_runtime_error_changed?
has_runtime_error_default

has_runtime_error's default value

Source
has_runtime_error_present?

Runtime Error Indicators

has_runtime_error_removed?
has_runtime_error_was
has_runtime_error_will_change!

Include has_runtime_error in the set of changed attributes, whether it has changed or not.

hostname

Getter for the module's host

Source
hostname=(host : String)

Setter for Device module ip

Source
id

id getter

id=(value : String | Nil)

id setter

id?
id_assigned?
id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

id_changed?
id_default

id's default value

id_present?
id_removed?
id_was
id_will_change!

Include id in the set of changed attributes, whether it has changed or not.

ignore_connected

ignore_connected getter

ignore_connected=(value : Bool)

ignore_connected setter

ignore_connected?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

ignore_connected_assigned?
ignore_connected_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

ignore_connected_changed?
ignore_connected_default

ignore_connected's default value

Source
ignore_connected_present?

Don't include this module in statistics or disconnected searches Might be a device that commonly goes offline (like a PC or Display that only supports Wake on Lan)

ignore_connected_removed?
ignore_connected_was
ignore_connected_will_change!

Include ignore_connected in the set of changed attributes, whether it has changed or not.

ignore_startstop

ignore_startstop getter

ignore_startstop=(value : Bool)

ignore_startstop setter

ignore_startstop?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

ignore_startstop_assigned?
ignore_startstop_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

ignore_startstop_changed?
ignore_startstop_default

ignore_startstop's default value

Source
ignore_startstop_present?
ignore_startstop_removed?
ignore_startstop_was
ignore_startstop_will_change!

Include ignore_startstop in the set of changed attributes, whether it has changed or not.

invoke_props

Base class for all Engine models

ip

ip getter

ip=(value : String)

ip setter

ip?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

ip_assigned?
ip_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

ip_changed?
ip_default

ip's default value

Source
ip_present?
ip_removed?
ip_was
ip_will_change!

Include ip in the set of changed attributes, whether it has changed or not.

launch_on_execute

launch_on_execute getter

launch_on_execute=(value : Bool)

launch_on_execute setter

launch_on_execute?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

launch_on_execute_assigned?
launch_on_execute_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

launch_on_execute_changed?
launch_on_execute_default

launch_on_execute's default value

Source
launch_on_execute_present?
launch_on_execute_removed?
launch_on_execute_was
launch_on_execute_will_change!

Include launch_on_execute in the set of changed attributes, whether it has changed or not.

makebreak

makebreak getter

makebreak=(value : Bool)

makebreak setter

makebreak?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

makebreak_assigned?
makebreak_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

makebreak_changed?
makebreak_default

makebreak's default value

Source
makebreak_present?
makebreak_removed?
makebreak_was
makebreak_will_change!

Include makebreak in the set of changed attributes, whether it has changed or not.

merge_settings

Merge settings hierarchy to JSON

Read more

Source
name

name getter

name=(value : String)

name setter

name?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

name_assigned?
name_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

name_changed?
name_default

name's default value

Source
name_present?

Module name

name_removed?
name_was
name_will_change!

Include name in the set of changed attributes, whether it has changed or not.

notes

notes getter

notes=(value : String)

notes setter

notes?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

notes_assigned?
notes_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

notes_changed?
notes_default

notes's default value

Source
notes_present?
notes_removed?
notes_was
notes_will_change!

Include notes in the set of changed attributes, whether it has changed or not.

on_edge?

Whether or not module is an edge module

Source
persistent_attributes

Returns a Hash of all attributes that can be persisted.

port

port getter

port=(value : Int32)

port setter

port?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

port_assigned?
port_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

port_changed?
port_default

port's default value

Source
port_present?
port_removed?
port_was
port_will_change!

Include port in the set of changed attributes, whether it has changed or not.

primary_key

Base class for all Engine models

Source
primary_key_hash
reset_associations

The edge node the module may be assigned to

Source
resolved_name

Use custom name if it is defined and non-empty, otherwise use module name

Source
resolved_name_changed?
Source
restore_attributes

Reset each attribute to their previous values and clears all changes.

role

role getter

role setter

role?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

role_assigned?
role_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

role_changed?
role_default

role's default value

Source
role_present?

Cache the module's driver role locally for load order

role_removed?
role_was
role_will_change!

Include role in the set of changed attributes, whether it has changed or not.

running

running getter

running=(value : Bool)

running setter

running?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

running_assigned?
running_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

running_changed?
running_default

running's default value

Source
running_present?
running_removed?
running_was
running_will_change!

Include running in the set of changed attributes, whether it has changed or not.

settings_and_versions

Encrypted yaml settings, with metadata

Source
settings_hierarchy

Collect Settings ordered by hierarchy

Module > (Control System > Zones) > Driver

Source
systems

Finds the systems for which this module is in use

Source
table_name
tls

tls getter

tls=(value : Bool)

tls setter

tls?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

tls_assigned?
tls_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

tls_changed?
tls_default

tls's default value

Source
tls_present?
tls_removed?
tls_was
tls_will_change!

Include tls in the set of changed attributes, whether it has changed or not.

udp

udp getter

udp=(value : Bool)

udp setter

udp?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

udp_assigned?
udp_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

udp_changed?
udp_default

udp's default value

Source
udp_present?
udp_removed?
udp_was
udp_will_change!

Include udp in the set of changed attributes, whether it has changed or not.

updated_at

updated_at getter

updated_at=(value : Time)

updated_at setter

updated_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

updated_at_assigned?
updated_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

updated_at_changed?
updated_at_default

updated_at's default value

updated_at_present?
updated_at_removed?
updated_at_was
updated_at_will_change!

Include updated_at in the set of changed attributes, whether it has changed or not.

uri

uri getter

uri=(value : String)

uri setter

uri?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

uri_assigned?
uri_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

uri_changed?
uri_default

uri's default value

Source
uri_present?

HTTP Service module

uri_removed?
uri_was
uri_will_change!

Include uri in the set of changed attributes, whether it has changed or not.

validate_nilability

Validate that all non-nillable fields have values.

Nested types