File Coverage

blib/lib/STIX/Observable/Type/WindowsRegistryValue.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             package STIX::Observable::Type::WindowsRegistryValue;
2              
3 24     24   558 use 5.010001;
  24         116  
4 24     24   154 use strict;
  24         60  
  24         802  
5 24     24   126 use warnings;
  24         62  
  24         1832  
6 24     24   201 use utf8;
  24         86  
  24         227  
7              
8 24     24   1137 use STIX::Common::OpenVocabulary;
  24         70  
  24         805  
9              
10 24     24   127 use Moo;
  24         53  
  24         185  
11 24     24   11898 use Types::Standard qw(Str Enum);
  24         94  
  24         315  
12 24     24   48936 use namespace::autoclean;
  24         62  
  24         281  
13              
14             extends 'STIX::Object';
15              
16 24         2545 use constant SCHEMA =>
17 24     24   2871 'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/windows-registry-key.json#/definitions/windows-registry-value-type';
  24         57  
18              
19 24     24   192 use constant PROPERTIES => (qw(name data data_type));
  24         78  
  24         4548  
20              
21             has name => (is => 'rw', isa => Str);
22             has data => (is => 'rw', isa => Str);
23             has data_type => (is => 'rw', isa => Enum [STIX::Common::Enum->WINDOWS_REGISTRY_DATATYPE()]);
24              
25             1;
26              
27             =encoding utf-8
28              
29             =head1 NAME
30              
31             STIX::Observable::Type::WindowsRegistryValue - STIX Cyber-observable Object (SCO) - Windows Registry Value
32              
33             =head1 SYNOPSIS
34              
35             use STIX::Observable::Type::WindowsRegistryValue;
36              
37             my $windows_registry_value_type = STIX::Observable::Type::WindowsRegistryValue->new();
38              
39              
40             =head1 DESCRIPTION
41              
42             Specifies the values found under the registry key.
43              
44              
45             =head2 METHODS
46              
47             L inherits all methods from L
48             and implements the following new ones.
49              
50             =over
51              
52             =item STIX::Observable::Type::WindowsRegistryValue->new(%properties)
53              
54             Create a new instance of L.
55              
56             =item $windows_registry_value_type->data
57              
58             Specifies the data contained in the registry value.
59              
60             =item $windows_registry_value_type->data_type
61              
62             Specifies the registry (REG_*) data type used in the registry value.
63              
64             =item $windows_registry_value_type->name
65              
66             Specifies the name of the registry value. For specifying the default value
67             in a registry key, an empty string MUST be used.
68              
69             =back
70              
71              
72             =head2 HELPERS
73              
74             =over
75              
76             =item $windows_registry_value_type->TO_JSON
77              
78             Helper for JSON encoders.
79              
80             =item $windows_registry_value_type->to_hash
81              
82             Return the object HASH.
83              
84             =item $windows_registry_value_type->to_string
85              
86             Encode the object in JSON.
87              
88             =item $windows_registry_value_type->validate
89              
90             Validate the object using JSON Schema
91             (see L).
92              
93             =back
94              
95              
96             =head1 SUPPORT
97              
98             =head2 Bugs / Feature Requests
99              
100             Please report any bugs or feature requests through the issue tracker
101             at L.
102             You will be notified automatically of any progress on your issue.
103              
104             =head2 Source Code
105              
106             This is open source software. The code repository is available for
107             public review and contribution under the terms of the license.
108              
109             L
110              
111             git clone https://github.com/giterlizzi/perl-STIX.git
112              
113              
114             =head1 AUTHOR
115              
116             =over 4
117              
118             =item * Giuseppe Di Terlizzi
119              
120             =back
121              
122              
123             =head1 LICENSE AND COPYRIGHT
124              
125             This software is copyright (c) 2024 by Giuseppe Di Terlizzi.
126              
127             This is free software; you can redistribute it and/or modify it under
128             the same terms as the Perl 5 programming language system itself.
129              
130             =cut