File: UserEntry.pm

package info (click to toggle)
libvuser-google-api-perl 1.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 348 kB
  • sloc: perl: 3,176; makefile: 4
file content (41 lines) | stat: -rw-r--r-- 1,125 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package VUser::Google::Provisioning::UserEntry;
use warnings;
use strict;

our $VERSION = '0.2.0';

use Moose;

has 'UserName' => (is => 'rw', isa => 'Str');
has 'GivenName' => (is => 'rw', isa => 'Str');
has 'FamilyName' => (is => 'rw', isa => 'Str');
has 'Password' => (is => 'rw', isa => 'Str');
has 'HashFunctionName' => (is => 'rw', isa => 'Str');
has 'Suspended' => (is => 'rw', isa => 'Bool', default => 0);
has 'Quota' => (is => 'rw', isa => 'Int');
has 'ChangePasswordAtNextLogin' => (is => 'rw', isa => 'Bool', default => 0);
has 'Admin' => (is => 'rw', isa => 'Bool', default => 0);
has 'AgreedToTerms' => (is => 'rw', isa => 'Bool', default => 0);

sub as_hash {
    my $self = shift;

    my %hash = (
	userName   => $self->UserName,
	givenName  => $self->GivenName,
	familyName => $self->FamilyName,
	password   => $self->Password,
	hashFunctionName => $self->HashFunctionName,
	suspended  => $self->Suspended,
	quota      => $self->Quota,
	changePasswordAtNextLogin => $self->ChangePasswordAtNextLogin,
	admin      => $self->Admin,
    );

    return %hash;
}

no Moose;
__PACKAGE__->meta->make_immutable;

1;