NAME

STIX::Common::Bundle - STIX Bundle

SYNOPSIS

use STIX::Common::Bundle;

my $bundle = STIX::Common::Bundle->new(
    objects => [
        STIX::Vulnerability->new( ... ),
        STIX::Sighting->new( ... ),
        STIX::Common::Relationship->new( ... )
    ]
);

# append new STIX object
push @{ $bundle->objects }, STIX::Incident->new( ... );

# append new STIX object using STIX::Common::List->push
$bundle->objects->push( STIX::Indicator->new( ... ) );

DESCRIPTION

A Bundle is a collection of arbitrary STIX Objects and Marking Definitions grouped together in a single container.

METHODS

STIX::Common::Bundle inherits all methods from STIX::Object and implements the following new ones.

STIX::Common::Bundle->new(%properties)

Create a new instance of STIX::Common::Bundle.

$bundle->id

An identifier for this bundle. The id field for the Bundle is designed to help tools that may need it for processing, but tools are not required to store or track it.

$bundle->objects

Specifies a set of one or more STIX Objects.

$bundle->type

The type of this object, which MUST be the literal bundle.

HELPERS

$bundle->TO_JSON

Helper for JSON encoders.

$bundle->to_hash

Return the object HASH.

$bundle->to_string

Encode the object in JSON.

$bundle->validate

Validate the object using JSON Schema (see STIX::Schema).

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/giterlizzi/perl-STIX/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/giterlizzi/perl-STIX

git clone https://github.com/giterlizzi/perl-STIX.git

AUTHOR

  • Giuseppe Di Terlizzi <gdt@cpan.org>

LICENSE AND COPYRIGHT

This software is copyright (c) 2024 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.