aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311/Endpoint/Service.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Open311/Endpoint/Service.pm')
-rw-r--r--perllib/Open311/Endpoint/Service.pm53
1 files changed, 53 insertions, 0 deletions
diff --git a/perllib/Open311/Endpoint/Service.pm b/perllib/Open311/Endpoint/Service.pm
new file mode 100644
index 000000000..282e5f921
--- /dev/null
+++ b/perllib/Open311/Endpoint/Service.pm
@@ -0,0 +1,53 @@
+package Open311::Endpoint::Service;
+use Moo;
+use MooX::HandlesVia;
+use Types::Standard ':all';
+use namespace::clean;
+
+has service_name => (
+ is => 'ro',
+ isa => Str,
+);
+
+has service_code => (
+ is => 'ro',
+ isa => Str,
+);
+
+has default_service_notice => (
+ is => 'ro',
+ isa => Maybe[Str],
+ predicate => 1,
+);
+
+has description => (
+ is => 'ro',
+ isa => Str,
+);
+
+has keywords => (
+ is => 'ro',
+ isa => ArrayRef[Str],
+);
+
+has group => (
+ is => 'ro',
+ isa => Str,
+);
+
+has type => (
+ is => 'ro',
+ isa => Enum[qw/ realtime batch blackbox /],
+);
+
+has attributes => (
+ is => 'ro',
+ isa => ArrayRef[ InstanceOf['Open311::Endpoint::Service::Attribute'] ],
+ handles_via => 'Array',
+ handles => {
+ has_attributes => 'count',
+ get_attributes => 'elements',
+ }
+);
+
+1;