d::Object::SaaSposeResponse;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
eturn !$self->success;
}
sub is_success {
my $self = shift;
return $self->success;
}
sub TO_JSON {
my $self = shift;
my %res = map { $_ => $self->{$_} } keys %$self;
return \%res;
}
1;
=
>content({text => 'Success', code => 0});
The contents of a successful HEC request (decoded from JSON)
=head2 is_error
my $is_error = $res->is_error;
Returns true if the response was an error.
r a hash reference with attribute values.
=head2 TO_JSON
my $hash = $res->TO_JSON;
Returns a JSON encoding friendly hashref for use with L<JSON::XS>
=head1 SEE ALSO
L<Splunk::HEC::Request>, L<S
Cloud::Object::SectionStart;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
ject::PageVerticalAlignment;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
oud::Object::BarcodeBuilder;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
eCloud::Object::NumberStyle;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
:Object::ChecksumValidation;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
Object::BarcodeBuildersList;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
ud::Object::ResponseMessage;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
Object::BarcodeResponseList;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
deCloud::Object::TextEffect;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
deCloud::Object::BaseObject;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
anually.
#
# return json string
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
>get_attribute_map->{$_key}} = $self->{$_key};
}
}
return $_data;
}
# from json string
sub from_hash {
my ($self, $hash) = @_;
# loop through attributes and use swagg
rCodeCloud::Object::Barcode;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
use HTTP::Request::Common qw(DELETE POST GET HEAD PUT);
use HTTP::Status;
use URI::Query;
use JSON;
use URI::Escape;
use Scalar::Util;
use Log::Any qw($log);
use Carp;
use Module::Runtime qw(
".$_url."\n";
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = keys %$post_params > 1
eturn $value->datetime();
}
else {
return $value;
}
}
# Deserialize a JSON string into an object
#
# @param string $class class name is passed as a string
# @param str
ect::PageBorderDistanceFrom;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'text'}) {
my $escapedText = uri_esc
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'format'}) {
$_resource_path =~ s/\Q
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
e enough
use Modern::Perl;
use Moose;
use namespace::autoclean;
use Class::Load;
use Clone;
use JSON::XS;
our $VERSION = '0.18';
=head2 data
You can pass hashref or arrayref as data
When it is a
02d-%02d %02d:%02d:%02d', $yyyy, $mm, $dd, $hh, $mi, $ss;
if ( ref $text ) {
$text = JSON::XS->new->allow_unknown->allow_blessed->encode( $text );
}
return sprintf "%s\t%s\t%s\t%
if the token has the indexes parameter set.
# "fields" (Not applicable to raw data.) Specifies a JSON object that contains explicit custom fields to be defined at index time. Requests containing the
;
has sourcetype => '';
has index => '';
has fields => '';
has event => '';
sub TO_JSON {
my $self = shift;
Carp::croak('Splunk HEC requests must contain a valid event') unless $sel
sourcetype('custom-sourcetype');
The sourcetype value to assign to the event data.
e.g. Use _json for JSON-based events (not required)
=head2 index
my $index = $req->index;
$index = $req->index
seBead::From::PNG->new({ filename => 'my_png.png' });
$object->process(view => 'JSON'); # Data is returned as JSON
=head1 DESCRIPTION
Base class for formatting data returned from processing a PNG
package Splunk::HEC;
use Carp;
use JSON::XS;
use HTTP::Tiny;
use Splunk::Base -base;
use Splunk::HEC::Request;
use Splunk::HEC::Response;
use strict;
our $VERSION = '1.02';
has url => sub { return
meout => $args{timeout} || $self->timeout,
default_headers => {'Content-Type' => 'application/json'}
);
Carp::croak('A valid Splunk HEC token is required for authentication') unless $self->to
if the token has the indexes parameter set.
# "fields" (Not applicable to raw data.) Specifies a JSON object that contains explicit custom fields to be defined at index time. Requests containing the