File Coverage

blib/lib/Paws/DynamoDB/KeySchemaElement.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Paws::DynamoDB::KeySchemaElement;
2 1     1   597 use Moose;
  1     1   7  
  1         12  
  1         417  
  1         2  
  1         16  
3             has AttributeName => (is => 'ro', isa => 'Str', required => 1);
4             has KeyType => (is => 'ro', isa => 'Str', required => 1);
5             1;
6              
7             ### main pod documentation begin ###
8              
9             =head1 NAME
10              
11             Paws::DynamoDB::KeySchemaElement
12              
13             =head1 USAGE
14              
15             This class represents one of two things:
16              
17             =head3 Arguments in a call to a service
18              
19             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
20             Each attribute should be used as a named argument in the calls that expect this type of object.
21              
22             As an example, if Att1 is expected to be a Paws::DynamoDB::KeySchemaElement object:
23              
24             $service_obj->Method(Att1 => { AttributeName => $value, ..., KeyType => $value });
25              
26             =head3 Results returned from an API call
27              
28             Use accessors for each attribute. If Att1 is expected to be an Paws::DynamoDB::KeySchemaElement object:
29              
30             $result = $service_obj->Method(...);
31             $result->Att1->AttributeName
32              
33             =head1 DESCRIPTION
34              
35             Represents I<a single element> of a key schema. A key schema specifies
36             the attributes that make up the primary key of a table, or the key
37             attributes of an index.
38              
39             A C<KeySchemaElement> represents exactly one attribute of the primary
40             key. For example, a simple primary key would be represented by one
41             C<KeySchemaElement> (for the partition key). A composite primary key
42             would require one C<KeySchemaElement> for the partition key, and
43             another C<KeySchemaElement> for the sort key.
44              
45             A C<KeySchemaElement> must be a scalar, top-level attribute (not a
46             nested attribute). The data type must be one of String, Number, or
47             Binary. The attribute cannot be nested within a List or a Map.
48              
49             =head1 ATTRIBUTES
50              
51              
52             =head2 B<REQUIRED> AttributeName => Str
53              
54             The name of a key attribute.
55              
56              
57             =head2 B<REQUIRED> KeyType => Str
58              
59             The role that this key attribute will assume:
60              
61             =over
62              
63             =item *
64              
65             C<HASH> - partition key
66              
67             =item *
68              
69             C<RANGE> - sort key
70              
71             =back
72              
73             The partition key of an item is also known as its I<hash attribute>.
74             The term "hash attribute" derives from DynamoDB' usage of an internal
75             hash function to evenly distribute data items across partitions, based
76             on their partition key values.
77              
78             The sort key of an item is also known as its I<range attribute>. The
79             term "range attribute" derives from the way DynamoDB stores items with
80             the same partition key physically close together, in sorted order by
81             the sort key value.
82              
83              
84              
85             =head1 SEE ALSO
86              
87             This class forms part of L<Paws>, describing an object used in L<Paws::DynamoDB>
88              
89             =head1 BUGS and CONTRIBUTIONS
90              
91             The source code is located here: https://github.com/pplu/aws-sdk-perl
92              
93             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
94              
95             =cut
96