| 1 | package Net::Cisco::ISE::IdentityGroup; | ||
| 2 | use strict; | ||
| 3 | use Moose; | ||
| 4 | |||
| 5 | BEGIN { | ||
| 6 | use Exporter (); | ||
| 7 | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS %actions); | ||
| 8 | $VERSION = '0.01'; | ||
| 9 | @ISA = qw(Exporter); | ||
| 10 | @EXPORT = qw(); | ||
| 11 | @EXPORT_OK = qw(); | ||
| 12 | %EXPORT_TAGS = (); | ||
| 13 | }; | ||
| 14 | |||
| 15 | %actions = ( "query" => "/ers/config/identitygroup/", | ||
| 16 | "create" => "/ers/config/identitygroup/", | ||
| 17 | "update" => "/ers/config/identitygroup/", | ||
| 18 | "getById" => "/ers/config/identitygroup/", | ||
| 19 | ); | ||
| 20 | |||
| 21 | # MOOSE! | ||
| 22 | |||
| 23 | has 'description' => ( | ||
| 24 | is => 'rw', | ||
| 25 | isa => 'Any', | ||
| 26 | ); | ||
| 27 | |||
| 28 | has 'id' => ( | ||
| 29 | is => 'rw', | ||
| 30 | isa => 'Str', | ||
| 31 | ); | ||
| 32 | |||
| 33 | has 'name' => ( | ||
| 34 | is => 'rw', | ||
| 35 | isa => 'Str', | ||
| 36 | ); | ||
| 37 | |||
| 38 | # No Moose | ||
| 39 | |||
| 40 | sub toXML | ||
| 41 | { my $self = shift; | ||
| 42 | my $id = $self->id; | ||
| 43 | my $description = $self->description || ""; | ||
| 44 | my $name = $self->name || ""; | ||
| 45 | my $result = ""; | ||
| 46 | |||
| 47 | if ($id) { $result = " <id>$id</id>\n"; } | ||
| 48 | $result .= <<XML; | ||
| 49 | <description>$description</description> | ||
| 50 | <name>$name</name> | ||
| 51 | XML | ||
| 52 | |||
| 53 | return $result; | ||
| 54 | } | ||
| 55 | |||
| 56 | sub header | ||
| 57 | { my $self = shift; | ||
| 58 | my $users = shift; | ||
| 59 | return qq{<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:identityGroups xmlns:ns2="identity.rest.mgmt.ise.nm.cisco.com">$users</ns2:identityGroups>}; | ||
| 60 | } | ||
| 61 | |||
| 62 | #################### main pod documentation end ################### | ||
| 63 | __PACKAGE__->meta->make_immutable(); | ||
| 64 | |||
| 65 | 1; | ||
| 66 | # The preceding line will help the module return a true value | ||
| 67 |