blib/lib/Paws/AppSync/CreateResolver.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::AppSync::CreateResolver;
3 use Moose;
4 has ApiId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'apiId', required => 1);
5 has CachingConfig => (is => 'ro', isa => 'Paws::AppSync::CachingConfig', traits => ['NameInRequest'], request_name => 'cachingConfig');
6 has DataSourceName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'dataSourceName');
7 has FieldName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'fieldName', required => 1);
8 has Kind => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'kind');
9 has PipelineConfig => (is => 'ro', isa => 'Paws::AppSync::PipelineConfig', traits => ['NameInRequest'], request_name => 'pipelineConfig');
10 has RequestMappingTemplate => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'requestMappingTemplate');
11 has ResponseMappingTemplate => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'responseMappingTemplate');
12 has SyncConfig => (is => 'ro', isa => 'Paws::AppSync::SyncConfig', traits => ['NameInRequest'], request_name => 'syncConfig');
13 has TypeName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'typeName', required => 1);
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateResolver');
18 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v1/apis/{apiId}/types/{typeName}/resolvers');
19 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
20 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::AppSync::CreateResolverResponse');
21 1;
22  
23 ### main pod documentation begin ###
24  
25 =head1 NAME
26  
27 Paws::AppSync::CreateResolver - Arguments for method CreateResolver on L<Paws::AppSync>
28  
29 =head1 DESCRIPTION
30  
31 This class represents the parameters used for calling the method CreateResolver on the
32 L<AWS AppSync|Paws::AppSync> service. Use the attributes of this class
33 as arguments to method CreateResolver.
34  
35 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateResolver.
36  
37 =head1 SYNOPSIS
38  
39 my $appsync = Paws->service('AppSync');
40 my $CreateResolverResponse = $appsync->CreateResolver(
41 ApiId => 'MyString',
42 FieldName => 'MyResourceName',
43 TypeName => 'MyResourceName',
44 CachingConfig => {
45 CachingKeys => [ 'MyString', ... ], # OPTIONAL
46 Ttl => 1, # OPTIONAL
47 }, # OPTIONAL
48 DataSourceName => 'MyResourceName', # OPTIONAL
49 Kind => 'UNIT', # OPTIONAL
50 PipelineConfig => {
51 Functions => [ 'MyString', ... ], # OPTIONAL
52 }, # OPTIONAL
53 RequestMappingTemplate => 'MyMappingTemplate', # OPTIONAL
54 ResponseMappingTemplate => 'MyMappingTemplate', # OPTIONAL
55 SyncConfig => {
56 ConflictDetection => 'VERSION', # values: VERSION, NONE; OPTIONAL
57 ConflictHandler => 'OPTIMISTIC_CONCURRENCY'
58 , # values: OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE; OPTIONAL
59 LambdaConflictHandlerConfig =>
60 { LambdaConflictHandlerArn => 'MyString', }, # OPTIONAL
61 }, # OPTIONAL
62 );
63  
64 # Results:
65 my $Resolver = $CreateResolverResponse->Resolver;
66  
67 # Returns a L<Paws::AppSync::CreateResolverResponse> object.
68  
69 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
70 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/appsync/CreateResolver>
71  
72 =head1 ATTRIBUTES
73  
74  
75 =head2 B<REQUIRED> ApiId => Str
76  
77 The ID for the GraphQL API for which the resolver is being created.
78  
79  
80  
81 =head2 CachingConfig => L<Paws::AppSync::CachingConfig>
82  
83 The caching configuration for the resolver.
84  
85  
86  
87 =head2 DataSourceName => Str
88  
89 The name of the data source for which the resolver is being created.
90  
91  
92  
93 =head2 B<REQUIRED> FieldName => Str
94  
95 The name of the field to attach the resolver to.
96  
97  
98  
99 =head2 Kind => Str
100  
101 The resolver type.
102  
103 =over
104  
105 =item *
106  
107 B<UNIT>: A UNIT resolver type. A UNIT resolver is the default resolver
108 type. A UNIT resolver enables you to execute a GraphQL query against a
109 single data source.
110  
111 =item *
112  
113 B<PIPELINE>: A PIPELINE resolver type. A PIPELINE resolver enables you
114 to execute a series of C<Function> in a serial manner. You can use a
115 pipeline resolver to execute a GraphQL query against multiple data
116 sources.
117  
118 =back
119  
120  
121 Valid values are: C<"UNIT">, C<"PIPELINE">
122  
123 =head2 PipelineConfig => L<Paws::AppSync::PipelineConfig>
124  
125 The C<PipelineConfig>.
126  
127  
128  
129 =head2 RequestMappingTemplate => Str
130  
131 The mapping template to be used for requests.
132  
133 A resolver uses a request mapping template to convert a GraphQL
134 expression into a format that a data source can understand. Mapping
135 templates are written in Apache Velocity Template Language (VTL).
136  
137 VTL request mapping templates are optional when using a Lambda data
138 source. For all other data sources, VTL request and response mapping
139 templates are required.
140  
141  
142  
143 =head2 ResponseMappingTemplate => Str
144  
145 The mapping template to be used for responses from the data source.
146  
147  
148  
149 =head2 SyncConfig => L<Paws::AppSync::SyncConfig>
150  
151 The C<SyncConfig> for a resolver attached to a versioned datasource.
152  
153  
154  
155 =head2 B<REQUIRED> TypeName => Str
156  
157 The name of the C<Type>.
158  
159  
160  
161  
162 =head1 SEE ALSO
163  
164 This class forms part of L<Paws>, documenting arguments for method CreateResolver in L<Paws::AppSync>
165  
166 =head1 BUGS and CONTRIBUTIONS
167  
168 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
169  
170 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
171  
172 =cut
173