Skip to content

Commit 3737e3e

Browse files
authored
feat(aws-android-sdk-comprehend): update models to latest (#2633)
1 parent b3b60ac commit 3737e3e

File tree

40 files changed

+1936
-59
lines changed

40 files changed

+1936
-59
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright 2010-2021 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 com.amazonaws.services.comprehend.model;
17+
18+
import java.util.HashMap;
19+
import java.util.Map;
20+
21+
/**
22+
* Augmented Manifests Document Type Format
23+
*/
24+
public enum AugmentedManifestsDocumentTypeFormat {
25+
26+
PLAIN_TEXT_DOCUMENT("PLAIN_TEXT_DOCUMENT"),
27+
SEMI_STRUCTURED_DOCUMENT("SEMI_STRUCTURED_DOCUMENT");
28+
29+
private String value;
30+
31+
private AugmentedManifestsDocumentTypeFormat(String value) {
32+
this.value = value;
33+
}
34+
35+
@Override
36+
public String toString() {
37+
return value;
38+
}
39+
40+
private static final Map<String, AugmentedManifestsDocumentTypeFormat> enumMap;
41+
static {
42+
enumMap = new HashMap<String, AugmentedManifestsDocumentTypeFormat>();
43+
enumMap.put("PLAIN_TEXT_DOCUMENT", PLAIN_TEXT_DOCUMENT);
44+
enumMap.put("SEMI_STRUCTURED_DOCUMENT", SEMI_STRUCTURED_DOCUMENT);
45+
}
46+
47+
/**
48+
* Use this in place of valueOf.
49+
*
50+
* @param value real value
51+
* @return AugmentedManifestsDocumentTypeFormat corresponding to the value
52+
*/
53+
public static AugmentedManifestsDocumentTypeFormat fromValue(String value) {
54+
if (value == null || value.isEmpty()) {
55+
throw new IllegalArgumentException("Value cannot be null or empty!");
56+
} else if (enumMap.containsKey(value)) {
57+
return enumMap.get(value);
58+
} else {
59+
throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)