Current section

Files

Jump to
automata src automata@ical.erl
Raw

src/automata@ical.erl

-module(automata@ical).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/automata/ical.gleam").
-export([encode/1, parse/1, version/1, product_id/1, method/1, calscale/1, events/1, todos/1, journals/1, freebusy/1, timezones/1, unknown_components/1, calendar_x_properties/1, event_uid/1, event_dtstamp/1, event_dtstart/1, event_dtstart_tzid/1, event_dtend/1, event_dtend_tzid/1, event_duration/1, event_summary/1, event_description/1, event_location/1, event_status/1, event_organizer/1, event_attendees/1, event_categories/1, event_url/1, event_created/1, event_last_modified/1, event_sequence/1, event_transparency/1, event_rrule/1, event_rdates/1, event_exdates/1, event_alarms/1, event_x_properties/1, todo_uid/1, todo_dtstamp/1, todo_dtstart/1, todo_due/1, todo_completed/1, todo_summary/1, todo_description/1, todo_status/1, todo_percent_complete/1, todo_priority/1, todo_categories/1, todo_rrule/1, todo_rdates/1, todo_exdates/1, todo_alarms/1, todo_x_properties/1, journal_uid/1, journal_dtstamp/1, journal_dtstart/1, journal_summary/1, journal_description/1, journal_status/1, journal_categories/1, journal_x_properties/1, freebusy_uid/1, freebusy_dtstamp/1, freebusy_dtstart/1, freebusy_dtend/1, freebusy_organizer/1, freebusy_attendees/1, freebusy_periods/1, freebusy_x_properties/1, timezone_tzid/1, timezone_last_modified/1, timezone_tzurl/1, timezone_standard/1, timezone_daylight/1, timezone_x_properties/1, alarm_action/1, alarm_trigger/1, alarm_description/1, alarm_summary/1, alarm_repeat/1, alarm_duration/1, alarm_attendees/1, alarm_x_properties/1, new_calendar/2, with_method/2, with_calscale/2, add_event/2, add_todo/2, add_journal/2, add_freebusy/2, add_timezone/2, add_unknown_component/2, with_calendar_x_property/3, new_event/2, with_dtstart/2, with_dtstart_tzid/2, with_dtend/2, with_dtend_tzid/2, with_duration/2, with_summary/2, with_description/2, with_location/2, with_status/2, with_organizer/2, add_attendee/2, add_category/2, with_url/2, with_created/2, with_last_modified/2, with_sequence/2, with_transparency/2, with_rrule/2, add_rdate/2, add_exdate/2, add_alarm/2, with_event_x_property/3, new_todo/2, with_todo_dtstart/2, with_todo_due/2, with_todo_completed/2, with_todo_summary/2, with_todo_description/2, with_todo_status/2, with_todo_percent_complete/2, with_todo_priority/2, add_todo_category/2, with_todo_rrule/2, add_todo_rdate/2, add_todo_exdate/2, add_todo_alarm/2, with_todo_x_property/3, new_journal/2, with_journal_dtstart/2, with_journal_summary/2, with_journal_description/2, with_journal_status/2, add_journal_category/2, with_journal_x_property/3, new_freebusy/2, with_freebusy_dtstart/2, with_freebusy_dtend/2, with_freebusy_organizer/2, add_freebusy_attendee/2, add_freebusy_period/2, with_freebusy_x_property/3, new_timezone/1, with_timezone_last_modified/2, with_timezone_url/2, add_timezone_standard/2, add_timezone_daylight/2, with_timezone_x_property/3, new_timezone_rule/3, with_timezone_rule_rrule/2, with_timezone_rule_name/2, new_alarm/2, with_alarm_description/2, with_alarm_summary/2, with_alarm_repeat/2, with_alarm_duration/2, add_alarm_attendee/2, with_alarm_x_property/3]).
-export_type([ical_error/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(
" RFC 5545 iCalendar parser and emitter built on top of\n"
" `automata/rrule`. Handles the `VCALENDAR` envelope —\n"
" `VEVENT` / `VTODO` / `VJOURNAL` / `VFREEBUSY` / `VTIMEZONE` /\n"
" `VALARM` blocks, §3.1 line folding (CRLF/LF tolerant input,\n"
" CRLF output, 75-octet UTF-8 boundary on emit), §3.2 quoted\n"
" parameter values, §3.3.11 TEXT escaping\n"
" (`\\\\`, `\\,`, `\\;`, `\\n`/`\\N`), and §3.4 content-line layout.\n"
"\n"
" RRULE values are preserved as `automata/rrule.RawRRule` so\n"
" callers can pipe them through `rrule.validate` — `InvalidRRule`\n"
" wraps the syntactic `rrule/parser.ParseError`. Unknown\n"
" component kinds round-trip through `UnknownComponent` rather\n"
" than being dropped.\n"
).
-type ical_error() :: {unexpected_end, integer()} |
{mismatched_block, binary(), binary(), integer()} |
{malformed_property, integer(), binary()} |
{malformed_parameter, integer(), binary()} |
missing_version |
missing_product_id |
{missing_component_property, binary(), binary()} |
{invalid_date_time, binary(), binary()} |
{invalid_escape, binary()} |
{invalid_integer, binary(), binary()} |
{invalid_r_rule, binary(), automata@rrule@parser:parse_error()} |
{duplicate_r_rule, binary()} |
empty_input_error.
-file("src/automata/ical.gleam", 95).
?DOC(
" Render a `Calendar` back to the RFC 5545 wire format. Output\n"
" uses CRLF line terminators and folds at 75 UTF-8 octets.\n"
).
-spec encode(automata@ical@validator:calendar()) -> binary().
encode(Cal) ->
automata@ical@emitter:encode(Cal).
-file("src/automata/ical.gleam", 99).
-spec map_parse_error(automata@ical@parser:parse_error()) -> ical_error().
map_parse_error(E) ->
case E of
{unexpected_end, Line} ->
{unexpected_end, Line};
{mismatched_block, Begin, End, Line@1} ->
{mismatched_block, Begin, End, Line@1};
{malformed_property, Line@2, Raw} ->
{malformed_property, Line@2, Raw};
{malformed_parameter, Line@3, Raw@1} ->
{malformed_parameter, Line@3, Raw@1};
empty_input_error ->
empty_input_error
end.
-file("src/automata/ical.gleam", 110).
-spec map_validation_error(automata@ical@validator:validation_error()) -> ical_error().
map_validation_error(E) ->
case E of
missing_version ->
missing_version;
missing_product_id ->
missing_product_id;
{missing_component_property, Comp, Name} ->
{missing_component_property, Comp, Name};
{invalid_date_time, Name@1, Raw} ->
{invalid_date_time, Name@1, Raw};
{invalid_escape, Raw@1} ->
{invalid_escape, Raw@1};
{invalid_integer, Name@2, Raw@2} ->
{invalid_integer, Name@2, Raw@2};
{invalid_r_rule, Raw@3, Err} ->
{invalid_r_rule, Raw@3, Err};
{duplicate_r_rule, Uid} ->
{duplicate_r_rule, Uid}
end.
-file("src/automata/ical.gleam", 82).
?DOC(
" Parse an iCalendar document into a validated `Calendar`. Errors\n"
" from the lexer, parser, and validator are mapped into the unified\n"
" `IcalError` type so callers only need one pattern-match.\n"
).
-spec parse(binary()) -> {ok, automata@ical@validator:calendar()} |
{error, ical_error()}.
parse(Input) ->
case automata@ical@parser:parse(Input) of
{error, E} ->
{error, map_parse_error(E)};
{ok, Raw} ->
case automata@ical@validator:validate(Raw) of
{error, E@1} ->
{error, map_validation_error(E@1)};
{ok, Cal} ->
{ok, Cal}
end
end.
-file("src/automata/ical.gleam", 128).
-spec version(automata@ical@validator:calendar()) -> binary().
version(Cal) ->
automata@ical@validator:version(Cal).
-file("src/automata/ical.gleam", 132).
-spec product_id(automata@ical@validator:calendar()) -> binary().
product_id(Cal) ->
automata@ical@validator:product_id(Cal).
-file("src/automata/ical.gleam", 136).
-spec method(automata@ical@validator:calendar()) -> gleam@option:option(binary()).
method(Cal) ->
automata@ical@validator:method(Cal).
-file("src/automata/ical.gleam", 140).
-spec calscale(automata@ical@validator:calendar()) -> gleam@option:option(binary()).
calscale(Cal) ->
automata@ical@validator:calscale(Cal).
-file("src/automata/ical.gleam", 144).
-spec events(automata@ical@validator:calendar()) -> list(automata@ical@validator:event()).
events(Cal) ->
automata@ical@validator:events(Cal).
-file("src/automata/ical.gleam", 148).
-spec todos(automata@ical@validator:calendar()) -> list(automata@ical@validator:todo()).
todos(Cal) ->
automata@ical@validator:todos(Cal).
-file("src/automata/ical.gleam", 152).
-spec journals(automata@ical@validator:calendar()) -> list(automata@ical@validator:journal()).
journals(Cal) ->
automata@ical@validator:journals(Cal).
-file("src/automata/ical.gleam", 156).
-spec freebusy(automata@ical@validator:calendar()) -> list(automata@ical@validator:free_busy()).
freebusy(Cal) ->
automata@ical@validator:freebusy(Cal).
-file("src/automata/ical.gleam", 160).
-spec timezones(automata@ical@validator:calendar()) -> list(automata@ical@validator:timezone()).
timezones(Cal) ->
automata@ical@validator:timezones(Cal).
-file("src/automata/ical.gleam", 164).
-spec unknown_components(automata@ical@validator:calendar()) -> list(automata@ical@validator:unknown_component()).
unknown_components(Cal) ->
automata@ical@validator:unknown_components(Cal).
-file("src/automata/ical.gleam", 168).
-spec calendar_x_properties(automata@ical@validator:calendar()) -> gleam@dict:dict(binary(), binary()).
calendar_x_properties(Cal) ->
automata@ical@validator:calendar_x_properties(Cal).
-file("src/automata/ical.gleam", 176).
-spec event_uid(automata@ical@validator:event()) -> binary().
event_uid(Event) ->
automata@ical@validator:event_uid(Event).
-file("src/automata/ical.gleam", 180).
-spec event_dtstamp(automata@ical@validator:event()) -> automata@schedule@ast:date_time().
event_dtstamp(Event) ->
automata@ical@validator:event_dtstamp(Event).
-file("src/automata/ical.gleam", 184).
-spec event_dtstart(automata@ical@validator:event()) -> gleam@option:option(automata@schedule@ast:date_time()).
event_dtstart(Event) ->
automata@ical@validator:event_dtstart(Event).
-file("src/automata/ical.gleam", 188).
-spec event_dtstart_tzid(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_dtstart_tzid(Event) ->
automata@ical@validator:event_dtstart_tzid(Event).
-file("src/automata/ical.gleam", 192).
-spec event_dtend(automata@ical@validator:event()) -> gleam@option:option(automata@schedule@ast:date_time()).
event_dtend(Event) ->
automata@ical@validator:event_dtend(Event).
-file("src/automata/ical.gleam", 196).
-spec event_dtend_tzid(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_dtend_tzid(Event) ->
automata@ical@validator:event_dtend_tzid(Event).
-file("src/automata/ical.gleam", 200).
-spec event_duration(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_duration(Event) ->
automata@ical@validator:event_duration(Event).
-file("src/automata/ical.gleam", 204).
-spec event_summary(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_summary(Event) ->
automata@ical@validator:event_summary(Event).
-file("src/automata/ical.gleam", 208).
-spec event_description(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_description(Event) ->
automata@ical@validator:event_description(Event).
-file("src/automata/ical.gleam", 212).
-spec event_location(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_location(Event) ->
automata@ical@validator:event_location(Event).
-file("src/automata/ical.gleam", 216).
-spec event_status(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_status(Event) ->
automata@ical@validator:event_status(Event).
-file("src/automata/ical.gleam", 220).
-spec event_organizer(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_organizer(Event) ->
automata@ical@validator:event_organizer(Event).
-file("src/automata/ical.gleam", 224).
-spec event_attendees(automata@ical@validator:event()) -> list(binary()).
event_attendees(Event) ->
automata@ical@validator:event_attendees(Event).
-file("src/automata/ical.gleam", 228).
-spec event_categories(automata@ical@validator:event()) -> list(binary()).
event_categories(Event) ->
automata@ical@validator:event_categories(Event).
-file("src/automata/ical.gleam", 232).
-spec event_url(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_url(Event) ->
automata@ical@validator:event_url(Event).
-file("src/automata/ical.gleam", 236).
-spec event_created(automata@ical@validator:event()) -> gleam@option:option(automata@schedule@ast:date_time()).
event_created(Event) ->
automata@ical@validator:event_created(Event).
-file("src/automata/ical.gleam", 240).
-spec event_last_modified(automata@ical@validator:event()) -> gleam@option:option(automata@schedule@ast:date_time()).
event_last_modified(Event) ->
automata@ical@validator:event_last_modified(Event).
-file("src/automata/ical.gleam", 244).
-spec event_sequence(automata@ical@validator:event()) -> integer().
event_sequence(Event) ->
automata@ical@validator:event_sequence(Event).
-file("src/automata/ical.gleam", 248).
-spec event_transparency(automata@ical@validator:event()) -> gleam@option:option(binary()).
event_transparency(Event) ->
automata@ical@validator:event_transparency(Event).
-file("src/automata/ical.gleam", 252).
-spec event_rrule(automata@ical@validator:event()) -> gleam@option:option(automata@rrule@ast:raw_r_rule()).
event_rrule(Event) ->
automata@ical@validator:event_rrule(Event).
-file("src/automata/ical.gleam", 256).
-spec event_rdates(automata@ical@validator:event()) -> list(automata@schedule@ast:date_time()).
event_rdates(Event) ->
automata@ical@validator:event_rdates(Event).
-file("src/automata/ical.gleam", 260).
-spec event_exdates(automata@ical@validator:event()) -> list(automata@schedule@ast:date_time()).
event_exdates(Event) ->
automata@ical@validator:event_exdates(Event).
-file("src/automata/ical.gleam", 264).
-spec event_alarms(automata@ical@validator:event()) -> list(automata@ical@validator:alarm()).
event_alarms(Event) ->
automata@ical@validator:event_alarms(Event).
-file("src/automata/ical.gleam", 268).
-spec event_x_properties(automata@ical@validator:event()) -> gleam@dict:dict(binary(), binary()).
event_x_properties(Event) ->
automata@ical@validator:event_x_properties(Event).
-file("src/automata/ical.gleam", 276).
-spec todo_uid(automata@ical@validator:todo()) -> binary().
todo_uid(T) ->
automata@ical@validator:todo_uid(T).
-file("src/automata/ical.gleam", 280).
-spec todo_dtstamp(automata@ical@validator:todo()) -> automata@schedule@ast:date_time().
todo_dtstamp(T) ->
automata@ical@validator:todo_dtstamp(T).
-file("src/automata/ical.gleam", 284).
-spec todo_dtstart(automata@ical@validator:todo()) -> gleam@option:option(automata@schedule@ast:date_time()).
todo_dtstart(T) ->
automata@ical@validator:todo_dtstart(T).
-file("src/automata/ical.gleam", 288).
-spec todo_due(automata@ical@validator:todo()) -> gleam@option:option(automata@schedule@ast:date_time()).
todo_due(T) ->
automata@ical@validator:todo_due(T).
-file("src/automata/ical.gleam", 292).
-spec todo_completed(automata@ical@validator:todo()) -> gleam@option:option(automata@schedule@ast:date_time()).
todo_completed(T) ->
automata@ical@validator:todo_completed(T).
-file("src/automata/ical.gleam", 296).
-spec todo_summary(automata@ical@validator:todo()) -> gleam@option:option(binary()).
todo_summary(T) ->
automata@ical@validator:todo_summary(T).
-file("src/automata/ical.gleam", 300).
-spec todo_description(automata@ical@validator:todo()) -> gleam@option:option(binary()).
todo_description(T) ->
automata@ical@validator:todo_description(T).
-file("src/automata/ical.gleam", 304).
-spec todo_status(automata@ical@validator:todo()) -> gleam@option:option(binary()).
todo_status(T) ->
automata@ical@validator:todo_status(T).
-file("src/automata/ical.gleam", 308).
-spec todo_percent_complete(automata@ical@validator:todo()) -> gleam@option:option(integer()).
todo_percent_complete(T) ->
automata@ical@validator:todo_percent_complete(T).
-file("src/automata/ical.gleam", 312).
-spec todo_priority(automata@ical@validator:todo()) -> gleam@option:option(integer()).
todo_priority(T) ->
automata@ical@validator:todo_priority(T).
-file("src/automata/ical.gleam", 316).
-spec todo_categories(automata@ical@validator:todo()) -> list(binary()).
todo_categories(T) ->
automata@ical@validator:todo_categories(T).
-file("src/automata/ical.gleam", 320).
-spec todo_rrule(automata@ical@validator:todo()) -> gleam@option:option(automata@rrule@ast:raw_r_rule()).
todo_rrule(T) ->
automata@ical@validator:todo_rrule(T).
-file("src/automata/ical.gleam", 324).
-spec todo_rdates(automata@ical@validator:todo()) -> list(automata@schedule@ast:date_time()).
todo_rdates(T) ->
automata@ical@validator:todo_rdates(T).
-file("src/automata/ical.gleam", 328).
-spec todo_exdates(automata@ical@validator:todo()) -> list(automata@schedule@ast:date_time()).
todo_exdates(T) ->
automata@ical@validator:todo_exdates(T).
-file("src/automata/ical.gleam", 332).
-spec todo_alarms(automata@ical@validator:todo()) -> list(automata@ical@validator:alarm()).
todo_alarms(T) ->
automata@ical@validator:todo_alarms(T).
-file("src/automata/ical.gleam", 336).
-spec todo_x_properties(automata@ical@validator:todo()) -> gleam@dict:dict(binary(), binary()).
todo_x_properties(T) ->
automata@ical@validator:todo_x_properties(T).
-file("src/automata/ical.gleam", 344).
-spec journal_uid(automata@ical@validator:journal()) -> binary().
journal_uid(J) ->
automata@ical@validator:journal_uid(J).
-file("src/automata/ical.gleam", 348).
-spec journal_dtstamp(automata@ical@validator:journal()) -> automata@schedule@ast:date_time().
journal_dtstamp(J) ->
automata@ical@validator:journal_dtstamp(J).
-file("src/automata/ical.gleam", 352).
-spec journal_dtstart(automata@ical@validator:journal()) -> gleam@option:option(automata@schedule@ast:date_time()).
journal_dtstart(J) ->
automata@ical@validator:journal_dtstart(J).
-file("src/automata/ical.gleam", 356).
-spec journal_summary(automata@ical@validator:journal()) -> gleam@option:option(binary()).
journal_summary(J) ->
automata@ical@validator:journal_summary(J).
-file("src/automata/ical.gleam", 360).
-spec journal_description(automata@ical@validator:journal()) -> gleam@option:option(binary()).
journal_description(J) ->
automata@ical@validator:journal_description(J).
-file("src/automata/ical.gleam", 364).
-spec journal_status(automata@ical@validator:journal()) -> gleam@option:option(binary()).
journal_status(J) ->
automata@ical@validator:journal_status(J).
-file("src/automata/ical.gleam", 368).
-spec journal_categories(automata@ical@validator:journal()) -> list(binary()).
journal_categories(J) ->
automata@ical@validator:journal_categories(J).
-file("src/automata/ical.gleam", 372).
-spec journal_x_properties(automata@ical@validator:journal()) -> gleam@dict:dict(binary(), binary()).
journal_x_properties(J) ->
automata@ical@validator:journal_x_properties(J).
-file("src/automata/ical.gleam", 380).
-spec freebusy_uid(automata@ical@validator:free_busy()) -> binary().
freebusy_uid(Fb) ->
automata@ical@validator:freebusy_uid(Fb).
-file("src/automata/ical.gleam", 384).
-spec freebusy_dtstamp(automata@ical@validator:free_busy()) -> automata@schedule@ast:date_time().
freebusy_dtstamp(Fb) ->
automata@ical@validator:freebusy_dtstamp(Fb).
-file("src/automata/ical.gleam", 388).
-spec freebusy_dtstart(automata@ical@validator:free_busy()) -> gleam@option:option(automata@schedule@ast:date_time()).
freebusy_dtstart(Fb) ->
automata@ical@validator:freebusy_dtstart(Fb).
-file("src/automata/ical.gleam", 392).
-spec freebusy_dtend(automata@ical@validator:free_busy()) -> gleam@option:option(automata@schedule@ast:date_time()).
freebusy_dtend(Fb) ->
automata@ical@validator:freebusy_dtend(Fb).
-file("src/automata/ical.gleam", 396).
-spec freebusy_organizer(automata@ical@validator:free_busy()) -> gleam@option:option(binary()).
freebusy_organizer(Fb) ->
automata@ical@validator:freebusy_organizer(Fb).
-file("src/automata/ical.gleam", 400).
-spec freebusy_attendees(automata@ical@validator:free_busy()) -> list(binary()).
freebusy_attendees(Fb) ->
automata@ical@validator:freebusy_attendees(Fb).
-file("src/automata/ical.gleam", 404).
-spec freebusy_periods(automata@ical@validator:free_busy()) -> list(binary()).
freebusy_periods(Fb) ->
automata@ical@validator:freebusy_periods(Fb).
-file("src/automata/ical.gleam", 408).
-spec freebusy_x_properties(automata@ical@validator:free_busy()) -> gleam@dict:dict(binary(), binary()).
freebusy_x_properties(Fb) ->
automata@ical@validator:freebusy_x_properties(Fb).
-file("src/automata/ical.gleam", 416).
-spec timezone_tzid(automata@ical@validator:timezone()) -> binary().
timezone_tzid(Tz) ->
automata@ical@validator:timezone_tzid(Tz).
-file("src/automata/ical.gleam", 420).
-spec timezone_last_modified(automata@ical@validator:timezone()) -> gleam@option:option(automata@schedule@ast:date_time()).
timezone_last_modified(Tz) ->
automata@ical@validator:timezone_last_modified(Tz).
-file("src/automata/ical.gleam", 424).
-spec timezone_tzurl(automata@ical@validator:timezone()) -> gleam@option:option(binary()).
timezone_tzurl(Tz) ->
automata@ical@validator:timezone_tzurl(Tz).
-file("src/automata/ical.gleam", 428).
-spec timezone_standard(automata@ical@validator:timezone()) -> list(automata@ical@validator:timezone_rule()).
timezone_standard(Tz) ->
automata@ical@validator:timezone_standard(Tz).
-file("src/automata/ical.gleam", 432).
-spec timezone_daylight(automata@ical@validator:timezone()) -> list(automata@ical@validator:timezone_rule()).
timezone_daylight(Tz) ->
automata@ical@validator:timezone_daylight(Tz).
-file("src/automata/ical.gleam", 436).
-spec timezone_x_properties(automata@ical@validator:timezone()) -> gleam@dict:dict(binary(), binary()).
timezone_x_properties(Tz) ->
automata@ical@validator:timezone_x_properties(Tz).
-file("src/automata/ical.gleam", 444).
-spec alarm_action(automata@ical@validator:alarm()) -> binary().
alarm_action(A) ->
automata@ical@validator:alarm_action(A).
-file("src/automata/ical.gleam", 448).
-spec alarm_trigger(automata@ical@validator:alarm()) -> binary().
alarm_trigger(A) ->
automata@ical@validator:alarm_trigger(A).
-file("src/automata/ical.gleam", 452).
-spec alarm_description(automata@ical@validator:alarm()) -> gleam@option:option(binary()).
alarm_description(A) ->
automata@ical@validator:alarm_description(A).
-file("src/automata/ical.gleam", 456).
-spec alarm_summary(automata@ical@validator:alarm()) -> gleam@option:option(binary()).
alarm_summary(A) ->
automata@ical@validator:alarm_summary(A).
-file("src/automata/ical.gleam", 460).
-spec alarm_repeat(automata@ical@validator:alarm()) -> gleam@option:option(integer()).
alarm_repeat(A) ->
automata@ical@validator:alarm_repeat(A).
-file("src/automata/ical.gleam", 464).
-spec alarm_duration(automata@ical@validator:alarm()) -> gleam@option:option(binary()).
alarm_duration(A) ->
automata@ical@validator:alarm_duration(A).
-file("src/automata/ical.gleam", 468).
-spec alarm_attendees(automata@ical@validator:alarm()) -> list(binary()).
alarm_attendees(A) ->
automata@ical@validator:alarm_attendees(A).
-file("src/automata/ical.gleam", 472).
-spec alarm_x_properties(automata@ical@validator:alarm()) -> gleam@dict:dict(binary(), binary()).
alarm_x_properties(A) ->
automata@ical@validator:alarm_x_properties(A).
-file("src/automata/ical.gleam", 480).
-spec new_calendar(binary(), binary()) -> automata@ical@validator:calendar().
new_calendar(Version, Prod_id) ->
automata@ical@validator:new_calendar(Version, Prod_id).
-file("src/automata/ical.gleam", 487).
-spec with_method(automata@ical@validator:calendar(), binary()) -> automata@ical@validator:calendar().
with_method(Cal, Method) ->
automata@ical@validator:with_method(Cal, Method).
-file("src/automata/ical.gleam", 491).
-spec with_calscale(automata@ical@validator:calendar(), binary()) -> automata@ical@validator:calendar().
with_calscale(Cal, Scale) ->
automata@ical@validator:with_calscale(Cal, Scale).
-file("src/automata/ical.gleam", 495).
-spec add_event(
automata@ical@validator:calendar(),
automata@ical@validator:event()
) -> automata@ical@validator:calendar().
add_event(Cal, Event) ->
automata@ical@validator:add_event(Cal, Event).
-file("src/automata/ical.gleam", 499).
-spec add_todo(
automata@ical@validator:calendar(),
automata@ical@validator:todo()
) -> automata@ical@validator:calendar().
add_todo(Cal, T) ->
automata@ical@validator:add_todo(Cal, T).
-file("src/automata/ical.gleam", 503).
-spec add_journal(
automata@ical@validator:calendar(),
automata@ical@validator:journal()
) -> automata@ical@validator:calendar().
add_journal(Cal, J) ->
automata@ical@validator:add_journal(Cal, J).
-file("src/automata/ical.gleam", 507).
-spec add_freebusy(
automata@ical@validator:calendar(),
automata@ical@validator:free_busy()
) -> automata@ical@validator:calendar().
add_freebusy(Cal, Fb) ->
automata@ical@validator:add_freebusy(Cal, Fb).
-file("src/automata/ical.gleam", 511).
-spec add_timezone(
automata@ical@validator:calendar(),
automata@ical@validator:timezone()
) -> automata@ical@validator:calendar().
add_timezone(Cal, Tz) ->
automata@ical@validator:add_timezone(Cal, Tz).
-file("src/automata/ical.gleam", 515).
-spec add_unknown_component(
automata@ical@validator:calendar(),
automata@ical@validator:unknown_component()
) -> automata@ical@validator:calendar().
add_unknown_component(Cal, Component) ->
automata@ical@validator:add_unknown_component(Cal, Component).
-file("src/automata/ical.gleam", 522).
-spec with_calendar_x_property(
automata@ical@validator:calendar(),
binary(),
binary()
) -> automata@ical@validator:calendar().
with_calendar_x_property(Cal, Name, Value) ->
automata@ical@validator:with_calendar_x_property(Cal, Name, Value).
-file("src/automata/ical.gleam", 534).
-spec new_event(binary(), automata@schedule@ast:date_time()) -> automata@ical@validator:event().
new_event(Uid, Dtstamp) ->
automata@ical@validator:new_event(Uid, Dtstamp).
-file("src/automata/ical.gleam", 541).
-spec with_dtstart(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
with_dtstart(Event, Dt) ->
automata@ical@validator:with_dtstart(Event, Dt).
-file("src/automata/ical.gleam", 545).
-spec with_dtstart_tzid(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_dtstart_tzid(Event, Tzid) ->
automata@ical@validator:with_dtstart_tzid(Event, Tzid).
-file("src/automata/ical.gleam", 549).
-spec with_dtend(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
with_dtend(Event, Dt) ->
automata@ical@validator:with_dtend(Event, Dt).
-file("src/automata/ical.gleam", 553).
-spec with_dtend_tzid(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_dtend_tzid(Event, Tzid) ->
automata@ical@validator:with_dtend_tzid(Event, Tzid).
-file("src/automata/ical.gleam", 557).
-spec with_duration(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_duration(Event, Value) ->
automata@ical@validator:with_duration(Event, Value).
-file("src/automata/ical.gleam", 561).
-spec with_summary(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_summary(Event, Value) ->
automata@ical@validator:with_summary(Event, Value).
-file("src/automata/ical.gleam", 565).
-spec with_description(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_description(Event, Value) ->
automata@ical@validator:with_description(Event, Value).
-file("src/automata/ical.gleam", 569).
-spec with_location(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_location(Event, Value) ->
automata@ical@validator:with_location(Event, Value).
-file("src/automata/ical.gleam", 573).
-spec with_status(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_status(Event, Value) ->
automata@ical@validator:with_status(Event, Value).
-file("src/automata/ical.gleam", 577).
-spec with_organizer(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_organizer(Event, Value) ->
automata@ical@validator:with_organizer(Event, Value).
-file("src/automata/ical.gleam", 581).
-spec add_attendee(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
add_attendee(Event, Value) ->
automata@ical@validator:add_attendee(Event, Value).
-file("src/automata/ical.gleam", 585).
-spec add_category(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
add_category(Event, Value) ->
automata@ical@validator:add_category(Event, Value).
-file("src/automata/ical.gleam", 589).
-spec with_url(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_url(Event, Value) ->
automata@ical@validator:with_url(Event, Value).
-file("src/automata/ical.gleam", 593).
-spec with_created(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
with_created(Event, Dt) ->
automata@ical@validator:with_created(Event, Dt).
-file("src/automata/ical.gleam", 597).
-spec with_last_modified(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
with_last_modified(Event, Dt) ->
automata@ical@validator:with_last_modified(Event, Dt).
-file("src/automata/ical.gleam", 601).
-spec with_sequence(automata@ical@validator:event(), integer()) -> automata@ical@validator:event().
with_sequence(Event, Value) ->
automata@ical@validator:with_sequence(Event, Value).
-file("src/automata/ical.gleam", 605).
-spec with_transparency(automata@ical@validator:event(), binary()) -> automata@ical@validator:event().
with_transparency(Event, Value) ->
automata@ical@validator:with_transparency(Event, Value).
-file("src/automata/ical.gleam", 609).
-spec with_rrule(
automata@ical@validator:event(),
automata@rrule@ast:raw_r_rule()
) -> automata@ical@validator:event().
with_rrule(Event, Rule) ->
automata@ical@validator:with_rrule(Event, Rule).
-file("src/automata/ical.gleam", 613).
-spec add_rdate(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
add_rdate(Event, Dt) ->
automata@ical@validator:add_rdate(Event, Dt).
-file("src/automata/ical.gleam", 617).
-spec add_exdate(
automata@ical@validator:event(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:event().
add_exdate(Event, Dt) ->
automata@ical@validator:add_exdate(Event, Dt).
-file("src/automata/ical.gleam", 621).
-spec add_alarm(
automata@ical@validator:event(),
automata@ical@validator:alarm()
) -> automata@ical@validator:event().
add_alarm(Event, Alarm) ->
automata@ical@validator:add_alarm(Event, Alarm).
-file("src/automata/ical.gleam", 625).
-spec with_event_x_property(automata@ical@validator:event(), binary(), binary()) -> automata@ical@validator:event().
with_event_x_property(Event, Name, Value) ->
automata@ical@validator:with_event_x_property(Event, Name, Value).
-file("src/automata/ical.gleam", 633).
-spec new_todo(binary(), automata@schedule@ast:date_time()) -> automata@ical@validator:todo().
new_todo(Uid, Dtstamp) ->
automata@ical@validator:new_todo(Uid, Dtstamp).
-file("src/automata/ical.gleam", 637).
-spec with_todo_dtstart(
automata@ical@validator:todo(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:todo().
with_todo_dtstart(T, Dt) ->
automata@ical@validator:with_todo_dtstart(T, Dt).
-file("src/automata/ical.gleam", 641).
-spec with_todo_due(
automata@ical@validator:todo(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:todo().
with_todo_due(T, Dt) ->
automata@ical@validator:with_todo_due(T, Dt).
-file("src/automata/ical.gleam", 645).
-spec with_todo_completed(
automata@ical@validator:todo(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:todo().
with_todo_completed(T, Dt) ->
automata@ical@validator:with_todo_completed(T, Dt).
-file("src/automata/ical.gleam", 649).
-spec with_todo_summary(automata@ical@validator:todo(), binary()) -> automata@ical@validator:todo().
with_todo_summary(T, Value) ->
automata@ical@validator:with_todo_summary(T, Value).
-file("src/automata/ical.gleam", 653).
-spec with_todo_description(automata@ical@validator:todo(), binary()) -> automata@ical@validator:todo().
with_todo_description(T, Value) ->
automata@ical@validator:with_todo_description(T, Value).
-file("src/automata/ical.gleam", 657).
-spec with_todo_status(automata@ical@validator:todo(), binary()) -> automata@ical@validator:todo().
with_todo_status(T, Value) ->
automata@ical@validator:with_todo_status(T, Value).
-file("src/automata/ical.gleam", 661).
-spec with_todo_percent_complete(automata@ical@validator:todo(), integer()) -> automata@ical@validator:todo().
with_todo_percent_complete(T, Value) ->
automata@ical@validator:with_todo_percent_complete(T, Value).
-file("src/automata/ical.gleam", 665).
-spec with_todo_priority(automata@ical@validator:todo(), integer()) -> automata@ical@validator:todo().
with_todo_priority(T, Value) ->
automata@ical@validator:with_todo_priority(T, Value).
-file("src/automata/ical.gleam", 669).
-spec add_todo_category(automata@ical@validator:todo(), binary()) -> automata@ical@validator:todo().
add_todo_category(T, Value) ->
automata@ical@validator:add_todo_category(T, Value).
-file("src/automata/ical.gleam", 673).
-spec with_todo_rrule(
automata@ical@validator:todo(),
automata@rrule@ast:raw_r_rule()
) -> automata@ical@validator:todo().
with_todo_rrule(T, Rule) ->
automata@ical@validator:with_todo_rrule(T, Rule).
-file("src/automata/ical.gleam", 677).
-spec add_todo_rdate(
automata@ical@validator:todo(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:todo().
add_todo_rdate(T, Dt) ->
automata@ical@validator:add_todo_rdate(T, Dt).
-file("src/automata/ical.gleam", 681).
-spec add_todo_exdate(
automata@ical@validator:todo(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:todo().
add_todo_exdate(T, Dt) ->
automata@ical@validator:add_todo_exdate(T, Dt).
-file("src/automata/ical.gleam", 685).
-spec add_todo_alarm(
automata@ical@validator:todo(),
automata@ical@validator:alarm()
) -> automata@ical@validator:todo().
add_todo_alarm(T, Alarm) ->
automata@ical@validator:add_todo_alarm(T, Alarm).
-file("src/automata/ical.gleam", 689).
-spec with_todo_x_property(automata@ical@validator:todo(), binary(), binary()) -> automata@ical@validator:todo().
with_todo_x_property(T, Name, Value) ->
automata@ical@validator:with_todo_x_property(T, Name, Value).
-file("src/automata/ical.gleam", 697).
-spec new_journal(binary(), automata@schedule@ast:date_time()) -> automata@ical@validator:journal().
new_journal(Uid, Dtstamp) ->
automata@ical@validator:new_journal(Uid, Dtstamp).
-file("src/automata/ical.gleam", 704).
-spec with_journal_dtstart(
automata@ical@validator:journal(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:journal().
with_journal_dtstart(J, Dt) ->
automata@ical@validator:with_journal_dtstart(J, Dt).
-file("src/automata/ical.gleam", 708).
-spec with_journal_summary(automata@ical@validator:journal(), binary()) -> automata@ical@validator:journal().
with_journal_summary(J, Value) ->
automata@ical@validator:with_journal_summary(J, Value).
-file("src/automata/ical.gleam", 712).
-spec with_journal_description(automata@ical@validator:journal(), binary()) -> automata@ical@validator:journal().
with_journal_description(J, Value) ->
automata@ical@validator:with_journal_description(J, Value).
-file("src/automata/ical.gleam", 716).
-spec with_journal_status(automata@ical@validator:journal(), binary()) -> automata@ical@validator:journal().
with_journal_status(J, Value) ->
automata@ical@validator:with_journal_status(J, Value).
-file("src/automata/ical.gleam", 720).
-spec add_journal_category(automata@ical@validator:journal(), binary()) -> automata@ical@validator:journal().
add_journal_category(J, Value) ->
automata@ical@validator:add_journal_category(J, Value).
-file("src/automata/ical.gleam", 724).
-spec with_journal_x_property(
automata@ical@validator:journal(),
binary(),
binary()
) -> automata@ical@validator:journal().
with_journal_x_property(J, Name, Value) ->
automata@ical@validator:with_journal_x_property(J, Name, Value).
-file("src/automata/ical.gleam", 736).
-spec new_freebusy(binary(), automata@schedule@ast:date_time()) -> automata@ical@validator:free_busy().
new_freebusy(Uid, Dtstamp) ->
automata@ical@validator:new_freebusy(Uid, Dtstamp).
-file("src/automata/ical.gleam", 743).
-spec with_freebusy_dtstart(
automata@ical@validator:free_busy(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:free_busy().
with_freebusy_dtstart(Fb, Dt) ->
automata@ical@validator:with_freebusy_dtstart(Fb, Dt).
-file("src/automata/ical.gleam", 750).
-spec with_freebusy_dtend(
automata@ical@validator:free_busy(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:free_busy().
with_freebusy_dtend(Fb, Dt) ->
automata@ical@validator:with_freebusy_dtend(Fb, Dt).
-file("src/automata/ical.gleam", 754).
-spec with_freebusy_organizer(automata@ical@validator:free_busy(), binary()) -> automata@ical@validator:free_busy().
with_freebusy_organizer(Fb, Value) ->
automata@ical@validator:with_freebusy_organizer(Fb, Value).
-file("src/automata/ical.gleam", 758).
-spec add_freebusy_attendee(automata@ical@validator:free_busy(), binary()) -> automata@ical@validator:free_busy().
add_freebusy_attendee(Fb, Value) ->
automata@ical@validator:add_freebusy_attendee(Fb, Value).
-file("src/automata/ical.gleam", 762).
-spec add_freebusy_period(automata@ical@validator:free_busy(), binary()) -> automata@ical@validator:free_busy().
add_freebusy_period(Fb, Value) ->
automata@ical@validator:add_freebusy_period(Fb, Value).
-file("src/automata/ical.gleam", 766).
-spec with_freebusy_x_property(
automata@ical@validator:free_busy(),
binary(),
binary()
) -> automata@ical@validator:free_busy().
with_freebusy_x_property(Fb, Name, Value) ->
automata@ical@validator:with_freebusy_x_property(Fb, Name, Value).
-file("src/automata/ical.gleam", 778).
-spec new_timezone(binary()) -> automata@ical@validator:timezone().
new_timezone(Tzid) ->
automata@ical@validator:new_timezone(Tzid).
-file("src/automata/ical.gleam", 782).
-spec with_timezone_last_modified(
automata@ical@validator:timezone(),
automata@schedule@ast:date_time()
) -> automata@ical@validator:timezone().
with_timezone_last_modified(Tz, Dt) ->
automata@ical@validator:with_timezone_last_modified(Tz, Dt).
-file("src/automata/ical.gleam", 789).
-spec with_timezone_url(automata@ical@validator:timezone(), binary()) -> automata@ical@validator:timezone().
with_timezone_url(Tz, Value) ->
automata@ical@validator:with_timezone_url(Tz, Value).
-file("src/automata/ical.gleam", 793).
-spec add_timezone_standard(
automata@ical@validator:timezone(),
automata@ical@validator:timezone_rule()
) -> automata@ical@validator:timezone().
add_timezone_standard(Tz, Rule) ->
automata@ical@validator:add_timezone_standard(Tz, Rule).
-file("src/automata/ical.gleam", 797).
-spec add_timezone_daylight(
automata@ical@validator:timezone(),
automata@ical@validator:timezone_rule()
) -> automata@ical@validator:timezone().
add_timezone_daylight(Tz, Rule) ->
automata@ical@validator:add_timezone_daylight(Tz, Rule).
-file("src/automata/ical.gleam", 801).
-spec with_timezone_x_property(
automata@ical@validator:timezone(),
binary(),
binary()
) -> automata@ical@validator:timezone().
with_timezone_x_property(Tz, Name, Value) ->
automata@ical@validator:with_timezone_x_property(Tz, Name, Value).
-file("src/automata/ical.gleam", 809).
-spec new_timezone_rule(automata@schedule@ast:date_time(), binary(), binary()) -> automata@ical@validator:timezone_rule().
new_timezone_rule(Dtstart, Offset_from, Offset_to) ->
automata@ical@validator:new_timezone_rule(Dtstart, Offset_from, Offset_to).
-file("src/automata/ical.gleam", 821).
-spec with_timezone_rule_rrule(
automata@ical@validator:timezone_rule(),
automata@rrule@ast:raw_r_rule()
) -> automata@ical@validator:timezone_rule().
with_timezone_rule_rrule(Rule, Value) ->
automata@ical@validator:with_timezone_rule_rrule(Rule, Value).
-file("src/automata/ical.gleam", 828).
-spec with_timezone_rule_name(automata@ical@validator:timezone_rule(), binary()) -> automata@ical@validator:timezone_rule().
with_timezone_rule_name(Rule, Value) ->
automata@ical@validator:with_timezone_rule_name(Rule, Value).
-file("src/automata/ical.gleam", 839).
-spec new_alarm(binary(), binary()) -> automata@ical@validator:alarm().
new_alarm(Action, Trigger) ->
automata@ical@validator:new_alarm(Action, Trigger).
-file("src/automata/ical.gleam", 843).
-spec with_alarm_description(automata@ical@validator:alarm(), binary()) -> automata@ical@validator:alarm().
with_alarm_description(Alarm, Value) ->
automata@ical@validator:with_alarm_description(Alarm, Value).
-file("src/automata/ical.gleam", 847).
-spec with_alarm_summary(automata@ical@validator:alarm(), binary()) -> automata@ical@validator:alarm().
with_alarm_summary(Alarm, Value) ->
automata@ical@validator:with_alarm_summary(Alarm, Value).
-file("src/automata/ical.gleam", 851).
-spec with_alarm_repeat(automata@ical@validator:alarm(), integer()) -> automata@ical@validator:alarm().
with_alarm_repeat(Alarm, Value) ->
automata@ical@validator:with_alarm_repeat(Alarm, Value).
-file("src/automata/ical.gleam", 855).
-spec with_alarm_duration(automata@ical@validator:alarm(), binary()) -> automata@ical@validator:alarm().
with_alarm_duration(Alarm, Value) ->
automata@ical@validator:with_alarm_duration(Alarm, Value).
-file("src/automata/ical.gleam", 859).
-spec add_alarm_attendee(automata@ical@validator:alarm(), binary()) -> automata@ical@validator:alarm().
add_alarm_attendee(Alarm, Value) ->
automata@ical@validator:add_alarm_attendee(Alarm, Value).
-file("src/automata/ical.gleam", 863).
-spec with_alarm_x_property(automata@ical@validator:alarm(), binary(), binary()) -> automata@ical@validator:alarm().
with_alarm_x_property(Alarm, Name, Value) ->
automata@ical@validator:with_alarm_x_property(Alarm, Name, Value).