File Coverage

blib/lib/WebService/TypePad/Object/ObjectType.pm
Criterion Covered Total %
statement 12 27 44.4
branch 0 6 0.0
condition n/a
subroutine 4 7 57.1
pod 3 3 100.0
total 19 43 44.1


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::ObjectType;
2 1     1   1591 use strict;
  1         3  
  1         38  
3 1     1   6 use warnings;
  1         1  
  1         29  
4 1     1   4 use WebService::TypePad::Util::Coerce;
  1         3  
  1         23  
5 1     1   5 use base qw(WebService::TypePad::Object::Base);
  1         2  
  1         357  
6              
7             sub name {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{name} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return $self->{data}{name};
15             }
16             }
17              
18             sub parent_type {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{parentType} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
22 0           return $_[0];
23             }
24             else {
25 0           return $self->{data}{parentType};
26             }
27             }
28              
29             sub properties {
30 0     0 1   my $self = shift;
31 0 0         if (@_) {
32 0           $self->{data}{properties} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_ObjectProperty_in);
33 0           return $_[0];
34             }
35             else {
36 0           return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{properties}, \&WebService::TypePad::Util::Coerce::coerce_ObjectProperty_out);
37             }
38             }
39              
40             1;
41              
42             =head1 NAME
43              
44             WebService::TypePad::Object::ObjectType - Perl representation of TypePad's ObjectType object type
45              
46             =head1 SYNOPSIS
47              
48             use WebService::TypePad::Object::ObjectType;
49             my $object_type = WebService::TypePad::Object::ObjectType->new();
50              
51             =head1 DESCRIPTION
52              
53             This is a Perl representation of TypePad's ObjectType object type.
54             For more information about this type and its parameters, see L.
55              
56             =head1 PROPERTIES
57              
58             Each of these properties has an accessor method which will retrieve the property's value when called with no arguments or set the property's value when called with one argument.
59              
60             =head2 $object_type->name
61              
62             The name of the type. Absent if this is an anonymous type representing the request or response of an action endpoint.
63              
64             Returns a single C value.
65              
66             =head2 $object_type->parent_type
67              
68             The name of the parent type, if any.
69              
70             Returns a single C value.
71              
72             =head2 $object_type->properties
73              
74             The properties of this type.
75              
76             Returns an array of L objects.
77              
78             =head1 SEE ALSO
79              
80             =over 1
81              
82             =item * L
83              
84             =item * L
85              
86             =back