1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.codegen.poet.transform.protocols;
17 
18 import com.squareup.javapoet.ClassName;
19 import com.squareup.javapoet.CodeBlock;
20 import com.squareup.javapoet.FieldSpec;
21 import com.squareup.javapoet.MethodSpec;
22 import com.squareup.javapoet.ParameterSpec;
23 import java.util.ArrayList;
24 import java.util.List;
25 import java.util.Optional;
26 
27 public interface MarshallerProtocolSpec {
28 
protocolFactoryParameter()29     ParameterSpec protocolFactoryParameter();
30 
marshalCodeBlock(ClassName requestClassName)31     CodeBlock marshalCodeBlock(ClassName requestClassName);
32 
protocolFactory()33     FieldSpec protocolFactory();
34 
memberVariables()35     default List<FieldSpec> memberVariables() {
36         return new ArrayList<>();
37     }
38 
additionalFields()39     default List<FieldSpec> additionalFields() {
40         return new ArrayList<>();
41     }
42 
additionalMethods()43     default List<MethodSpec> additionalMethods() {
44         return new ArrayList<>();
45     }
46 
constructor()47     default Optional<MethodSpec> constructor() {
48         return Optional.empty();
49     }
50 }
51