Skip to content

Commit ef3c6c4

Browse files
committed
AWS AppSync SDK version 2.6.16
1 parent b6821dd commit ef3c6c4

File tree

67 files changed

+3557
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3557
-179
lines changed

aws-android-sdk-appsync-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.amazonaws</groupId>
55
<artifactId>aws-android-sdk-appsync-api</artifactId>
6-
<version>2.6.15</version>
6+
<version>2.6.16</version>
77
<name>AWS AppSync GraphQL API</name>
88
<description>AWS AppSync GraphQL API classes</description>
99
<url>http://aws.amazon.com/sdkforandroid</url>
1010

1111
<parent>
1212
<groupId>com.amazonaws</groupId>
1313
<artifactId>aws-android-sdk-appsync-pom</artifactId>
14-
<version>2.6.15</version>
14+
<version>2.6.16</version>
1515
</parent>
1616

1717
<licenses>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright 2018-2018 Amazon.com,
3+
* Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Licensed under the Amazon Software License (the "License").
6+
* You may not use this file except in compliance with the
7+
* License. A copy of the License is located at
8+
*
9+
* http://aws.amazon.com/asl/
10+
*
11+
* or in the "license" file accompanying this file. This file is
12+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13+
* CONDITIONS OF ANY KIND, express or implied. See the License
14+
* for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package com.apollographql.apollo.api;
19+
20+
/**
21+
* S3InputObjectInterface.
22+
*/
23+
24+
public interface S3InputObjectInterface extends S3ObjectInterface {
25+
public String localUri();
26+
public String mimeType();
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Copyright 2018-2018 Amazon.com,
3+
* Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Licensed under the Amazon Software License (the "License").
6+
* You may not use this file except in compliance with the
7+
* License. A copy of the License is located at
8+
*
9+
* http://aws.amazon.com/asl/
10+
*
11+
* or in the "license" file accompanying this file. This file is
12+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13+
* CONDITIONS OF ANY KIND, express or implied. See the License
14+
* for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package com.apollographql.apollo.api;
19+
20+
/**
21+
* S3ObjectInterface.
22+
*/
23+
24+
public interface S3ObjectInterface {
25+
public String bucket();
26+
public String key();
27+
public String region();
28+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright 2018-2018 Amazon.com,
3+
* Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Licensed under the Amazon Software License (the "License").
6+
* You may not use this file except in compliance with the
7+
* License. A copy of the License is located at
8+
*
9+
* http://aws.amazon.com/asl/
10+
*
11+
* or in the "license" file accompanying this file. This file is
12+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13+
* CONDITIONS OF ANY KIND, express or implied. See the License
14+
* for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package com.apollographql.apollo.api;
19+
20+
/**
21+
* S3ObjectManager.
22+
*/
23+
public interface S3ObjectManager {
24+
void upload(final S3InputObjectInterface s3Object) throws Exception;
25+
void download(final S3ObjectInterface s3Object, final String filePath) throws Exception;
26+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Copyright 2018-2018 Amazon.com,
3+
* Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Licensed under the Amazon Software License (the "License").
6+
* You may not use this file except in compliance with the
7+
* License. A copy of the License is located at
8+
*
9+
* http://aws.amazon.com/asl/
10+
*
11+
* or in the "license" file accompanying this file. This file is
12+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13+
* CONDITIONS OF ANY KIND, express or implied. See the License
14+
* for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package com.apollographql.apollo.api;
19+
20+
/**
21+
* Represents a GraphQL subscription.
22+
*/
23+
public interface Subscription<D extends Operation.Data, T, V extends Operation.Variables> extends Operation<D, T, V> {
24+
}

aws-android-sdk-appsync-api/src/main/java/com/apollographql/apollo/api/internal/UnmodifiableMapBuilder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ public UnmodifiableMapBuilder(int initialCapacity) {
2929
this.map = new HashMap<>(initialCapacity);
3030
}
3131

32-
public UnmodifiableMapBuilder put(K key, V value) {
32+
public UnmodifiableMapBuilder() {
33+
this.map = new HashMap<>();
34+
}
35+
36+
public UnmodifiableMapBuilder<K, V> put(K key, V value) {
3337
map.put(key, value);
3438
return this;
3539
}

aws-android-sdk-appsync-compiler/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.amazonaws</groupId>
55
<artifactId>aws-android-sdk-appsync-compiler</artifactId>
6-
<version>2.6.15</version>
6+
<version>2.6.16</version>
77
<name>AWS AppSync Android Compiler</name>
88
<description>AWS AppSync Implementation for the Gradle plugin</description>
99
<url>http://aws.amazon.com/sdkforandroid</url>
@@ -15,7 +15,7 @@
1515
<parent>
1616
<groupId>com.amazonaws</groupId>
1717
<artifactId>aws-android-sdk-appsync-pom</artifactId>
18-
<version>2.6.15</version>
18+
<version>2.6.16</version>
1919
</parent>
2020

2121
<licenses>
@@ -64,7 +64,7 @@
6464
<dependency>
6565
<groupId>com.amazonaws</groupId>
6666
<artifactId>aws-android-sdk-appsync-api</artifactId>
67-
<version>2.6.15</version>
67+
<version>2.6.16</version>
6868
<scope>compile</scope>
6969
</dependency>
7070
<dependency>

aws-android-sdk-appsync-compiler/src/main/kotlin/com/apollographql/android/Version.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
// Generated file. Do not edit!
1919
package com.apollographql.android
20-
val VERSION = "2.6.15"
20+
val VERSION = "2.6.16"

aws-android-sdk-appsync-compiler/src/main/kotlin/com/apollographql/apollo/compiler/ClassNames.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ object ClassNames {
3535
val GRAPHQL_OPERATION: ClassName = ClassName.get(Operation::class.java)
3636
val GRAPHQL_QUERY: ClassName = ClassName.get(Query::class.java)
3737
val GRAPHQL_MUTATION: ClassName = ClassName.get(Mutation::class.java)
38+
val GRAPHQL_SUBSCRIPTION: ClassName = ClassName.get(Subscription::class.java)
3839
val GRAPHQL_OPERATION_VARIABLES: ClassName = ClassName.get("", "${GRAPHQL_OPERATION.simpleName()}.Variables")
3940
val ILLEGAL_STATE_EXCEPTION: TypeName = ClassName.get(IllegalStateException::class.java)
4041
val MAP: ClassName = ClassName.get(Map::class.java)
@@ -48,6 +49,8 @@ object ClassNames {
4849
val INPUT_TYPE: ClassName = ClassName.get(Input::class.java)
4950
val BUILDER: ClassName = ClassName.get("", "Builder")
5051
val MUTATOR: ClassName = ClassName.get(Mutator::class.java)
52+
var S3ObjectInput: ClassName = ClassName.get(S3InputObjectInterface::class.java)
53+
var S3Object: ClassName = ClassName.get(S3ObjectInterface::class.java)
5154

5255
fun <K : Any> parameterizedListOf(type: Class<K>): TypeName =
5356
ParameterizedTypeName.get(LIST, ClassName.get(type))

aws-android-sdk-appsync-compiler/src/main/kotlin/com/apollographql/apollo/compiler/InputTypeSpecBuilder.kt

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import com.apollographql.apollo.compiler.ir.TypeDeclarationField
2424
import com.squareup.javapoet.*
2525
import java.io.IOException
2626
import javax.lang.model.element.Modifier
27+
import com.apollographql.apollo.compiler.ClassNames.S3ObjectInput
2728

2829
class InputTypeSpecBuilder(
2930
val name: String,
@@ -33,14 +34,27 @@ class InputTypeSpecBuilder(
3334
private val objectClassName = ClassName.get("", name.capitalize())
3435

3536
fun build(): TypeSpec =
36-
TypeSpec.classBuilder(objectClassName)
37-
.addAnnotation(Annotations.GENERATED_BY_APOLLO)
38-
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
39-
.addConstructor()
40-
.addFields()
41-
.addBuilder()
42-
.addMethod(marshallerMethodSpec())
43-
.build()
37+
if (objectClassName.toString().equals("S3ObjectInput")) {
38+
TypeSpec.classBuilder(objectClassName)
39+
.addAnnotation(Annotations.GENERATED_BY_APOLLO)
40+
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
41+
.addSuperinterface(S3ObjectInput)
42+
.addConstructor()
43+
.addFields()
44+
.addBuilder()
45+
.addMethod(marshallerMethodSpec())
46+
.build()
47+
48+
} else {
49+
TypeSpec.classBuilder(objectClassName)
50+
.addAnnotation(Annotations.GENERATED_BY_APOLLO)
51+
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
52+
.addConstructor()
53+
.addFields()
54+
.addBuilder()
55+
.addMethod(marshallerMethodSpec())
56+
.build()
57+
}
4458

4559
private fun TypeSpec.Builder.addConstructor(): TypeSpec.Builder {
4660
val fieldInitializeCodeBuilder = fields.map {

0 commit comments

Comments
 (0)