id
int32 0
165k
| repo
stringlengths 7
58
| path
stringlengths 12
218
| func_name
stringlengths 3
140
| original_string
stringlengths 73
34.1k
| language
stringclasses 1
value | code
stringlengths 73
34.1k
| code_tokens
list | docstring
stringlengths 3
16k
| docstring_tokens
list | sha
stringlengths 40
40
| url
stringlengths 105
339
|
|---|---|---|---|---|---|---|---|---|---|---|---|
20,100
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
|
AmazonS3URI.preprocessUrlStr
|
private static String preprocessUrlStr(final String str, final boolean encode) {
if (encode) {
try {
return (URLEncoder.encode(str, "UTF-8")
.replace("%3A", ":")
.replace("%2F", "/")
.replace("+", "%20"));
} catch (UnsupportedEncodingException e) {
// This should never happen unless there is something
// fundamentally broken with the running JVM.
throw new RuntimeException(e);
}
}
return str;
}
|
java
|
private static String preprocessUrlStr(final String str, final boolean encode) {
if (encode) {
try {
return (URLEncoder.encode(str, "UTF-8")
.replace("%3A", ":")
.replace("%2F", "/")
.replace("+", "%20"));
} catch (UnsupportedEncodingException e) {
// This should never happen unless there is something
// fundamentally broken with the running JVM.
throw new RuntimeException(e);
}
}
return str;
}
|
[
"private",
"static",
"String",
"preprocessUrlStr",
"(",
"final",
"String",
"str",
",",
"final",
"boolean",
"encode",
")",
"{",
"if",
"(",
"encode",
")",
"{",
"try",
"{",
"return",
"(",
"URLEncoder",
".",
"encode",
"(",
"str",
",",
"\"UTF-8\"",
")",
".",
"replace",
"(",
"\"%3A\"",
",",
"\":\"",
")",
".",
"replace",
"(",
"\"%2F\"",
",",
"\"/\"",
")",
".",
"replace",
"(",
"\"+\"",
",",
"\"%20\"",
")",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"e",
")",
"{",
"// This should never happen unless there is something",
"// fundamentally broken with the running JVM.",
"throw",
"new",
"RuntimeException",
"(",
"e",
")",
";",
"}",
"}",
"return",
"str",
";",
"}"
] |
URL encodes the given string. This allows us to pass special characters
that would otherwise be rejected when building a URI instance. Because we
need to retain the URI's path structure we subsequently need to replace
percent encoded path delimiters back to their decoded counterparts.
@param str the string to encode
@return the encoded string
|
[
"URL",
"encodes",
"the",
"given",
"string",
".",
"This",
"allows",
"us",
"to",
"pass",
"special",
"characters",
"that",
"would",
"otherwise",
"be",
"rejected",
"when",
"building",
"a",
"URI",
"instance",
".",
"Because",
"we",
"need",
"to",
"retain",
"the",
"URI",
"s",
"path",
"structure",
"we",
"subsequently",
"need",
"to",
"replace",
"percent",
"encoded",
"path",
"delimiters",
"back",
"to",
"their",
"decoded",
"counterparts",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L258-L272
|
20,101
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
|
AmazonS3URI.decode
|
private static String decode(final String str) {
if (str == null) {
return null;
}
for (int i = 0; i < str.length(); ++i) {
if (str.charAt(i) == '%') {
return decode(str, i);
}
}
return str;
}
|
java
|
private static String decode(final String str) {
if (str == null) {
return null;
}
for (int i = 0; i < str.length(); ++i) {
if (str.charAt(i) == '%') {
return decode(str, i);
}
}
return str;
}
|
[
"private",
"static",
"String",
"decode",
"(",
"final",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"str",
".",
"length",
"(",
")",
";",
"++",
"i",
")",
"{",
"if",
"(",
"str",
".",
"charAt",
"(",
"i",
")",
"==",
"'",
"'",
")",
"{",
"return",
"decode",
"(",
"str",
",",
"i",
")",
";",
"}",
"}",
"return",
"str",
";",
"}"
] |
Percent-decodes the given string, with a fast path for strings that
are not percent-encoded.
@param str the string to decode
@return the decoded string
|
[
"Percent",
"-",
"decodes",
"the",
"given",
"string",
"with",
"a",
"fast",
"path",
"for",
"strings",
"that",
"are",
"not",
"percent",
"-",
"encoded",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L281-L293
|
20,102
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
|
AmazonS3URI.decode
|
private static String decode(final String str, final int firstPercent) {
StringBuilder builder = new StringBuilder();
builder.append(str.substring(0, firstPercent));
appendDecoded(builder, str, firstPercent);
for (int i = firstPercent + 3; i < str.length(); ++i) {
if (str.charAt(i) == '%') {
appendDecoded(builder, str, i);
i += 2;
} else {
builder.append(str.charAt(i));
}
}
return builder.toString();
}
|
java
|
private static String decode(final String str, final int firstPercent) {
StringBuilder builder = new StringBuilder();
builder.append(str.substring(0, firstPercent));
appendDecoded(builder, str, firstPercent);
for (int i = firstPercent + 3; i < str.length(); ++i) {
if (str.charAt(i) == '%') {
appendDecoded(builder, str, i);
i += 2;
} else {
builder.append(str.charAt(i));
}
}
return builder.toString();
}
|
[
"private",
"static",
"String",
"decode",
"(",
"final",
"String",
"str",
",",
"final",
"int",
"firstPercent",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"str",
".",
"substring",
"(",
"0",
",",
"firstPercent",
")",
")",
";",
"appendDecoded",
"(",
"builder",
",",
"str",
",",
"firstPercent",
")",
";",
"for",
"(",
"int",
"i",
"=",
"firstPercent",
"+",
"3",
";",
"i",
"<",
"str",
".",
"length",
"(",
")",
";",
"++",
"i",
")",
"{",
"if",
"(",
"str",
".",
"charAt",
"(",
"i",
")",
"==",
"'",
"'",
")",
"{",
"appendDecoded",
"(",
"builder",
",",
"str",
",",
"i",
")",
";",
"i",
"+=",
"2",
";",
"}",
"else",
"{",
"builder",
".",
"append",
"(",
"str",
".",
"charAt",
"(",
"i",
")",
")",
";",
"}",
"}",
"return",
"builder",
".",
"toString",
"(",
")",
";",
"}"
] |
Percent-decodes the given string.
@param str the string to decode
@param firstPercent the index of the first '%' character in the string
@return the decoded string
|
[
"Percent",
"-",
"decodes",
"the",
"given",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L302-L318
|
20,103
|
aws/aws-sdk-java
|
src/samples/AmazonS3/S3Sample.java
|
S3Sample.createSampleFile
|
private static File createSampleFile() throws IOException {
File file = File.createTempFile("aws-java-sdk-", ".txt");
file.deleteOnExit();
Writer writer = new OutputStreamWriter(new FileOutputStream(file));
writer.write("abcdefghijklmnopqrstuvwxyz\n");
writer.write("01234567890112345678901234\n");
writer.write("!@#$%^&*()-=[]{};':',.<>/?\n");
writer.write("01234567890112345678901234\n");
writer.write("abcdefghijklmnopqrstuvwxyz\n");
writer.close();
return file;
}
|
java
|
private static File createSampleFile() throws IOException {
File file = File.createTempFile("aws-java-sdk-", ".txt");
file.deleteOnExit();
Writer writer = new OutputStreamWriter(new FileOutputStream(file));
writer.write("abcdefghijklmnopqrstuvwxyz\n");
writer.write("01234567890112345678901234\n");
writer.write("!@#$%^&*()-=[]{};':',.<>/?\n");
writer.write("01234567890112345678901234\n");
writer.write("abcdefghijklmnopqrstuvwxyz\n");
writer.close();
return file;
}
|
[
"private",
"static",
"File",
"createSampleFile",
"(",
")",
"throws",
"IOException",
"{",
"File",
"file",
"=",
"File",
".",
"createTempFile",
"(",
"\"aws-java-sdk-\"",
",",
"\".txt\"",
")",
";",
"file",
".",
"deleteOnExit",
"(",
")",
";",
"Writer",
"writer",
"=",
"new",
"OutputStreamWriter",
"(",
"new",
"FileOutputStream",
"(",
"file",
")",
")",
";",
"writer",
".",
"write",
"(",
"\"abcdefghijklmnopqrstuvwxyz\\n\"",
")",
";",
"writer",
".",
"write",
"(",
"\"01234567890112345678901234\\n\"",
")",
";",
"writer",
".",
"write",
"(",
"\"!@#$%^&*()-=[]{};':',.<>/?\\n\"",
")",
";",
"writer",
".",
"write",
"(",
"\"01234567890112345678901234\\n\"",
")",
";",
"writer",
".",
"write",
"(",
"\"abcdefghijklmnopqrstuvwxyz\\n\"",
")",
";",
"writer",
".",
"close",
"(",
")",
";",
"return",
"file",
";",
"}"
] |
Creates a temporary file with text data to demonstrate uploading a file
to Amazon S3
@return A newly created temporary file with text data.
@throws IOException
|
[
"Creates",
"a",
"temporary",
"file",
"with",
"text",
"data",
"to",
"demonstrate",
"uploading",
"a",
"file",
"to",
"Amazon",
"S3"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonS3/S3Sample.java#L197-L210
|
20,104
|
aws/aws-sdk-java
|
src/samples/AmazonS3/S3Sample.java
|
S3Sample.displayTextInputStream
|
private static void displayTextInputStream(InputStream input) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(input));
while (true) {
String line = reader.readLine();
if (line == null) break;
System.out.println(" " + line);
}
System.out.println();
}
|
java
|
private static void displayTextInputStream(InputStream input) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(input));
while (true) {
String line = reader.readLine();
if (line == null) break;
System.out.println(" " + line);
}
System.out.println();
}
|
[
"private",
"static",
"void",
"displayTextInputStream",
"(",
"InputStream",
"input",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"input",
")",
")",
";",
"while",
"(",
"true",
")",
"{",
"String",
"line",
"=",
"reader",
".",
"readLine",
"(",
")",
";",
"if",
"(",
"line",
"==",
"null",
")",
"break",
";",
"System",
".",
"out",
".",
"println",
"(",
"\" \"",
"+",
"line",
")",
";",
"}",
"System",
".",
"out",
".",
"println",
"(",
")",
";",
"}"
] |
Displays the contents of the specified input stream as text.
@param input
The input stream to display as text.
@throws IOException
|
[
"Displays",
"the",
"contents",
"of",
"the",
"specified",
"input",
"stream",
"as",
"text",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonS3/S3Sample.java#L220-L229
|
20,105
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.hashKey
|
@SuppressWarnings("unchecked")
public <H> DynamoDBMapperFieldModel<T,H> hashKey() {
final DynamoDBMapperFieldModel<T,H> field = (DynamoDBMapperFieldModel<T,H>)keys.get(HASH);
if (field == null) {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "; no mapping for HASH key"
);
}
return field;
}
|
java
|
@SuppressWarnings("unchecked")
public <H> DynamoDBMapperFieldModel<T,H> hashKey() {
final DynamoDBMapperFieldModel<T,H> field = (DynamoDBMapperFieldModel<T,H>)keys.get(HASH);
if (field == null) {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "; no mapping for HASH key"
);
}
return field;
}
|
[
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"H",
">",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
"hashKey",
"(",
")",
"{",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
"field",
"=",
"(",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
")",
"keys",
".",
"get",
"(",
"HASH",
")",
";",
"if",
"(",
"field",
"==",
"null",
")",
"{",
"throw",
"new",
"DynamoDBMappingException",
"(",
"targetType",
".",
"getSimpleName",
"(",
")",
"+",
"\"; no mapping for HASH key\"",
")",
";",
"}",
"return",
"field",
";",
"}"
] |
Gets the hash key field model for the specified type.
@param <H> The hash key type.
@return The hash key field model.
@throws DynamoDBMappingException If the hash key is not present.
|
[
"Gets",
"the",
"hash",
"key",
"field",
"model",
"for",
"the",
"specified",
"type",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L114-L123
|
20,106
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.globalSecondaryIndexes
|
public Collection<GlobalSecondaryIndex> globalSecondaryIndexes() {
if (globalSecondaryIndexes.isEmpty()) {
return null;
}
final Collection<GlobalSecondaryIndex> copies = new ArrayList<GlobalSecondaryIndex>(globalSecondaryIndexes.size());
for (final String indexName : globalSecondaryIndexes.keySet()) {
copies.add(globalSecondaryIndex(indexName));
}
return copies;
}
|
java
|
public Collection<GlobalSecondaryIndex> globalSecondaryIndexes() {
if (globalSecondaryIndexes.isEmpty()) {
return null;
}
final Collection<GlobalSecondaryIndex> copies = new ArrayList<GlobalSecondaryIndex>(globalSecondaryIndexes.size());
for (final String indexName : globalSecondaryIndexes.keySet()) {
copies.add(globalSecondaryIndex(indexName));
}
return copies;
}
|
[
"public",
"Collection",
"<",
"GlobalSecondaryIndex",
">",
"globalSecondaryIndexes",
"(",
")",
"{",
"if",
"(",
"globalSecondaryIndexes",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Collection",
"<",
"GlobalSecondaryIndex",
">",
"copies",
"=",
"new",
"ArrayList",
"<",
"GlobalSecondaryIndex",
">",
"(",
"globalSecondaryIndexes",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"final",
"String",
"indexName",
":",
"globalSecondaryIndexes",
".",
"keySet",
"(",
")",
")",
"{",
"copies",
".",
"add",
"(",
"globalSecondaryIndex",
"(",
"indexName",
")",
")",
";",
"}",
"return",
"copies",
";",
"}"
] |
Gets the global secondary indexes for the given class.
@return The map of index name to GlobalSecondaryIndexes.
|
[
"Gets",
"the",
"global",
"secondary",
"indexes",
"for",
"the",
"given",
"class",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L172-L181
|
20,107
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.globalSecondaryIndex
|
public GlobalSecondaryIndex globalSecondaryIndex(final String indexName) {
if (!globalSecondaryIndexes.containsKey(indexName)) {
return null;
}
final GlobalSecondaryIndex gsi = globalSecondaryIndexes.get(indexName);
final GlobalSecondaryIndex copy = new GlobalSecondaryIndex().withIndexName(gsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(gsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : gsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}
|
java
|
public GlobalSecondaryIndex globalSecondaryIndex(final String indexName) {
if (!globalSecondaryIndexes.containsKey(indexName)) {
return null;
}
final GlobalSecondaryIndex gsi = globalSecondaryIndexes.get(indexName);
final GlobalSecondaryIndex copy = new GlobalSecondaryIndex().withIndexName(gsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(gsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : gsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}
|
[
"public",
"GlobalSecondaryIndex",
"globalSecondaryIndex",
"(",
"final",
"String",
"indexName",
")",
"{",
"if",
"(",
"!",
"globalSecondaryIndexes",
".",
"containsKey",
"(",
"indexName",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"GlobalSecondaryIndex",
"gsi",
"=",
"globalSecondaryIndexes",
".",
"get",
"(",
"indexName",
")",
";",
"final",
"GlobalSecondaryIndex",
"copy",
"=",
"new",
"GlobalSecondaryIndex",
"(",
")",
".",
"withIndexName",
"(",
"gsi",
".",
"getIndexName",
"(",
")",
")",
";",
"copy",
".",
"withProjection",
"(",
"new",
"Projection",
"(",
")",
".",
"withProjectionType",
"(",
"gsi",
".",
"getProjection",
"(",
")",
".",
"getProjectionType",
"(",
")",
")",
")",
";",
"for",
"(",
"final",
"KeySchemaElement",
"key",
":",
"gsi",
".",
"getKeySchema",
"(",
")",
")",
"{",
"copy",
".",
"withKeySchema",
"(",
"new",
"KeySchemaElement",
"(",
"key",
".",
"getAttributeName",
"(",
")",
",",
"key",
".",
"getKeyType",
"(",
")",
")",
")",
";",
"}",
"return",
"copy",
";",
"}"
] |
Gets the global secondary index.
@param indexName The index name.
@return The global secondary index or null.
|
[
"Gets",
"the",
"global",
"secondary",
"index",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L188-L199
|
20,108
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.localSecondaryIndexes
|
public Collection<LocalSecondaryIndex> localSecondaryIndexes() {
if (localSecondaryIndexes.isEmpty()) {
return null;
}
final Collection<LocalSecondaryIndex> copies = new ArrayList<LocalSecondaryIndex>(localSecondaryIndexes.size());
for (final String indexName : localSecondaryIndexes.keySet()) {
copies.add(localSecondaryIndex(indexName));
}
return copies;
}
|
java
|
public Collection<LocalSecondaryIndex> localSecondaryIndexes() {
if (localSecondaryIndexes.isEmpty()) {
return null;
}
final Collection<LocalSecondaryIndex> copies = new ArrayList<LocalSecondaryIndex>(localSecondaryIndexes.size());
for (final String indexName : localSecondaryIndexes.keySet()) {
copies.add(localSecondaryIndex(indexName));
}
return copies;
}
|
[
"public",
"Collection",
"<",
"LocalSecondaryIndex",
">",
"localSecondaryIndexes",
"(",
")",
"{",
"if",
"(",
"localSecondaryIndexes",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Collection",
"<",
"LocalSecondaryIndex",
">",
"copies",
"=",
"new",
"ArrayList",
"<",
"LocalSecondaryIndex",
">",
"(",
"localSecondaryIndexes",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"final",
"String",
"indexName",
":",
"localSecondaryIndexes",
".",
"keySet",
"(",
")",
")",
"{",
"copies",
".",
"add",
"(",
"localSecondaryIndex",
"(",
"indexName",
")",
")",
";",
"}",
"return",
"copies",
";",
"}"
] |
Gets the local secondary indexes for the given class.
@param indexNames The index names.
@return The map of index name to LocalSecondaryIndexes.
|
[
"Gets",
"the",
"local",
"secondary",
"indexes",
"for",
"the",
"given",
"class",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L206-L215
|
20,109
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.localSecondaryIndex
|
public LocalSecondaryIndex localSecondaryIndex(final String indexName) {
if (!localSecondaryIndexes.containsKey(indexName)) {
return null;
}
final LocalSecondaryIndex lsi = localSecondaryIndexes.get(indexName);
final LocalSecondaryIndex copy = new LocalSecondaryIndex().withIndexName(lsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(lsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : lsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}
|
java
|
public LocalSecondaryIndex localSecondaryIndex(final String indexName) {
if (!localSecondaryIndexes.containsKey(indexName)) {
return null;
}
final LocalSecondaryIndex lsi = localSecondaryIndexes.get(indexName);
final LocalSecondaryIndex copy = new LocalSecondaryIndex().withIndexName(lsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(lsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : lsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}
|
[
"public",
"LocalSecondaryIndex",
"localSecondaryIndex",
"(",
"final",
"String",
"indexName",
")",
"{",
"if",
"(",
"!",
"localSecondaryIndexes",
".",
"containsKey",
"(",
"indexName",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"LocalSecondaryIndex",
"lsi",
"=",
"localSecondaryIndexes",
".",
"get",
"(",
"indexName",
")",
";",
"final",
"LocalSecondaryIndex",
"copy",
"=",
"new",
"LocalSecondaryIndex",
"(",
")",
".",
"withIndexName",
"(",
"lsi",
".",
"getIndexName",
"(",
")",
")",
";",
"copy",
".",
"withProjection",
"(",
"new",
"Projection",
"(",
")",
".",
"withProjectionType",
"(",
"lsi",
".",
"getProjection",
"(",
")",
".",
"getProjectionType",
"(",
")",
")",
")",
";",
"for",
"(",
"final",
"KeySchemaElement",
"key",
":",
"lsi",
".",
"getKeySchema",
"(",
")",
")",
"{",
"copy",
".",
"withKeySchema",
"(",
"new",
"KeySchemaElement",
"(",
"key",
".",
"getAttributeName",
"(",
")",
",",
"key",
".",
"getKeyType",
"(",
")",
")",
")",
";",
"}",
"return",
"copy",
";",
"}"
] |
Gets the local secondary index by name.
@param indexNames The index name.
@return The local secondary index, or null.
|
[
"Gets",
"the",
"local",
"secondary",
"index",
"by",
"name",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L222-L233
|
20,110
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.createKey
|
public <H,R> T createKey(final H hashKey, final R rangeKey) {
final T key = StandardBeanProperties.DeclaringReflect.<T>newInstance(targetType);
if (hashKey != null) {
final DynamoDBMapperFieldModel<T,H> hk = hashKey();
hk.set(key, hashKey);
}
if (rangeKey != null) {
final DynamoDBMapperFieldModel<T,R> rk = rangeKey();
rk.set(key, rangeKey);
}
return key;
}
|
java
|
public <H,R> T createKey(final H hashKey, final R rangeKey) {
final T key = StandardBeanProperties.DeclaringReflect.<T>newInstance(targetType);
if (hashKey != null) {
final DynamoDBMapperFieldModel<T,H> hk = hashKey();
hk.set(key, hashKey);
}
if (rangeKey != null) {
final DynamoDBMapperFieldModel<T,R> rk = rangeKey();
rk.set(key, rangeKey);
}
return key;
}
|
[
"public",
"<",
"H",
",",
"R",
">",
"T",
"createKey",
"(",
"final",
"H",
"hashKey",
",",
"final",
"R",
"rangeKey",
")",
"{",
"final",
"T",
"key",
"=",
"StandardBeanProperties",
".",
"DeclaringReflect",
".",
"<",
"T",
">",
"newInstance",
"(",
"targetType",
")",
";",
"if",
"(",
"hashKey",
"!=",
"null",
")",
"{",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
"hk",
"=",
"hashKey",
"(",
")",
";",
"hk",
".",
"set",
"(",
"key",
",",
"hashKey",
")",
";",
"}",
"if",
"(",
"rangeKey",
"!=",
"null",
")",
"{",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"R",
">",
"rk",
"=",
"rangeKey",
"(",
")",
";",
"rk",
".",
"set",
"(",
"key",
",",
"rangeKey",
")",
";",
"}",
"return",
"key",
";",
"}"
] |
Creates a new object instance with the keys populated.
@param <H> The hash key type.
@param <R> The range key type.
@param hashKey The hash key.
@param rangeKey The range key (optional if not present on table).
@return The new instance.
|
[
"Creates",
"a",
"new",
"object",
"instance",
"with",
"the",
"keys",
"populated",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L287-L298
|
20,111
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.convertKey
|
public <H,R> Map<String,AttributeValue> convertKey(final T key) {
final DynamoDBMapperFieldModel<T,H> hk = this.<H>hashKey();
final DynamoDBMapperFieldModel<T,R> rk = this.<R>rangeKeyIfExists();
return this.<H,R>convertKey(hk.get(key), (rk == null ? (R)null : rk.get(key)));
}
|
java
|
public <H,R> Map<String,AttributeValue> convertKey(final T key) {
final DynamoDBMapperFieldModel<T,H> hk = this.<H>hashKey();
final DynamoDBMapperFieldModel<T,R> rk = this.<R>rangeKeyIfExists();
return this.<H,R>convertKey(hk.get(key), (rk == null ? (R)null : rk.get(key)));
}
|
[
"public",
"<",
"H",
",",
"R",
">",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"convertKey",
"(",
"final",
"T",
"key",
")",
"{",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
"hk",
"=",
"this",
".",
"<",
"H",
">",
"hashKey",
"(",
")",
";",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"R",
">",
"rk",
"=",
"this",
".",
"<",
"R",
">",
"rangeKeyIfExists",
"(",
")",
";",
"return",
"this",
".",
"<",
"H",
",",
"R",
">",
"convertKey",
"(",
"hk",
".",
"get",
"(",
"key",
")",
",",
"(",
"rk",
"==",
"null",
"?",
"(",
"R",
")",
"null",
":",
"rk",
".",
"get",
"(",
"key",
")",
")",
")",
";",
"}"
] |
Creates a new key map from the specified object.
@param <H> The hash key type.
@param <R> The range key type.
@param object The object instance.
@return The key map.
|
[
"Creates",
"a",
"new",
"key",
"map",
"from",
"the",
"specified",
"object",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L307-L311
|
20,112
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java
|
DynamoDBMapperTableModel.convertKey
|
public <H,R> Map<String,AttributeValue> convertKey(final H hashKey, final R rangeKey) {
final Map<String,AttributeValue> key = new LinkedHashMap<String,AttributeValue>(4);
final DynamoDBMapperFieldModel<T,H> hk = this.<H>hashKey();
final AttributeValue hkValue = hashKey == null ? null : hk.convert(hashKey);
if (hkValue != null) {
key.put(hk.name(), hkValue);
} else {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "[" + hk.name() + "]; no HASH key value present"
);
}
final DynamoDBMapperFieldModel<T,R> rk = this.<R>rangeKeyIfExists();
final AttributeValue rkValue = rangeKey == null ? null : rk.convert(rangeKey);
if (rkValue != null) {
key.put(rk.name(), rkValue);
} else if (rk != null) {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "[" + rk.name() + "]; no RANGE key value present"
);
}
return key;
}
|
java
|
public <H,R> Map<String,AttributeValue> convertKey(final H hashKey, final R rangeKey) {
final Map<String,AttributeValue> key = new LinkedHashMap<String,AttributeValue>(4);
final DynamoDBMapperFieldModel<T,H> hk = this.<H>hashKey();
final AttributeValue hkValue = hashKey == null ? null : hk.convert(hashKey);
if (hkValue != null) {
key.put(hk.name(), hkValue);
} else {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "[" + hk.name() + "]; no HASH key value present"
);
}
final DynamoDBMapperFieldModel<T,R> rk = this.<R>rangeKeyIfExists();
final AttributeValue rkValue = rangeKey == null ? null : rk.convert(rangeKey);
if (rkValue != null) {
key.put(rk.name(), rkValue);
} else if (rk != null) {
throw new DynamoDBMappingException(
targetType.getSimpleName() + "[" + rk.name() + "]; no RANGE key value present"
);
}
return key;
}
|
[
"public",
"<",
"H",
",",
"R",
">",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"convertKey",
"(",
"final",
"H",
"hashKey",
",",
"final",
"R",
"rangeKey",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"key",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"AttributeValue",
">",
"(",
"4",
")",
";",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"H",
">",
"hk",
"=",
"this",
".",
"<",
"H",
">",
"hashKey",
"(",
")",
";",
"final",
"AttributeValue",
"hkValue",
"=",
"hashKey",
"==",
"null",
"?",
"null",
":",
"hk",
".",
"convert",
"(",
"hashKey",
")",
";",
"if",
"(",
"hkValue",
"!=",
"null",
")",
"{",
"key",
".",
"put",
"(",
"hk",
".",
"name",
"(",
")",
",",
"hkValue",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"DynamoDBMappingException",
"(",
"targetType",
".",
"getSimpleName",
"(",
")",
"+",
"\"[\"",
"+",
"hk",
".",
"name",
"(",
")",
"+",
"\"]; no HASH key value present\"",
")",
";",
"}",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"R",
">",
"rk",
"=",
"this",
".",
"<",
"R",
">",
"rangeKeyIfExists",
"(",
")",
";",
"final",
"AttributeValue",
"rkValue",
"=",
"rangeKey",
"==",
"null",
"?",
"null",
":",
"rk",
".",
"convert",
"(",
"rangeKey",
")",
";",
"if",
"(",
"rkValue",
"!=",
"null",
")",
"{",
"key",
".",
"put",
"(",
"rk",
".",
"name",
"(",
")",
",",
"rkValue",
")",
";",
"}",
"else",
"if",
"(",
"rk",
"!=",
"null",
")",
"{",
"throw",
"new",
"DynamoDBMappingException",
"(",
"targetType",
".",
"getSimpleName",
"(",
")",
"+",
"\"[\"",
"+",
"rk",
".",
"name",
"(",
")",
"+",
"\"]; no RANGE key value present\"",
")",
";",
"}",
"return",
"key",
";",
"}"
] |
Creates a new key map from the specified hash and range key.
@param <H> The hash key type.
@param <R> The range key type.
@param hashKey The hash key.
@param rangeKey The range key (optional if not present on table).
@return The key map.
|
[
"Creates",
"a",
"new",
"key",
"map",
"from",
"the",
"specified",
"hash",
"and",
"range",
"key",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperTableModel.java#L321-L342
|
20,113
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.putObjectUsingInstructionFile
|
private PutObjectResult putObjectUsingInstructionFile(
PutObjectRequest putObjectRequest) {
final File fileOrig = putObjectRequest.getFile();
final InputStream isOrig = putObjectRequest.getInputStream();
final PutObjectRequest putInstFileRequest = putObjectRequest.clone()
.withFile(null)
.withInputStream(null)
;
putInstFileRequest.setKey(putInstFileRequest.getKey() + DOT
+ DEFAULT_INSTRUCTION_FILE_SUFFIX);
// Create instruction
ContentCryptoMaterial cekMaterial = createContentCryptoMaterial(putObjectRequest);
// Wraps the object data with a cipher input stream; note the metadata
// is mutated as a side effect.
PutObjectRequest req = wrapWithCipher(putObjectRequest, cekMaterial);
// Put the encrypted object into S3
final PutObjectResult result;
try {
result = s3.putObject(req);
} finally {
cleanupDataSource(putObjectRequest, fileOrig, isOrig,
req.getInputStream(), log);
}
// Put the instruction file into S3
s3.putObject(updateInstructionPutRequest(putInstFileRequest,
cekMaterial));
// Return the result of the encrypted object PUT.
return result;
}
|
java
|
private PutObjectResult putObjectUsingInstructionFile(
PutObjectRequest putObjectRequest) {
final File fileOrig = putObjectRequest.getFile();
final InputStream isOrig = putObjectRequest.getInputStream();
final PutObjectRequest putInstFileRequest = putObjectRequest.clone()
.withFile(null)
.withInputStream(null)
;
putInstFileRequest.setKey(putInstFileRequest.getKey() + DOT
+ DEFAULT_INSTRUCTION_FILE_SUFFIX);
// Create instruction
ContentCryptoMaterial cekMaterial = createContentCryptoMaterial(putObjectRequest);
// Wraps the object data with a cipher input stream; note the metadata
// is mutated as a side effect.
PutObjectRequest req = wrapWithCipher(putObjectRequest, cekMaterial);
// Put the encrypted object into S3
final PutObjectResult result;
try {
result = s3.putObject(req);
} finally {
cleanupDataSource(putObjectRequest, fileOrig, isOrig,
req.getInputStream(), log);
}
// Put the instruction file into S3
s3.putObject(updateInstructionPutRequest(putInstFileRequest,
cekMaterial));
// Return the result of the encrypted object PUT.
return result;
}
|
[
"private",
"PutObjectResult",
"putObjectUsingInstructionFile",
"(",
"PutObjectRequest",
"putObjectRequest",
")",
"{",
"final",
"File",
"fileOrig",
"=",
"putObjectRequest",
".",
"getFile",
"(",
")",
";",
"final",
"InputStream",
"isOrig",
"=",
"putObjectRequest",
".",
"getInputStream",
"(",
")",
";",
"final",
"PutObjectRequest",
"putInstFileRequest",
"=",
"putObjectRequest",
".",
"clone",
"(",
")",
".",
"withFile",
"(",
"null",
")",
".",
"withInputStream",
"(",
"null",
")",
";",
"putInstFileRequest",
".",
"setKey",
"(",
"putInstFileRequest",
".",
"getKey",
"(",
")",
"+",
"DOT",
"+",
"DEFAULT_INSTRUCTION_FILE_SUFFIX",
")",
";",
"// Create instruction",
"ContentCryptoMaterial",
"cekMaterial",
"=",
"createContentCryptoMaterial",
"(",
"putObjectRequest",
")",
";",
"// Wraps the object data with a cipher input stream; note the metadata",
"// is mutated as a side effect.",
"PutObjectRequest",
"req",
"=",
"wrapWithCipher",
"(",
"putObjectRequest",
",",
"cekMaterial",
")",
";",
"// Put the encrypted object into S3",
"final",
"PutObjectResult",
"result",
";",
"try",
"{",
"result",
"=",
"s3",
".",
"putObject",
"(",
"req",
")",
";",
"}",
"finally",
"{",
"cleanupDataSource",
"(",
"putObjectRequest",
",",
"fileOrig",
",",
"isOrig",
",",
"req",
".",
"getInputStream",
"(",
")",
",",
"log",
")",
";",
"}",
"// Put the instruction file into S3",
"s3",
".",
"putObject",
"(",
"updateInstructionPutRequest",
"(",
"putInstFileRequest",
",",
"cekMaterial",
")",
")",
";",
"// Return the result of the encrypted object PUT.",
"return",
"result",
";",
"}"
] |
Puts an encrypted object into S3, and puts an instruction file into S3.
Encryption info is stored in the instruction file.
@param putObjectRequest
The request object containing all the parameters to upload a
new object to Amazon S3.
@return A {@link PutObjectResult} object containing the information
returned by Amazon S3 for the new, created object.
|
[
"Puts",
"an",
"encrypted",
"object",
"into",
"S3",
"and",
"puts",
"an",
"instruction",
"file",
"into",
"S3",
".",
"Encryption",
"info",
"is",
"stored",
"in",
"the",
"instruction",
"file",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L191-L219
|
20,114
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.createContentCryptoMaterial
|
protected final ContentCryptoMaterial createContentCryptoMaterial(
AmazonWebServiceRequest req) {
if (req instanceof EncryptionMaterialsFactory) {
// per request level encryption materials
EncryptionMaterialsFactory f = (EncryptionMaterialsFactory)req;
final EncryptionMaterials materials = f.getEncryptionMaterials();
if (materials != null) {
return buildContentCryptoMaterial(materials, req);
}
}
if (req instanceof MaterialsDescriptionProvider) {
// per request level material description
MaterialsDescriptionProvider mdp = (MaterialsDescriptionProvider) req;
Map<String,String> matdesc_req = mdp.getMaterialsDescription();
ContentCryptoMaterial ccm = newContentCryptoMaterial(
kekMaterialsProvider,
matdesc_req,
cryptoConfig.getCryptoProvider(), req);
if (ccm != null)
return ccm;
if (matdesc_req != null) {
// check to see if KMS is in use and if so we should fall thru
// to the s3 client level encryption material
EncryptionMaterials material =
kekMaterialsProvider.getEncryptionMaterials();
if (!material.isKMSEnabled()) {
throw new SdkClientException(
"No material available from the encryption material provider for description "
+ matdesc_req);
}
}
// if there is no material description, fall thru to use
// the per s3 client level encryption materials
}
// per s3 client level encryption materials
return newContentCryptoMaterial(this.kekMaterialsProvider,
cryptoConfig.getCryptoProvider(), req);
}
|
java
|
protected final ContentCryptoMaterial createContentCryptoMaterial(
AmazonWebServiceRequest req) {
if (req instanceof EncryptionMaterialsFactory) {
// per request level encryption materials
EncryptionMaterialsFactory f = (EncryptionMaterialsFactory)req;
final EncryptionMaterials materials = f.getEncryptionMaterials();
if (materials != null) {
return buildContentCryptoMaterial(materials, req);
}
}
if (req instanceof MaterialsDescriptionProvider) {
// per request level material description
MaterialsDescriptionProvider mdp = (MaterialsDescriptionProvider) req;
Map<String,String> matdesc_req = mdp.getMaterialsDescription();
ContentCryptoMaterial ccm = newContentCryptoMaterial(
kekMaterialsProvider,
matdesc_req,
cryptoConfig.getCryptoProvider(), req);
if (ccm != null)
return ccm;
if (matdesc_req != null) {
// check to see if KMS is in use and if so we should fall thru
// to the s3 client level encryption material
EncryptionMaterials material =
kekMaterialsProvider.getEncryptionMaterials();
if (!material.isKMSEnabled()) {
throw new SdkClientException(
"No material available from the encryption material provider for description "
+ matdesc_req);
}
}
// if there is no material description, fall thru to use
// the per s3 client level encryption materials
}
// per s3 client level encryption materials
return newContentCryptoMaterial(this.kekMaterialsProvider,
cryptoConfig.getCryptoProvider(), req);
}
|
[
"protected",
"final",
"ContentCryptoMaterial",
"createContentCryptoMaterial",
"(",
"AmazonWebServiceRequest",
"req",
")",
"{",
"if",
"(",
"req",
"instanceof",
"EncryptionMaterialsFactory",
")",
"{",
"// per request level encryption materials",
"EncryptionMaterialsFactory",
"f",
"=",
"(",
"EncryptionMaterialsFactory",
")",
"req",
";",
"final",
"EncryptionMaterials",
"materials",
"=",
"f",
".",
"getEncryptionMaterials",
"(",
")",
";",
"if",
"(",
"materials",
"!=",
"null",
")",
"{",
"return",
"buildContentCryptoMaterial",
"(",
"materials",
",",
"req",
")",
";",
"}",
"}",
"if",
"(",
"req",
"instanceof",
"MaterialsDescriptionProvider",
")",
"{",
"// per request level material description",
"MaterialsDescriptionProvider",
"mdp",
"=",
"(",
"MaterialsDescriptionProvider",
")",
"req",
";",
"Map",
"<",
"String",
",",
"String",
">",
"matdesc_req",
"=",
"mdp",
".",
"getMaterialsDescription",
"(",
")",
";",
"ContentCryptoMaterial",
"ccm",
"=",
"newContentCryptoMaterial",
"(",
"kekMaterialsProvider",
",",
"matdesc_req",
",",
"cryptoConfig",
".",
"getCryptoProvider",
"(",
")",
",",
"req",
")",
";",
"if",
"(",
"ccm",
"!=",
"null",
")",
"return",
"ccm",
";",
"if",
"(",
"matdesc_req",
"!=",
"null",
")",
"{",
"// check to see if KMS is in use and if so we should fall thru",
"// to the s3 client level encryption material",
"EncryptionMaterials",
"material",
"=",
"kekMaterialsProvider",
".",
"getEncryptionMaterials",
"(",
")",
";",
"if",
"(",
"!",
"material",
".",
"isKMSEnabled",
"(",
")",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"No material available from the encryption material provider for description \"",
"+",
"matdesc_req",
")",
";",
"}",
"}",
"// if there is no material description, fall thru to use",
"// the per s3 client level encryption materials",
"}",
"// per s3 client level encryption materials",
"return",
"newContentCryptoMaterial",
"(",
"this",
".",
"kekMaterialsProvider",
",",
"cryptoConfig",
".",
"getCryptoProvider",
"(",
")",
",",
"req",
")",
";",
"}"
] |
Creates and returns a non-null content crypto material for the given
request.
@throws SdkClientException if no encryption material can be found.
|
[
"Creates",
"and",
"returns",
"a",
"non",
"-",
"null",
"content",
"crypto",
"material",
"for",
"the",
"given",
"request",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L420-L457
|
20,115
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.plaintextLength
|
protected final long plaintextLength(AbstractPutObjectRequest request,
ObjectMetadata metadata) {
if (request.getFile() != null) {
return request.getFile().length();
} else if (request.getInputStream() != null
&& metadata.getRawMetadataValue(Headers.CONTENT_LENGTH) != null) {
return metadata.getContentLength();
}
return -1;
}
|
java
|
protected final long plaintextLength(AbstractPutObjectRequest request,
ObjectMetadata metadata) {
if (request.getFile() != null) {
return request.getFile().length();
} else if (request.getInputStream() != null
&& metadata.getRawMetadataValue(Headers.CONTENT_LENGTH) != null) {
return metadata.getContentLength();
}
return -1;
}
|
[
"protected",
"final",
"long",
"plaintextLength",
"(",
"AbstractPutObjectRequest",
"request",
",",
"ObjectMetadata",
"metadata",
")",
"{",
"if",
"(",
"request",
".",
"getFile",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"request",
".",
"getFile",
"(",
")",
".",
"length",
"(",
")",
";",
"}",
"else",
"if",
"(",
"request",
".",
"getInputStream",
"(",
")",
"!=",
"null",
"&&",
"metadata",
".",
"getRawMetadataValue",
"(",
"Headers",
".",
"CONTENT_LENGTH",
")",
"!=",
"null",
")",
"{",
"return",
"metadata",
".",
"getContentLength",
"(",
")",
";",
"}",
"return",
"-",
"1",
";",
"}"
] |
Returns the plaintext length from the request and metadata; or -1 if
unknown.
|
[
"Returns",
"the",
"plaintext",
"length",
"from",
"the",
"request",
"and",
"metadata",
";",
"or",
"-",
"1",
"if",
"unknown",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L679-L688
|
20,116
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.updateInstructionPutRequest
|
protected final PutObjectRequest updateInstructionPutRequest(
PutObjectRequest req, ContentCryptoMaterial cekMaterial) {
byte[] bytes = cekMaterial.toJsonString(cryptoConfig.getCryptoMode())
.getBytes(UTF8);
ObjectMetadata metadata = req.getMetadata();
if (metadata == null) {
metadata = new ObjectMetadata();
req.setMetadata(metadata);
}
// Set the content-length of the upload
metadata.setContentLength(bytes.length);
// Set the crypto instruction file header
metadata.addUserMetadata(Headers.CRYPTO_INSTRUCTION_FILE, "");
// Update the instruction request
req.setMetadata(metadata);
req.setInputStream(new ByteArrayInputStream(bytes));
// the file attribute in the request is always null before calling this
// routine
return req;
}
|
java
|
protected final PutObjectRequest updateInstructionPutRequest(
PutObjectRequest req, ContentCryptoMaterial cekMaterial) {
byte[] bytes = cekMaterial.toJsonString(cryptoConfig.getCryptoMode())
.getBytes(UTF8);
ObjectMetadata metadata = req.getMetadata();
if (metadata == null) {
metadata = new ObjectMetadata();
req.setMetadata(metadata);
}
// Set the content-length of the upload
metadata.setContentLength(bytes.length);
// Set the crypto instruction file header
metadata.addUserMetadata(Headers.CRYPTO_INSTRUCTION_FILE, "");
// Update the instruction request
req.setMetadata(metadata);
req.setInputStream(new ByteArrayInputStream(bytes));
// the file attribute in the request is always null before calling this
// routine
return req;
}
|
[
"protected",
"final",
"PutObjectRequest",
"updateInstructionPutRequest",
"(",
"PutObjectRequest",
"req",
",",
"ContentCryptoMaterial",
"cekMaterial",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"cekMaterial",
".",
"toJsonString",
"(",
"cryptoConfig",
".",
"getCryptoMode",
"(",
")",
")",
".",
"getBytes",
"(",
"UTF8",
")",
";",
"ObjectMetadata",
"metadata",
"=",
"req",
".",
"getMetadata",
"(",
")",
";",
"if",
"(",
"metadata",
"==",
"null",
")",
"{",
"metadata",
"=",
"new",
"ObjectMetadata",
"(",
")",
";",
"req",
".",
"setMetadata",
"(",
"metadata",
")",
";",
"}",
"// Set the content-length of the upload",
"metadata",
".",
"setContentLength",
"(",
"bytes",
".",
"length",
")",
";",
"// Set the crypto instruction file header",
"metadata",
".",
"addUserMetadata",
"(",
"Headers",
".",
"CRYPTO_INSTRUCTION_FILE",
",",
"\"\"",
")",
";",
"// Update the instruction request",
"req",
".",
"setMetadata",
"(",
"metadata",
")",
";",
"req",
".",
"setInputStream",
"(",
"new",
"ByteArrayInputStream",
"(",
"bytes",
")",
")",
";",
"// the file attribute in the request is always null before calling this",
"// routine",
"return",
"req",
";",
"}"
] |
Updates put request to store the specified instruction object in S3.
@param req
The put-instruction-file request for the instruction file to
be stored in S3.
@param cekMaterial
The instruction object to be stored in S3.
@return A put request to store the specified instruction object in S3.
|
[
"Updates",
"put",
"request",
"to",
"store",
"the",
"specified",
"instruction",
"object",
"in",
"S3",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L704-L723
|
20,117
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.fetchInstructionFile
|
final S3ObjectWrapper fetchInstructionFile(S3ObjectId s3ObjectId,
String instFileSuffix) {
try {
S3Object o = s3.getObject(
createInstructionGetRequest(s3ObjectId, instFileSuffix));
return o == null ? null : new S3ObjectWrapper(o, s3ObjectId);
} catch (AmazonServiceException e) {
// If no instruction file is found, log a debug message, and return
// null.
if (log.isDebugEnabled()) {
log.debug("Unable to retrieve instruction file : "
+ e.getMessage());
}
return null;
}
}
|
java
|
final S3ObjectWrapper fetchInstructionFile(S3ObjectId s3ObjectId,
String instFileSuffix) {
try {
S3Object o = s3.getObject(
createInstructionGetRequest(s3ObjectId, instFileSuffix));
return o == null ? null : new S3ObjectWrapper(o, s3ObjectId);
} catch (AmazonServiceException e) {
// If no instruction file is found, log a debug message, and return
// null.
if (log.isDebugEnabled()) {
log.debug("Unable to retrieve instruction file : "
+ e.getMessage());
}
return null;
}
}
|
[
"final",
"S3ObjectWrapper",
"fetchInstructionFile",
"(",
"S3ObjectId",
"s3ObjectId",
",",
"String",
"instFileSuffix",
")",
"{",
"try",
"{",
"S3Object",
"o",
"=",
"s3",
".",
"getObject",
"(",
"createInstructionGetRequest",
"(",
"s3ObjectId",
",",
"instFileSuffix",
")",
")",
";",
"return",
"o",
"==",
"null",
"?",
"null",
":",
"new",
"S3ObjectWrapper",
"(",
"o",
",",
"s3ObjectId",
")",
";",
"}",
"catch",
"(",
"AmazonServiceException",
"e",
")",
"{",
"// If no instruction file is found, log a debug message, and return",
"// null.",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Unable to retrieve instruction file : \"",
"+",
"e",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"}"
] |
Retrieves an instruction file from S3; or null if no instruction file is
found.
@param s3ObjectId
the S3 object id (not the instruction file id)
@param instFileSuffix
suffix of the instruction file to be retrieved; or null to use
the default suffix.
@return an instruction file, or null if no instruction file is found.
|
[
"Retrieves",
"an",
"instruction",
"file",
"from",
"S3",
";",
"or",
"null",
"if",
"no",
"instruction",
"file",
"is",
"found",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L773-L788
|
20,118
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.contentCryptoMaterialOf
|
private ContentCryptoMaterial contentCryptoMaterialOf(S3ObjectWrapper s3w) {
// Check if encryption info is in object metadata
if (s3w.hasEncryptionInfo()) {
return ContentCryptoMaterial
.fromObjectMetadata(s3w.getObjectMetadata(),
kekMaterialsProvider,
cryptoConfig.getCryptoProvider(),
cryptoConfig.getAlwaysUseCryptoProvider(),
false, // existing CEK not necessarily key-wrapped
kms
);
}
S3ObjectWrapper orig_ifile =
fetchInstructionFile(s3w.getS3ObjectId(), null);
if (orig_ifile == null) {
throw new IllegalArgumentException(
"S3 object is not encrypted: " + s3w);
}
String json = orig_ifile.toJsonString();
return ccmFromJson(json);
}
|
java
|
private ContentCryptoMaterial contentCryptoMaterialOf(S3ObjectWrapper s3w) {
// Check if encryption info is in object metadata
if (s3w.hasEncryptionInfo()) {
return ContentCryptoMaterial
.fromObjectMetadata(s3w.getObjectMetadata(),
kekMaterialsProvider,
cryptoConfig.getCryptoProvider(),
cryptoConfig.getAlwaysUseCryptoProvider(),
false, // existing CEK not necessarily key-wrapped
kms
);
}
S3ObjectWrapper orig_ifile =
fetchInstructionFile(s3w.getS3ObjectId(), null);
if (orig_ifile == null) {
throw new IllegalArgumentException(
"S3 object is not encrypted: " + s3w);
}
String json = orig_ifile.toJsonString();
return ccmFromJson(json);
}
|
[
"private",
"ContentCryptoMaterial",
"contentCryptoMaterialOf",
"(",
"S3ObjectWrapper",
"s3w",
")",
"{",
"// Check if encryption info is in object metadata",
"if",
"(",
"s3w",
".",
"hasEncryptionInfo",
"(",
")",
")",
"{",
"return",
"ContentCryptoMaterial",
".",
"fromObjectMetadata",
"(",
"s3w",
".",
"getObjectMetadata",
"(",
")",
",",
"kekMaterialsProvider",
",",
"cryptoConfig",
".",
"getCryptoProvider",
"(",
")",
",",
"cryptoConfig",
".",
"getAlwaysUseCryptoProvider",
"(",
")",
",",
"false",
",",
"// existing CEK not necessarily key-wrapped",
"kms",
")",
";",
"}",
"S3ObjectWrapper",
"orig_ifile",
"=",
"fetchInstructionFile",
"(",
"s3w",
".",
"getS3ObjectId",
"(",
")",
",",
"null",
")",
";",
"if",
"(",
"orig_ifile",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"S3 object is not encrypted: \"",
"+",
"s3w",
")",
";",
"}",
"String",
"json",
"=",
"orig_ifile",
".",
"toJsonString",
"(",
")",
";",
"return",
"ccmFromJson",
"(",
"json",
")",
";",
"}"
] |
Returns the content crypto material of an existing S3 object.
@param s3w
an existing S3 object (wrapper)
@return a non-null content crypto material.
|
[
"Returns",
"the",
"content",
"crypto",
"material",
"of",
"an",
"existing",
"S3",
"object",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L850-L870
|
20,119
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
|
S3CryptoModuleBase.createInstructionGetRequest
|
final GetObjectRequest createInstructionGetRequest(
S3ObjectId s3objectId, String instFileSuffix) {
return new GetObjectRequest(
s3objectId.instructionFileId(instFileSuffix));
}
|
java
|
final GetObjectRequest createInstructionGetRequest(
S3ObjectId s3objectId, String instFileSuffix) {
return new GetObjectRequest(
s3objectId.instructionFileId(instFileSuffix));
}
|
[
"final",
"GetObjectRequest",
"createInstructionGetRequest",
"(",
"S3ObjectId",
"s3objectId",
",",
"String",
"instFileSuffix",
")",
"{",
"return",
"new",
"GetObjectRequest",
"(",
"s3objectId",
".",
"instructionFileId",
"(",
"instFileSuffix",
")",
")",
";",
"}"
] |
Creates and return a get object request for an instruction file.
@param s3objectId
an S3 object id (not the instruction file id)
@param instFileSuffix
suffix of the specific instruction file to be used, or null if
the default instruction file is to be used.
|
[
"Creates",
"and",
"return",
"a",
"get",
"object",
"request",
"for",
"an",
"instruction",
"file",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L908-L912
|
20,120
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/SigningCertUrlVerifier.java
|
SigningCertUrlVerifier.assertIsFromSns
|
private void assertIsFromSns(URI certUrl) {
if (!endpoint.equals(certUrl.getHost())) {
throw new SdkClientException(
String.format("SigningCertUrl does not match expected endpoint. Expected %s but received endpoint was %s.",
endpoint, certUrl.getHost()));
}
}
|
java
|
private void assertIsFromSns(URI certUrl) {
if (!endpoint.equals(certUrl.getHost())) {
throw new SdkClientException(
String.format("SigningCertUrl does not match expected endpoint. Expected %s but received endpoint was %s.",
endpoint, certUrl.getHost()));
}
}
|
[
"private",
"void",
"assertIsFromSns",
"(",
"URI",
"certUrl",
")",
"{",
"if",
"(",
"!",
"endpoint",
".",
"equals",
"(",
"certUrl",
".",
"getHost",
"(",
")",
")",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"String",
".",
"format",
"(",
"\"SigningCertUrl does not match expected endpoint. Expected %s but received endpoint was %s.\"",
",",
"endpoint",
",",
"certUrl",
".",
"getHost",
"(",
")",
")",
")",
";",
"}",
"}"
] |
If the signing cert URL is not from SNS fail.
|
[
"If",
"the",
"signing",
"cert",
"URL",
"is",
"not",
"from",
"SNS",
"fail",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/SigningCertUrlVerifier.java#L54-L61
|
20,121
|
aws/aws-sdk-java
|
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java
|
AmazonECSWaiters.tasksRunning
|
public Waiter<DescribeTasksRequest> tasksRunning() {
return new WaiterBuilder<DescribeTasksRequest, DescribeTasksResult>().withSdkFunction(new DescribeTasksFunction(client))
.withAcceptors(new TasksRunning.IsSTOPPEDMatcher(), new TasksRunning.IsMISSINGMatcher(), new TasksRunning.IsRUNNINGMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(100), new FixedDelayStrategy(6)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeTasksRequest> tasksRunning() {
return new WaiterBuilder<DescribeTasksRequest, DescribeTasksResult>().withSdkFunction(new DescribeTasksFunction(client))
.withAcceptors(new TasksRunning.IsSTOPPEDMatcher(), new TasksRunning.IsMISSINGMatcher(), new TasksRunning.IsRUNNINGMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(100), new FixedDelayStrategy(6)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeTasksRequest",
">",
"tasksRunning",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeTasksRequest",
",",
"DescribeTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"TasksRunning",
".",
"IsSTOPPEDMatcher",
"(",
")",
",",
"new",
"TasksRunning",
".",
"IsMISSINGMatcher",
"(",
")",
",",
"new",
"TasksRunning",
".",
"IsRUNNINGMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"100",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"6",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a TasksRunning waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"TasksRunning",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java#L51-L57
|
20,122
|
aws/aws-sdk-java
|
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java
|
AmazonECSWaiters.servicesStable
|
public Waiter<DescribeServicesRequest> servicesStable() {
return new WaiterBuilder<DescribeServicesRequest, DescribeServicesResult>()
.withSdkFunction(new DescribeServicesFunction(client))
.withAcceptors(new ServicesStable.IsMISSINGMatcher(), new ServicesStable.IsDRAININGMatcher(), new ServicesStable.IsINACTIVEMatcher(),
new ServicesStable.IsTrueMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeServicesRequest> servicesStable() {
return new WaiterBuilder<DescribeServicesRequest, DescribeServicesResult>()
.withSdkFunction(new DescribeServicesFunction(client))
.withAcceptors(new ServicesStable.IsMISSINGMatcher(), new ServicesStable.IsDRAININGMatcher(), new ServicesStable.IsINACTIVEMatcher(),
new ServicesStable.IsTrueMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeServicesRequest",
">",
"servicesStable",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeServicesRequest",
",",
"DescribeServicesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeServicesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ServicesStable",
".",
"IsMISSINGMatcher",
"(",
")",
",",
"new",
"ServicesStable",
".",
"IsDRAININGMatcher",
"(",
")",
",",
"new",
"ServicesStable",
".",
"IsINACTIVEMatcher",
"(",
")",
",",
"new",
"ServicesStable",
".",
"IsTrueMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"40",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ServicesStable waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ServicesStable",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java#L64-L72
|
20,123
|
aws/aws-sdk-java
|
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java
|
AmazonECSWaiters.servicesInactive
|
public Waiter<DescribeServicesRequest> servicesInactive() {
return new WaiterBuilder<DescribeServicesRequest, DescribeServicesResult>().withSdkFunction(new DescribeServicesFunction(client))
.withAcceptors(new ServicesInactive.IsMISSINGMatcher(), new ServicesInactive.IsINACTIVEMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeServicesRequest> servicesInactive() {
return new WaiterBuilder<DescribeServicesRequest, DescribeServicesResult>().withSdkFunction(new DescribeServicesFunction(client))
.withAcceptors(new ServicesInactive.IsMISSINGMatcher(), new ServicesInactive.IsINACTIVEMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeServicesRequest",
">",
"servicesInactive",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeServicesRequest",
",",
"DescribeServicesResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeServicesFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ServicesInactive",
".",
"IsMISSINGMatcher",
"(",
")",
",",
"new",
"ServicesInactive",
".",
"IsINACTIVEMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"40",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"15",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ServicesInactive waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"ServicesInactive",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java#L79-L85
|
20,124
|
aws/aws-sdk-java
|
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java
|
AmazonECSWaiters.tasksStopped
|
public Waiter<DescribeTasksRequest> tasksStopped() {
return new WaiterBuilder<DescribeTasksRequest, DescribeTasksResult>().withSdkFunction(new DescribeTasksFunction(client))
.withAcceptors(new TasksStopped.IsSTOPPEDMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(100), new FixedDelayStrategy(6)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeTasksRequest> tasksStopped() {
return new WaiterBuilder<DescribeTasksRequest, DescribeTasksResult>().withSdkFunction(new DescribeTasksFunction(client))
.withAcceptors(new TasksStopped.IsSTOPPEDMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(100), new FixedDelayStrategy(6)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeTasksRequest",
">",
"tasksStopped",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeTasksRequest",
",",
"DescribeTasksResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeTasksFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"TasksStopped",
".",
"IsSTOPPEDMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"100",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"6",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a TasksStopped waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"TasksStopped",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/waiters/AmazonECSWaiters.java#L92-L98
|
20,125
|
aws/aws-sdk-java
|
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java
|
AmazonEC2Client.dryRun
|
public <X extends AmazonWebServiceRequest> DryRunResult<X> dryRun(DryRunSupportedRequest<X> request) throws AmazonServiceException, AmazonClientException {
Request<X> dryRunRequest = request.getDryRunRequest();
ExecutionContext executionContext = createExecutionContext(dryRunRequest);
try {
invoke(dryRunRequest, new StaxResponseHandler<Void>(new VoidStaxUnmarshaller<Void>()), executionContext);
throw new AmazonClientException("Unrecognized service response for the dry-run request.");
} catch (AmazonServiceException ase) {
if (ase.getErrorCode().equals("DryRunOperation") && ase.getStatusCode() == 412) {
return new DryRunResult<X>(true, request, ase.getMessage(), ase);
} else if (ase.getErrorCode().equals("UnauthorizedOperation") && ase.getStatusCode() == 403) {
return new DryRunResult<X>(false, request, ase.getMessage(), ase);
} else if (ase.getErrorCode().equals("AuthFailure")) {
return new DryRunResult<X>(false, request, ase.getMessage(), ase);
}
throw new AmazonClientException("Unrecognized service response for the dry-run request.", ase);
}
}
|
java
|
public <X extends AmazonWebServiceRequest> DryRunResult<X> dryRun(DryRunSupportedRequest<X> request) throws AmazonServiceException, AmazonClientException {
Request<X> dryRunRequest = request.getDryRunRequest();
ExecutionContext executionContext = createExecutionContext(dryRunRequest);
try {
invoke(dryRunRequest, new StaxResponseHandler<Void>(new VoidStaxUnmarshaller<Void>()), executionContext);
throw new AmazonClientException("Unrecognized service response for the dry-run request.");
} catch (AmazonServiceException ase) {
if (ase.getErrorCode().equals("DryRunOperation") && ase.getStatusCode() == 412) {
return new DryRunResult<X>(true, request, ase.getMessage(), ase);
} else if (ase.getErrorCode().equals("UnauthorizedOperation") && ase.getStatusCode() == 403) {
return new DryRunResult<X>(false, request, ase.getMessage(), ase);
} else if (ase.getErrorCode().equals("AuthFailure")) {
return new DryRunResult<X>(false, request, ase.getMessage(), ase);
}
throw new AmazonClientException("Unrecognized service response for the dry-run request.", ase);
}
}
|
[
"public",
"<",
"X",
"extends",
"AmazonWebServiceRequest",
">",
"DryRunResult",
"<",
"X",
">",
"dryRun",
"(",
"DryRunSupportedRequest",
"<",
"X",
">",
"request",
")",
"throws",
"AmazonServiceException",
",",
"AmazonClientException",
"{",
"Request",
"<",
"X",
">",
"dryRunRequest",
"=",
"request",
".",
"getDryRunRequest",
"(",
")",
";",
"ExecutionContext",
"executionContext",
"=",
"createExecutionContext",
"(",
"dryRunRequest",
")",
";",
"try",
"{",
"invoke",
"(",
"dryRunRequest",
",",
"new",
"StaxResponseHandler",
"<",
"Void",
">",
"(",
"new",
"VoidStaxUnmarshaller",
"<",
"Void",
">",
"(",
")",
")",
",",
"executionContext",
")",
";",
"throw",
"new",
"AmazonClientException",
"(",
"\"Unrecognized service response for the dry-run request.\"",
")",
";",
"}",
"catch",
"(",
"AmazonServiceException",
"ase",
")",
"{",
"if",
"(",
"ase",
".",
"getErrorCode",
"(",
")",
".",
"equals",
"(",
"\"DryRunOperation\"",
")",
"&&",
"ase",
".",
"getStatusCode",
"(",
")",
"==",
"412",
")",
"{",
"return",
"new",
"DryRunResult",
"<",
"X",
">",
"(",
"true",
",",
"request",
",",
"ase",
".",
"getMessage",
"(",
")",
",",
"ase",
")",
";",
"}",
"else",
"if",
"(",
"ase",
".",
"getErrorCode",
"(",
")",
".",
"equals",
"(",
"\"UnauthorizedOperation\"",
")",
"&&",
"ase",
".",
"getStatusCode",
"(",
")",
"==",
"403",
")",
"{",
"return",
"new",
"DryRunResult",
"<",
"X",
">",
"(",
"false",
",",
"request",
",",
"ase",
".",
"getMessage",
"(",
")",
",",
"ase",
")",
";",
"}",
"else",
"if",
"(",
"ase",
".",
"getErrorCode",
"(",
")",
".",
"equals",
"(",
"\"AuthFailure\"",
")",
")",
"{",
"return",
"new",
"DryRunResult",
"<",
"X",
">",
"(",
"false",
",",
"request",
",",
"ase",
".",
"getMessage",
"(",
")",
",",
"ase",
")",
";",
"}",
"throw",
"new",
"AmazonClientException",
"(",
"\"Unrecognized service response for the dry-run request.\"",
",",
"ase",
")",
";",
"}",
"}"
] |
Checks whether you have the required permissions for the provided Amazon EC2 operation, without actually running
it. The returned DryRunResult object contains the information of whether the dry-run was successful. This method
will throw exception when the service response does not clearly indicate whether you have the permission.
@param request
The request object for any Amazon EC2 operation supported with dry-run.
@return A DryRunResult object that contains the information of whether the dry-run was successful.
@throws AmazonClientException
If any internal errors are encountered inside the client while attempting to make the request or handle
the response. Or if the service response does not clearly indicate whether you have the permission.
@throws AmazonServiceException
If an error response is returned by Amazon EC2 indicating either a problem with the data in the request,
or a server side issue.
|
[
"Checks",
"whether",
"you",
"have",
"the",
"required",
"permissions",
"for",
"the",
"provided",
"Amazon",
"EC2",
"operation",
"without",
"actually",
"running",
"it",
".",
"The",
"returned",
"DryRunResult",
"object",
"contains",
"the",
"information",
"of",
"whether",
"the",
"dry",
"-",
"run",
"was",
"successful",
".",
"This",
"method",
"will",
"throw",
"exception",
"when",
"the",
"service",
"response",
"does",
"not",
"clearly",
"indicate",
"whether",
"you",
"have",
"the",
"permission",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java#L20301-L20317
|
20,126
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/StandardBeanProperties.java
|
StandardBeanProperties.fieldNameOf
|
static final String fieldNameOf(Method getter) {
final String name = getter.getName().replaceFirst("^(get|is)","");
return StringUtils.lowerCase(name.substring(0, 1)) + name.substring(1);
}
|
java
|
static final String fieldNameOf(Method getter) {
final String name = getter.getName().replaceFirst("^(get|is)","");
return StringUtils.lowerCase(name.substring(0, 1)) + name.substring(1);
}
|
[
"static",
"final",
"String",
"fieldNameOf",
"(",
"Method",
"getter",
")",
"{",
"final",
"String",
"name",
"=",
"getter",
".",
"getName",
"(",
")",
".",
"replaceFirst",
"(",
"\"^(get|is)\"",
",",
"\"\"",
")",
";",
"return",
"StringUtils",
".",
"lowerCase",
"(",
"name",
".",
"substring",
"(",
"0",
",",
"1",
")",
")",
"+",
"name",
".",
"substring",
"(",
"1",
")",
";",
"}"
] |
Gets the field name given the getter method.
|
[
"Gets",
"the",
"field",
"name",
"given",
"the",
"getter",
"method",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/StandardBeanProperties.java#L264-L267
|
20,127
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/PresetSettings.java
|
PresetSettings.setCaptionDescriptions
|
public void setCaptionDescriptions(java.util.Collection<CaptionDescriptionPreset> captionDescriptions) {
if (captionDescriptions == null) {
this.captionDescriptions = null;
return;
}
this.captionDescriptions = new java.util.ArrayList<CaptionDescriptionPreset>(captionDescriptions);
}
|
java
|
public void setCaptionDescriptions(java.util.Collection<CaptionDescriptionPreset> captionDescriptions) {
if (captionDescriptions == null) {
this.captionDescriptions = null;
return;
}
this.captionDescriptions = new java.util.ArrayList<CaptionDescriptionPreset>(captionDescriptions);
}
|
[
"public",
"void",
"setCaptionDescriptions",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"CaptionDescriptionPreset",
">",
"captionDescriptions",
")",
"{",
"if",
"(",
"captionDescriptions",
"==",
"null",
")",
"{",
"this",
".",
"captionDescriptions",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"captionDescriptions",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"CaptionDescriptionPreset",
">",
"(",
"captionDescriptions",
")",
";",
"}"
] |
Caption settings for this preset. There can be multiple caption settings in a single output.
@param captionDescriptions
Caption settings for this preset. There can be multiple caption settings in a single output.
|
[
"Caption",
"settings",
"for",
"this",
"preset",
".",
"There",
"can",
"be",
"multiple",
"caption",
"settings",
"in",
"a",
"single",
"output",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/PresetSettings.java#L136-L143
|
20,128
|
aws/aws-sdk-java
|
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/ListUsersResult.java
|
ListUsersResult.setUsers
|
public void setUsers(java.util.Collection<UserSummary> users) {
if (users == null) {
this.users = null;
return;
}
this.users = new java.util.ArrayList<UserSummary>(users);
}
|
java
|
public void setUsers(java.util.Collection<UserSummary> users) {
if (users == null) {
this.users = null;
return;
}
this.users = new java.util.ArrayList<UserSummary>(users);
}
|
[
"public",
"void",
"setUsers",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"UserSummary",
">",
"users",
")",
"{",
"if",
"(",
"users",
"==",
"null",
")",
"{",
"this",
".",
"users",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"users",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"UserSummary",
">",
"(",
"users",
")",
";",
"}"
] |
Required. The list of all ActiveMQ usernames for the specified broker.
@param users
Required. The list of all ActiveMQ usernames for the specified broker.
|
[
"Required",
".",
"The",
"list",
"of",
"all",
"ActiveMQ",
"usernames",
"for",
"the",
"specified",
"broker",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/ListUsersResult.java#L171-L178
|
20,129
|
aws/aws-sdk-java
|
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/CreateConnectorDefinitionVersionRequest.java
|
CreateConnectorDefinitionVersionRequest.setConnectors
|
public void setConnectors(java.util.Collection<Connector> connectors) {
if (connectors == null) {
this.connectors = null;
return;
}
this.connectors = new java.util.ArrayList<Connector>(connectors);
}
|
java
|
public void setConnectors(java.util.Collection<Connector> connectors) {
if (connectors == null) {
this.connectors = null;
return;
}
this.connectors = new java.util.ArrayList<Connector>(connectors);
}
|
[
"public",
"void",
"setConnectors",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"Connector",
">",
"connectors",
")",
"{",
"if",
"(",
"connectors",
"==",
"null",
")",
"{",
"this",
".",
"connectors",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"connectors",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"Connector",
">",
"(",
"connectors",
")",
";",
"}"
] |
A list of references to connectors in this version, with their corresponding configuration settings.
@param connectors
A list of references to connectors in this version, with their corresponding configuration settings.
|
[
"A",
"list",
"of",
"references",
"to",
"connectors",
"in",
"this",
"version",
"with",
"their",
"corresponding",
"configuration",
"settings",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/CreateConnectorDefinitionVersionRequest.java#L120-L127
|
20,130
|
aws/aws-sdk-java
|
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java
|
AmazonIdentityManagementWaiters.roleExists
|
public Waiter<GetRoleRequest> roleExists() {
return new WaiterBuilder<GetRoleRequest, GetRoleResult>().withSdkFunction(new GetRoleFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new RoleExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetRoleRequest> roleExists() {
return new WaiterBuilder<GetRoleRequest, GetRoleResult>().withSdkFunction(new GetRoleFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new RoleExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetRoleRequest",
">",
"roleExists",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetRoleRequest",
",",
"GetRoleResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetRoleFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"HttpSuccessStatusAcceptor",
"(",
"WaiterState",
".",
"SUCCESS",
")",
",",
"new",
"RoleExists",
".",
"IsNoSuchEntityMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"20",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"1",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a RoleExists waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"RoleExists",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java#L51-L57
|
20,131
|
aws/aws-sdk-java
|
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java
|
AmazonIdentityManagementWaiters.instanceProfileExists
|
public Waiter<GetInstanceProfileRequest> instanceProfileExists() {
return new WaiterBuilder<GetInstanceProfileRequest, GetInstanceProfileResult>().withSdkFunction(new GetInstanceProfileFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new HttpFailureStatusAcceptor(404, WaiterState.RETRY))
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetInstanceProfileRequest> instanceProfileExists() {
return new WaiterBuilder<GetInstanceProfileRequest, GetInstanceProfileResult>().withSdkFunction(new GetInstanceProfileFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new HttpFailureStatusAcceptor(404, WaiterState.RETRY))
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetInstanceProfileRequest",
">",
"instanceProfileExists",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetInstanceProfileRequest",
",",
"GetInstanceProfileResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetInstanceProfileFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"HttpSuccessStatusAcceptor",
"(",
"WaiterState",
".",
"SUCCESS",
")",
",",
"new",
"HttpFailureStatusAcceptor",
"(",
"404",
",",
"WaiterState",
".",
"RETRY",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"40",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"1",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a InstanceProfileExists waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"InstanceProfileExists",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java#L64-L70
|
20,132
|
aws/aws-sdk-java
|
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java
|
AmazonIdentityManagementWaiters.policyExists
|
public Waiter<GetPolicyRequest> policyExists() {
return new WaiterBuilder<GetPolicyRequest, GetPolicyResult>().withSdkFunction(new GetPolicyFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new PolicyExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetPolicyRequest> policyExists() {
return new WaiterBuilder<GetPolicyRequest, GetPolicyResult>().withSdkFunction(new GetPolicyFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new PolicyExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetPolicyRequest",
">",
"policyExists",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetPolicyRequest",
",",
"GetPolicyResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetPolicyFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"HttpSuccessStatusAcceptor",
"(",
"WaiterState",
".",
"SUCCESS",
")",
",",
"new",
"PolicyExists",
".",
"IsNoSuchEntityMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"20",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"1",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a PolicyExists waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"PolicyExists",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java#L77-L83
|
20,133
|
aws/aws-sdk-java
|
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java
|
AmazonIdentityManagementWaiters.userExists
|
public Waiter<GetUserRequest> userExists() {
return new WaiterBuilder<GetUserRequest, GetUserResult>().withSdkFunction(new GetUserFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new UserExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetUserRequest> userExists() {
return new WaiterBuilder<GetUserRequest, GetUserResult>().withSdkFunction(new GetUserFunction(client))
.withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new UserExists.IsNoSuchEntityMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(1)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetUserRequest",
">",
"userExists",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetUserRequest",
",",
"GetUserResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetUserFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"HttpSuccessStatusAcceptor",
"(",
"WaiterState",
".",
"SUCCESS",
")",
",",
"new",
"UserExists",
".",
"IsNoSuchEntityMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"20",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"1",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a UserExists waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"UserExists",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java#L90-L96
|
20,134
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.createPolicyFromJsonString
|
public Policy createPolicyFromJsonString(String jsonString) {
if (jsonString == null) {
throw new IllegalArgumentException("JSON string cannot be null");
}
JsonNode policyNode;
JsonNode idNode;
JsonNode statementsNode;
Policy policy = new Policy();
List<Statement> statements = new LinkedList<Statement>();
try {
policyNode = Jackson.jsonNodeOf(jsonString);
idNode = policyNode.get(JsonDocumentFields.POLICY_ID);
if (isNotNull(idNode)) {
policy.setId(idNode.asText());
}
statementsNode = policyNode.get(JsonDocumentFields.STATEMENT);
if (isNotNull(statementsNode)) {
if (statementsNode.isObject()) {
statements.add(statementOf(statementsNode));
} else if (statementsNode.isArray()) {
for (JsonNode statementNode : statementsNode) {
statements.add(statementOf(statementNode));
}
}
}
} catch (Exception e) {
String message = "Unable to generate policy object fron JSON string "
+ e.getMessage();
throw new IllegalArgumentException(message, e);
}
policy.setStatements(statements);
return policy;
}
|
java
|
public Policy createPolicyFromJsonString(String jsonString) {
if (jsonString == null) {
throw new IllegalArgumentException("JSON string cannot be null");
}
JsonNode policyNode;
JsonNode idNode;
JsonNode statementsNode;
Policy policy = new Policy();
List<Statement> statements = new LinkedList<Statement>();
try {
policyNode = Jackson.jsonNodeOf(jsonString);
idNode = policyNode.get(JsonDocumentFields.POLICY_ID);
if (isNotNull(idNode)) {
policy.setId(idNode.asText());
}
statementsNode = policyNode.get(JsonDocumentFields.STATEMENT);
if (isNotNull(statementsNode)) {
if (statementsNode.isObject()) {
statements.add(statementOf(statementsNode));
} else if (statementsNode.isArray()) {
for (JsonNode statementNode : statementsNode) {
statements.add(statementOf(statementNode));
}
}
}
} catch (Exception e) {
String message = "Unable to generate policy object fron JSON string "
+ e.getMessage();
throw new IllegalArgumentException(message, e);
}
policy.setStatements(statements);
return policy;
}
|
[
"public",
"Policy",
"createPolicyFromJsonString",
"(",
"String",
"jsonString",
")",
"{",
"if",
"(",
"jsonString",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"JSON string cannot be null\"",
")",
";",
"}",
"JsonNode",
"policyNode",
";",
"JsonNode",
"idNode",
";",
"JsonNode",
"statementsNode",
";",
"Policy",
"policy",
"=",
"new",
"Policy",
"(",
")",
";",
"List",
"<",
"Statement",
">",
"statements",
"=",
"new",
"LinkedList",
"<",
"Statement",
">",
"(",
")",
";",
"try",
"{",
"policyNode",
"=",
"Jackson",
".",
"jsonNodeOf",
"(",
"jsonString",
")",
";",
"idNode",
"=",
"policyNode",
".",
"get",
"(",
"JsonDocumentFields",
".",
"POLICY_ID",
")",
";",
"if",
"(",
"isNotNull",
"(",
"idNode",
")",
")",
"{",
"policy",
".",
"setId",
"(",
"idNode",
".",
"asText",
"(",
")",
")",
";",
"}",
"statementsNode",
"=",
"policyNode",
".",
"get",
"(",
"JsonDocumentFields",
".",
"STATEMENT",
")",
";",
"if",
"(",
"isNotNull",
"(",
"statementsNode",
")",
")",
"{",
"if",
"(",
"statementsNode",
".",
"isObject",
"(",
")",
")",
"{",
"statements",
".",
"add",
"(",
"statementOf",
"(",
"statementsNode",
")",
")",
";",
"}",
"else",
"if",
"(",
"statementsNode",
".",
"isArray",
"(",
")",
")",
"{",
"for",
"(",
"JsonNode",
"statementNode",
":",
"statementsNode",
")",
"{",
"statements",
".",
"add",
"(",
"statementOf",
"(",
"statementNode",
")",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"String",
"message",
"=",
"\"Unable to generate policy object fron JSON string \"",
"+",
"e",
".",
"getMessage",
"(",
")",
";",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
",",
"e",
")",
";",
"}",
"policy",
".",
"setStatements",
"(",
"statements",
")",
";",
"return",
"policy",
";",
"}"
] |
Converts the specified JSON string to an AWS policy object.
For more information see, @see
http://docs.aws.amazon.com/AWSSdkDocsJava/latest
/DeveloperGuide/java-dg-access-control.html
@param jsonString
the specified JSON string representation of this AWS access
control policy.
@return An AWS policy object.
@throws IllegalArgumentException
If the specified JSON string is null or invalid and cannot be
converted to an AWS policy object.
|
[
"Converts",
"the",
"specified",
"JSON",
"string",
"to",
"an",
"AWS",
"policy",
"object",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L73-L110
|
20,135
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.actionsOf
|
private List<Action> actionsOf(JsonNode actionNodes) {
List<Action> actions = new LinkedList<Action>();
if (actionNodes.isArray()) {
for (JsonNode action : actionNodes) {
actions.add(new NamedAction(action.asText()));
}
} else {
actions.add(new NamedAction(actionNodes.asText()));
}
return actions;
}
|
java
|
private List<Action> actionsOf(JsonNode actionNodes) {
List<Action> actions = new LinkedList<Action>();
if (actionNodes.isArray()) {
for (JsonNode action : actionNodes) {
actions.add(new NamedAction(action.asText()));
}
} else {
actions.add(new NamedAction(actionNodes.asText()));
}
return actions;
}
|
[
"private",
"List",
"<",
"Action",
">",
"actionsOf",
"(",
"JsonNode",
"actionNodes",
")",
"{",
"List",
"<",
"Action",
">",
"actions",
"=",
"new",
"LinkedList",
"<",
"Action",
">",
"(",
")",
";",
"if",
"(",
"actionNodes",
".",
"isArray",
"(",
")",
")",
"{",
"for",
"(",
"JsonNode",
"action",
":",
"actionNodes",
")",
"{",
"actions",
".",
"add",
"(",
"new",
"NamedAction",
"(",
"action",
".",
"asText",
"(",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"actions",
".",
"add",
"(",
"new",
"NamedAction",
"(",
"actionNodes",
".",
"asText",
"(",
")",
")",
")",
";",
"}",
"return",
"actions",
";",
"}"
] |
Generates a list of actions from the Action Json Node.
@param actionNodes
the action Json node to be parsed.
@return the list of actions.
|
[
"Generates",
"a",
"list",
"of",
"actions",
"from",
"the",
"Action",
"Json",
"Node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L171-L182
|
20,136
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.resourcesOf
|
private List<Resource> resourcesOf(JsonNode resourceNodes) {
List<Resource> resources = new LinkedList<Resource>();
if (resourceNodes.isArray()) {
for (JsonNode resource : resourceNodes) {
resources.add(new Resource(resource.asText()));
}
} else {
resources.add(new Resource(resourceNodes.asText()));
}
return resources;
}
|
java
|
private List<Resource> resourcesOf(JsonNode resourceNodes) {
List<Resource> resources = new LinkedList<Resource>();
if (resourceNodes.isArray()) {
for (JsonNode resource : resourceNodes) {
resources.add(new Resource(resource.asText()));
}
} else {
resources.add(new Resource(resourceNodes.asText()));
}
return resources;
}
|
[
"private",
"List",
"<",
"Resource",
">",
"resourcesOf",
"(",
"JsonNode",
"resourceNodes",
")",
"{",
"List",
"<",
"Resource",
">",
"resources",
"=",
"new",
"LinkedList",
"<",
"Resource",
">",
"(",
")",
";",
"if",
"(",
"resourceNodes",
".",
"isArray",
"(",
")",
")",
"{",
"for",
"(",
"JsonNode",
"resource",
":",
"resourceNodes",
")",
"{",
"resources",
".",
"add",
"(",
"new",
"Resource",
"(",
"resource",
".",
"asText",
"(",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"resources",
".",
"add",
"(",
"new",
"Resource",
"(",
"resourceNodes",
".",
"asText",
"(",
")",
")",
")",
";",
"}",
"return",
"resources",
";",
"}"
] |
Generates a list of resources from the Resource Json Node.
@param resourceNodes
the resource Json node to be parsed.
@return the list of resources.
|
[
"Generates",
"a",
"list",
"of",
"resources",
"from",
"the",
"Resource",
"Json",
"Node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L191-L203
|
20,137
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.principalOf
|
private List<Principal> principalOf(JsonNode principalNodes) {
List<Principal> principals = new LinkedList<Principal>();
if (principalNodes.asText().equals("*")) {
principals.add(Principal.All);
return principals;
}
Iterator<Map.Entry<String, JsonNode>> mapOfPrincipals = principalNodes
.fields();
String schema;
JsonNode principalNode;
Entry<String, JsonNode> principal;
Iterator<JsonNode> elements;
while (mapOfPrincipals.hasNext()) {
principal = mapOfPrincipals.next();
schema = principal.getKey();
principalNode = principal.getValue();
if (principalNode.isArray()) {
elements = principalNode.elements();
while (elements.hasNext()) {
principals.add(createPrincipal(schema, elements.next()));
}
} else {
principals.add(createPrincipal(schema, principalNode));
}
}
return principals;
}
|
java
|
private List<Principal> principalOf(JsonNode principalNodes) {
List<Principal> principals = new LinkedList<Principal>();
if (principalNodes.asText().equals("*")) {
principals.add(Principal.All);
return principals;
}
Iterator<Map.Entry<String, JsonNode>> mapOfPrincipals = principalNodes
.fields();
String schema;
JsonNode principalNode;
Entry<String, JsonNode> principal;
Iterator<JsonNode> elements;
while (mapOfPrincipals.hasNext()) {
principal = mapOfPrincipals.next();
schema = principal.getKey();
principalNode = principal.getValue();
if (principalNode.isArray()) {
elements = principalNode.elements();
while (elements.hasNext()) {
principals.add(createPrincipal(schema, elements.next()));
}
} else {
principals.add(createPrincipal(schema, principalNode));
}
}
return principals;
}
|
[
"private",
"List",
"<",
"Principal",
">",
"principalOf",
"(",
"JsonNode",
"principalNodes",
")",
"{",
"List",
"<",
"Principal",
">",
"principals",
"=",
"new",
"LinkedList",
"<",
"Principal",
">",
"(",
")",
";",
"if",
"(",
"principalNodes",
".",
"asText",
"(",
")",
".",
"equals",
"(",
"\"*\"",
")",
")",
"{",
"principals",
".",
"add",
"(",
"Principal",
".",
"All",
")",
";",
"return",
"principals",
";",
"}",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
">",
"mapOfPrincipals",
"=",
"principalNodes",
".",
"fields",
"(",
")",
";",
"String",
"schema",
";",
"JsonNode",
"principalNode",
";",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
"principal",
";",
"Iterator",
"<",
"JsonNode",
">",
"elements",
";",
"while",
"(",
"mapOfPrincipals",
".",
"hasNext",
"(",
")",
")",
"{",
"principal",
"=",
"mapOfPrincipals",
".",
"next",
"(",
")",
";",
"schema",
"=",
"principal",
".",
"getKey",
"(",
")",
";",
"principalNode",
"=",
"principal",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"principalNode",
".",
"isArray",
"(",
")",
")",
"{",
"elements",
"=",
"principalNode",
".",
"elements",
"(",
")",
";",
"while",
"(",
"elements",
".",
"hasNext",
"(",
")",
")",
"{",
"principals",
".",
"add",
"(",
"createPrincipal",
"(",
"schema",
",",
"elements",
".",
"next",
"(",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"principals",
".",
"add",
"(",
"createPrincipal",
"(",
"schema",
",",
"principalNode",
")",
")",
";",
"}",
"}",
"return",
"principals",
";",
"}"
] |
Generates a list of principals from the Principal Json Node
@param principalNodes
the principal Json to be parsed
@return a list of principals
|
[
"Generates",
"a",
"list",
"of",
"principals",
"from",
"the",
"Principal",
"Json",
"Node"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L212-L242
|
20,138
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.createPrincipal
|
private Principal createPrincipal(String schema, JsonNode principalNode) {
if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_USER)) {
return new Principal(PRINCIPAL_SCHEMA_USER, principalNode.asText(), options.isStripAwsPrincipalIdHyphensEnabled());
} else if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_SERVICE)) {
return new Principal(schema, principalNode.asText());
} else if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_FEDERATED)) {
if (WebIdentityProviders.fromString(principalNode.asText()) != null) {
return new Principal(WebIdentityProviders.fromString(principalNode.asText()));
} else {
return new Principal(PRINCIPAL_SCHEMA_FEDERATED, principalNode.asText());
}
}
throw new SdkClientException("Schema " + schema + " is not a valid value for the principal.");
}
|
java
|
private Principal createPrincipal(String schema, JsonNode principalNode) {
if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_USER)) {
return new Principal(PRINCIPAL_SCHEMA_USER, principalNode.asText(), options.isStripAwsPrincipalIdHyphensEnabled());
} else if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_SERVICE)) {
return new Principal(schema, principalNode.asText());
} else if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_FEDERATED)) {
if (WebIdentityProviders.fromString(principalNode.asText()) != null) {
return new Principal(WebIdentityProviders.fromString(principalNode.asText()));
} else {
return new Principal(PRINCIPAL_SCHEMA_FEDERATED, principalNode.asText());
}
}
throw new SdkClientException("Schema " + schema + " is not a valid value for the principal.");
}
|
[
"private",
"Principal",
"createPrincipal",
"(",
"String",
"schema",
",",
"JsonNode",
"principalNode",
")",
"{",
"if",
"(",
"schema",
".",
"equalsIgnoreCase",
"(",
"PRINCIPAL_SCHEMA_USER",
")",
")",
"{",
"return",
"new",
"Principal",
"(",
"PRINCIPAL_SCHEMA_USER",
",",
"principalNode",
".",
"asText",
"(",
")",
",",
"options",
".",
"isStripAwsPrincipalIdHyphensEnabled",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"schema",
".",
"equalsIgnoreCase",
"(",
"PRINCIPAL_SCHEMA_SERVICE",
")",
")",
"{",
"return",
"new",
"Principal",
"(",
"schema",
",",
"principalNode",
".",
"asText",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"schema",
".",
"equalsIgnoreCase",
"(",
"PRINCIPAL_SCHEMA_FEDERATED",
")",
")",
"{",
"if",
"(",
"WebIdentityProviders",
".",
"fromString",
"(",
"principalNode",
".",
"asText",
"(",
")",
")",
"!=",
"null",
")",
"{",
"return",
"new",
"Principal",
"(",
"WebIdentityProviders",
".",
"fromString",
"(",
"principalNode",
".",
"asText",
"(",
")",
")",
")",
";",
"}",
"else",
"{",
"return",
"new",
"Principal",
"(",
"PRINCIPAL_SCHEMA_FEDERATED",
",",
"principalNode",
".",
"asText",
"(",
")",
")",
";",
"}",
"}",
"throw",
"new",
"SdkClientException",
"(",
"\"Schema \"",
"+",
"schema",
"+",
"\" is not a valid value for the principal.\"",
")",
";",
"}"
] |
Creates a new principal instance for the given schema and the Json node.
@param schema
the schema for the principal instance being created.
@param principalNode
the node indicating the AWS account that is making the
request.
@return a principal instance.
|
[
"Creates",
"a",
"new",
"principal",
"instance",
"for",
"the",
"given",
"schema",
"and",
"the",
"Json",
"node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L254-L267
|
20,139
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.conditionsOf
|
private List<Condition> conditionsOf(JsonNode conditionNodes) {
List<Condition> conditionList = new LinkedList<Condition>();
Iterator<Map.Entry<String, JsonNode>> mapOfConditions = conditionNodes
.fields();
Entry<String, JsonNode> condition;
while (mapOfConditions.hasNext()) {
condition = mapOfConditions.next();
convertConditionRecord(conditionList, condition.getKey(),
condition.getValue());
}
return conditionList;
}
|
java
|
private List<Condition> conditionsOf(JsonNode conditionNodes) {
List<Condition> conditionList = new LinkedList<Condition>();
Iterator<Map.Entry<String, JsonNode>> mapOfConditions = conditionNodes
.fields();
Entry<String, JsonNode> condition;
while (mapOfConditions.hasNext()) {
condition = mapOfConditions.next();
convertConditionRecord(conditionList, condition.getKey(),
condition.getValue());
}
return conditionList;
}
|
[
"private",
"List",
"<",
"Condition",
">",
"conditionsOf",
"(",
"JsonNode",
"conditionNodes",
")",
"{",
"List",
"<",
"Condition",
">",
"conditionList",
"=",
"new",
"LinkedList",
"<",
"Condition",
">",
"(",
")",
";",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
">",
"mapOfConditions",
"=",
"conditionNodes",
".",
"fields",
"(",
")",
";",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
"condition",
";",
"while",
"(",
"mapOfConditions",
".",
"hasNext",
"(",
")",
")",
"{",
"condition",
"=",
"mapOfConditions",
".",
"next",
"(",
")",
";",
"convertConditionRecord",
"(",
"conditionList",
",",
"condition",
".",
"getKey",
"(",
")",
",",
"condition",
".",
"getValue",
"(",
")",
")",
";",
"}",
"return",
"conditionList",
";",
"}"
] |
Generates a list of condition from the Json node.
@param conditionNodes
the condition Json node to be parsed.
@return the list of conditions.
|
[
"Generates",
"a",
"list",
"of",
"condition",
"from",
"the",
"Json",
"node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L276-L290
|
20,140
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
|
JsonPolicyReader.convertConditionRecord
|
private void convertConditionRecord(List<Condition> conditions,
String conditionType, JsonNode conditionNode) {
Iterator<Map.Entry<String, JsonNode>> mapOfFields = conditionNode
.fields();
List<String> values;
Entry<String, JsonNode> field;
JsonNode fieldValue;
Iterator<JsonNode> elements;
while (mapOfFields.hasNext()) {
values = new LinkedList<String>();
field = mapOfFields.next();
fieldValue = field.getValue();
if (fieldValue.isArray()) {
elements = fieldValue.elements();
while (elements.hasNext()) {
values.add(elements.next().asText());
}
} else {
values.add(fieldValue.asText());
}
conditions.add(new Condition().withType(conditionType)
.withConditionKey(field.getKey()).withValues(values));
}
}
|
java
|
private void convertConditionRecord(List<Condition> conditions,
String conditionType, JsonNode conditionNode) {
Iterator<Map.Entry<String, JsonNode>> mapOfFields = conditionNode
.fields();
List<String> values;
Entry<String, JsonNode> field;
JsonNode fieldValue;
Iterator<JsonNode> elements;
while (mapOfFields.hasNext()) {
values = new LinkedList<String>();
field = mapOfFields.next();
fieldValue = field.getValue();
if (fieldValue.isArray()) {
elements = fieldValue.elements();
while (elements.hasNext()) {
values.add(elements.next().asText());
}
} else {
values.add(fieldValue.asText());
}
conditions.add(new Condition().withType(conditionType)
.withConditionKey(field.getKey()).withValues(values));
}
}
|
[
"private",
"void",
"convertConditionRecord",
"(",
"List",
"<",
"Condition",
">",
"conditions",
",",
"String",
"conditionType",
",",
"JsonNode",
"conditionNode",
")",
"{",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
">",
"mapOfFields",
"=",
"conditionNode",
".",
"fields",
"(",
")",
";",
"List",
"<",
"String",
">",
"values",
";",
"Entry",
"<",
"String",
",",
"JsonNode",
">",
"field",
";",
"JsonNode",
"fieldValue",
";",
"Iterator",
"<",
"JsonNode",
">",
"elements",
";",
"while",
"(",
"mapOfFields",
".",
"hasNext",
"(",
")",
")",
"{",
"values",
"=",
"new",
"LinkedList",
"<",
"String",
">",
"(",
")",
";",
"field",
"=",
"mapOfFields",
".",
"next",
"(",
")",
";",
"fieldValue",
"=",
"field",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"fieldValue",
".",
"isArray",
"(",
")",
")",
"{",
"elements",
"=",
"fieldValue",
".",
"elements",
"(",
")",
";",
"while",
"(",
"elements",
".",
"hasNext",
"(",
")",
")",
"{",
"values",
".",
"add",
"(",
"elements",
".",
"next",
"(",
")",
".",
"asText",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"values",
".",
"add",
"(",
"fieldValue",
".",
"asText",
"(",
")",
")",
";",
"}",
"conditions",
".",
"add",
"(",
"new",
"Condition",
"(",
")",
".",
"withType",
"(",
"conditionType",
")",
".",
"withConditionKey",
"(",
"field",
".",
"getKey",
"(",
")",
")",
".",
"withValues",
"(",
"values",
")",
")",
";",
"}",
"}"
] |
Generates a condition instance for each condition type under the
Condition Json node.
@param conditions
the complete list of conditions
@param conditionType
the condition type for the condition being created.
@param conditionNode
each condition node to be parsed.
|
[
"Generates",
"a",
"condition",
"instance",
"for",
"each",
"condition",
"type",
"under",
"the",
"Condition",
"Json",
"node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L303-L329
|
20,141
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java
|
ConvertibleType.param
|
final <t> ConvertibleType<t> param(final int index) {
return this.params.length > index ? (ConvertibleType<t>)this.params[index] : null;
}
|
java
|
final <t> ConvertibleType<t> param(final int index) {
return this.params.length > index ? (ConvertibleType<t>)this.params[index] : null;
}
|
[
"final",
"<",
"t",
">",
"ConvertibleType",
"<",
"t",
">",
"param",
"(",
"final",
"int",
"index",
")",
"{",
"return",
"this",
".",
"params",
".",
"length",
">",
"index",
"?",
"(",
"ConvertibleType",
"<",
"t",
">",
")",
"this",
".",
"params",
"[",
"index",
"]",
":",
"null",
";",
"}"
] |
Gets the scalar parameter types.
|
[
"Gets",
"the",
"scalar",
"parameter",
"types",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java#L103-L105
|
20,142
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java
|
ConvertibleType.is
|
final boolean is(ScalarAttributeType scalarAttributeType, Vector vector) {
return param(0) != null && param(0).is(scalarAttributeType) && is(vector);
}
|
java
|
final boolean is(ScalarAttributeType scalarAttributeType, Vector vector) {
return param(0) != null && param(0).is(scalarAttributeType) && is(vector);
}
|
[
"final",
"boolean",
"is",
"(",
"ScalarAttributeType",
"scalarAttributeType",
",",
"Vector",
"vector",
")",
"{",
"return",
"param",
"(",
"0",
")",
"!=",
"null",
"&&",
"param",
"(",
"0",
")",
".",
"is",
"(",
"scalarAttributeType",
")",
"&&",
"is",
"(",
"vector",
")",
";",
"}"
] |
Returns true if the types match.
|
[
"Returns",
"true",
"if",
"the",
"types",
"match",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java#L110-L112
|
20,143
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java
|
ConvertibleType.of
|
static <T> ConvertibleType<T> of(Method getter, TypedMap<T> annotations) {
return new ConvertibleType<T>(getter.getGenericReturnType(), annotations, getter);
}
|
java
|
static <T> ConvertibleType<T> of(Method getter, TypedMap<T> annotations) {
return new ConvertibleType<T>(getter.getGenericReturnType(), annotations, getter);
}
|
[
"static",
"<",
"T",
">",
"ConvertibleType",
"<",
"T",
">",
"of",
"(",
"Method",
"getter",
",",
"TypedMap",
"<",
"T",
">",
"annotations",
")",
"{",
"return",
"new",
"ConvertibleType",
"<",
"T",
">",
"(",
"getter",
".",
"getGenericReturnType",
"(",
")",
",",
"annotations",
",",
"getter",
")",
";",
"}"
] |
Returns the conversion type for the method and annotations.
|
[
"Returns",
"the",
"conversion",
"type",
"for",
"the",
"method",
"and",
"annotations",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java#L168-L170
|
20,144
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java
|
ConvertibleType.of
|
private static <T> ConvertibleType<T> of(final DynamoDBTypeConverter<?,T> converter) {
final Class<?> clazz = converter.getClass();
if (!clazz.isInterface()) {
for (Class<?> c = clazz; Object.class != c; c = c.getSuperclass()) {
for (final Type genericType : c.getGenericInterfaces()) {
final ConvertibleType<T> type = ConvertibleType.<T>of(genericType);
if (type.is(DynamoDBTypeConverter.class)) {
if (type.params.length == 2 && type.param(0).targetType() != Object.class) {
return type.param(0);
}
}
}
}
final ConvertibleType<T> type = ConvertibleType.<T>of(clazz.getGenericSuperclass());
if (type.is(DynamoDBTypeConverter.class)) {
if (type.params.length > 0 && type.param(0).targetType() != Object.class) {
return type.param(0);
}
}
}
throw new DynamoDBMappingException("could not resolve type of " + clazz);
}
|
java
|
private static <T> ConvertibleType<T> of(final DynamoDBTypeConverter<?,T> converter) {
final Class<?> clazz = converter.getClass();
if (!clazz.isInterface()) {
for (Class<?> c = clazz; Object.class != c; c = c.getSuperclass()) {
for (final Type genericType : c.getGenericInterfaces()) {
final ConvertibleType<T> type = ConvertibleType.<T>of(genericType);
if (type.is(DynamoDBTypeConverter.class)) {
if (type.params.length == 2 && type.param(0).targetType() != Object.class) {
return type.param(0);
}
}
}
}
final ConvertibleType<T> type = ConvertibleType.<T>of(clazz.getGenericSuperclass());
if (type.is(DynamoDBTypeConverter.class)) {
if (type.params.length > 0 && type.param(0).targetType() != Object.class) {
return type.param(0);
}
}
}
throw new DynamoDBMappingException("could not resolve type of " + clazz);
}
|
[
"private",
"static",
"<",
"T",
">",
"ConvertibleType",
"<",
"T",
">",
"of",
"(",
"final",
"DynamoDBTypeConverter",
"<",
"?",
",",
"T",
">",
"converter",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"clazz",
"=",
"converter",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"!",
"clazz",
".",
"isInterface",
"(",
")",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"c",
"=",
"clazz",
";",
"Object",
".",
"class",
"!=",
"c",
";",
"c",
"=",
"c",
".",
"getSuperclass",
"(",
")",
")",
"{",
"for",
"(",
"final",
"Type",
"genericType",
":",
"c",
".",
"getGenericInterfaces",
"(",
")",
")",
"{",
"final",
"ConvertibleType",
"<",
"T",
">",
"type",
"=",
"ConvertibleType",
".",
"<",
"T",
">",
"of",
"(",
"genericType",
")",
";",
"if",
"(",
"type",
".",
"is",
"(",
"DynamoDBTypeConverter",
".",
"class",
")",
")",
"{",
"if",
"(",
"type",
".",
"params",
".",
"length",
"==",
"2",
"&&",
"type",
".",
"param",
"(",
"0",
")",
".",
"targetType",
"(",
")",
"!=",
"Object",
".",
"class",
")",
"{",
"return",
"type",
".",
"param",
"(",
"0",
")",
";",
"}",
"}",
"}",
"}",
"final",
"ConvertibleType",
"<",
"T",
">",
"type",
"=",
"ConvertibleType",
".",
"<",
"T",
">",
"of",
"(",
"clazz",
".",
"getGenericSuperclass",
"(",
")",
")",
";",
"if",
"(",
"type",
".",
"is",
"(",
"DynamoDBTypeConverter",
".",
"class",
")",
")",
"{",
"if",
"(",
"type",
".",
"params",
".",
"length",
">",
"0",
"&&",
"type",
".",
"param",
"(",
"0",
")",
".",
"targetType",
"(",
")",
"!=",
"Object",
".",
"class",
")",
"{",
"return",
"type",
".",
"param",
"(",
"0",
")",
";",
"}",
"}",
"}",
"throw",
"new",
"DynamoDBMappingException",
"(",
"\"could not resolve type of \"",
"+",
"clazz",
")",
";",
"}"
] |
Returns the conversion type for the converter.
|
[
"Returns",
"the",
"conversion",
"type",
"for",
"the",
"converter",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java#L175-L196
|
20,145
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java
|
ConvertibleType.of
|
private static <T> ConvertibleType<T> of(Type genericType) {
final Class<T> targetType;
if (genericType instanceof Class) {
targetType = (Class<T>)genericType;
} else if (genericType instanceof ParameterizedType) {
targetType = (Class<T>)((ParameterizedType)genericType).getRawType();
} else if (genericType.toString().equals("byte[]")) {
targetType = (Class<T>)byte[].class;
} else {
targetType = (Class<T>)Object.class;
}
final TypedMap<T> annotations = StandardAnnotationMaps.<T>of(targetType);
return new ConvertibleType<T>(genericType, annotations, null);
}
|
java
|
private static <T> ConvertibleType<T> of(Type genericType) {
final Class<T> targetType;
if (genericType instanceof Class) {
targetType = (Class<T>)genericType;
} else if (genericType instanceof ParameterizedType) {
targetType = (Class<T>)((ParameterizedType)genericType).getRawType();
} else if (genericType.toString().equals("byte[]")) {
targetType = (Class<T>)byte[].class;
} else {
targetType = (Class<T>)Object.class;
}
final TypedMap<T> annotations = StandardAnnotationMaps.<T>of(targetType);
return new ConvertibleType<T>(genericType, annotations, null);
}
|
[
"private",
"static",
"<",
"T",
">",
"ConvertibleType",
"<",
"T",
">",
"of",
"(",
"Type",
"genericType",
")",
"{",
"final",
"Class",
"<",
"T",
">",
"targetType",
";",
"if",
"(",
"genericType",
"instanceof",
"Class",
")",
"{",
"targetType",
"=",
"(",
"Class",
"<",
"T",
">",
")",
"genericType",
";",
"}",
"else",
"if",
"(",
"genericType",
"instanceof",
"ParameterizedType",
")",
"{",
"targetType",
"=",
"(",
"Class",
"<",
"T",
">",
")",
"(",
"(",
"ParameterizedType",
")",
"genericType",
")",
".",
"getRawType",
"(",
")",
";",
"}",
"else",
"if",
"(",
"genericType",
".",
"toString",
"(",
")",
".",
"equals",
"(",
"\"byte[]\"",
")",
")",
"{",
"targetType",
"=",
"(",
"Class",
"<",
"T",
">",
")",
"byte",
"[",
"]",
".",
"class",
";",
"}",
"else",
"{",
"targetType",
"=",
"(",
"Class",
"<",
"T",
">",
")",
"Object",
".",
"class",
";",
"}",
"final",
"TypedMap",
"<",
"T",
">",
"annotations",
"=",
"StandardAnnotationMaps",
".",
"<",
"T",
">",
"of",
"(",
"targetType",
")",
";",
"return",
"new",
"ConvertibleType",
"<",
"T",
">",
"(",
"genericType",
",",
"annotations",
",",
"null",
")",
";",
"}"
] |
Returns the conversion type for the generic type.
|
[
"Returns",
"the",
"conversion",
"type",
"for",
"the",
"generic",
"type",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java#L201-L214
|
20,146
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/UnarchiveFindingsRequest.java
|
UnarchiveFindingsRequest.setFindingIds
|
public void setFindingIds(java.util.Collection<String> findingIds) {
if (findingIds == null) {
this.findingIds = null;
return;
}
this.findingIds = new java.util.ArrayList<String>(findingIds);
}
|
java
|
public void setFindingIds(java.util.Collection<String> findingIds) {
if (findingIds == null) {
this.findingIds = null;
return;
}
this.findingIds = new java.util.ArrayList<String>(findingIds);
}
|
[
"public",
"void",
"setFindingIds",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"findingIds",
")",
"{",
"if",
"(",
"findingIds",
"==",
"null",
")",
"{",
"this",
".",
"findingIds",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"findingIds",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"String",
">",
"(",
"findingIds",
")",
";",
"}"
] |
IDs of the findings that you want to unarchive.
@param findingIds
IDs of the findings that you want to unarchive.
|
[
"IDs",
"of",
"the",
"findings",
"that",
"you",
"want",
"to",
"unarchive",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/UnarchiveFindingsRequest.java#L85-L92
|
20,147
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/PutInstructionFileRequest.java
|
PutInstructionFileRequest.getMaterialsDescription
|
@Override
public Map<String, String> getMaterialsDescription() {
return matDesc == null
? encryptionMaterials.getMaterialsDescription()
: matDesc
;
}
|
java
|
@Override
public Map<String, String> getMaterialsDescription() {
return matDesc == null
? encryptionMaterials.getMaterialsDescription()
: matDesc
;
}
|
[
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getMaterialsDescription",
"(",
")",
"{",
"return",
"matDesc",
"==",
"null",
"?",
"encryptionMaterials",
".",
"getMaterialsDescription",
"(",
")",
":",
"matDesc",
";",
"}"
] |
Returns the material description for the new instruction file.
|
[
"Returns",
"the",
"material",
"description",
"for",
"the",
"new",
"instruction",
"file",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/PutInstructionFileRequest.java#L127-L133
|
20,148
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/waiters/CompositeAcceptor.java
|
CompositeAcceptor.accepts
|
public WaiterState accepts(Output response) {
for (WaiterAcceptor<Output> acceptor : acceptors) {
if (acceptor.matches(response)) {
return acceptor.getState();
}
}
return WaiterState.RETRY;
}
|
java
|
public WaiterState accepts(Output response) {
for (WaiterAcceptor<Output> acceptor : acceptors) {
if (acceptor.matches(response)) {
return acceptor.getState();
}
}
return WaiterState.RETRY;
}
|
[
"public",
"WaiterState",
"accepts",
"(",
"Output",
"response",
")",
"{",
"for",
"(",
"WaiterAcceptor",
"<",
"Output",
">",
"acceptor",
":",
"acceptors",
")",
"{",
"if",
"(",
"acceptor",
".",
"matches",
"(",
"response",
")",
")",
"{",
"return",
"acceptor",
".",
"getState",
"(",
")",
";",
"}",
"}",
"return",
"WaiterState",
".",
"RETRY",
";",
"}"
] |
Compares the response against each response acceptor and returns
the state of the acceptor it matches on. If none is matched, returns
retry state by default
@param response Response object got by executing the specified
waiter operation
@return (Enum) Corresponding waiter state defined by the acceptor or
retry state if none matched
|
[
"Compares",
"the",
"response",
"against",
"each",
"response",
"acceptor",
"and",
"returns",
"the",
"state",
"of",
"the",
"acceptor",
"it",
"matches",
"on",
".",
"If",
"none",
"is",
"matched",
"returns",
"retry",
"state",
"by",
"default"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/waiters/CompositeAcceptor.java#L61-L69
|
20,149
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/waiters/CompositeAcceptor.java
|
CompositeAcceptor.accepts
|
public WaiterState accepts(AmazonServiceException exception) throws AmazonServiceException {
for (WaiterAcceptor<Output> acceptor : acceptors) {
if (acceptor.matches(exception)) {
return acceptor.getState();
}
}
throw exception;
}
|
java
|
public WaiterState accepts(AmazonServiceException exception) throws AmazonServiceException {
for (WaiterAcceptor<Output> acceptor : acceptors) {
if (acceptor.matches(exception)) {
return acceptor.getState();
}
}
throw exception;
}
|
[
"public",
"WaiterState",
"accepts",
"(",
"AmazonServiceException",
"exception",
")",
"throws",
"AmazonServiceException",
"{",
"for",
"(",
"WaiterAcceptor",
"<",
"Output",
">",
"acceptor",
":",
"acceptors",
")",
"{",
"if",
"(",
"acceptor",
".",
"matches",
"(",
"exception",
")",
")",
"{",
"return",
"acceptor",
".",
"getState",
"(",
")",
";",
"}",
"}",
"throw",
"exception",
";",
"}"
] |
Compares the exception thrown against each exception acceptor and
returns the state of the acceptor it matches on. If none is
matched, it rethrows the exception to the caller
@param exception Exception thrown by executing the specified
waiter operation
@return (Enum) Corresponding waiter state defined by the acceptor or
rethrows the exception back to the caller if none matched
@throws Exception
|
[
"Compares",
"the",
"exception",
"thrown",
"against",
"each",
"exception",
"acceptor",
"and",
"returns",
"the",
"state",
"of",
"the",
"acceptor",
"it",
"matches",
"on",
".",
"If",
"none",
"is",
"matched",
"it",
"rethrows",
"the",
"exception",
"to",
"the",
"caller"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/waiters/CompositeAcceptor.java#L82-L89
|
20,150
|
aws/aws-sdk-java
|
aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java
|
AWSElasticBeanstalkAsyncClient.describeApplicationVersionsAsync
|
@Override
public java.util.concurrent.Future<DescribeApplicationVersionsResult> describeApplicationVersionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeApplicationVersionsRequest, DescribeApplicationVersionsResult> asyncHandler) {
return describeApplicationVersionsAsync(new DescribeApplicationVersionsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeApplicationVersionsResult> describeApplicationVersionsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeApplicationVersionsRequest, DescribeApplicationVersionsResult> asyncHandler) {
return describeApplicationVersionsAsync(new DescribeApplicationVersionsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeApplicationVersionsResult",
">",
"describeApplicationVersionsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeApplicationVersionsRequest",
",",
"DescribeApplicationVersionsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeApplicationVersionsAsync",
"(",
"new",
"DescribeApplicationVersionsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeApplicationVersions operation with an AsyncHandler.
@see #describeApplicationVersionsAsync(DescribeApplicationVersionsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeApplicationVersions",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java#L891-L896
|
20,151
|
aws/aws-sdk-java
|
aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java
|
AWSElasticBeanstalkAsyncClient.describeApplicationsAsync
|
@Override
public java.util.concurrent.Future<DescribeApplicationsResult> describeApplicationsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeApplicationsRequest, DescribeApplicationsResult> asyncHandler) {
return describeApplicationsAsync(new DescribeApplicationsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeApplicationsResult> describeApplicationsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeApplicationsRequest, DescribeApplicationsResult> asyncHandler) {
return describeApplicationsAsync(new DescribeApplicationsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeApplicationsResult",
">",
"describeApplicationsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeApplicationsRequest",
",",
"DescribeApplicationsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeApplicationsAsync",
"(",
"new",
"DescribeApplicationsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeApplications operation with an AsyncHandler.
@see #describeApplicationsAsync(DescribeApplicationsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeApplications",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java#L947-L952
|
20,152
|
aws/aws-sdk-java
|
aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java
|
AWSElasticBeanstalkAsyncClient.describeEnvironmentsAsync
|
@Override
public java.util.concurrent.Future<DescribeEnvironmentsResult> describeEnvironmentsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeEnvironmentsRequest, DescribeEnvironmentsResult> asyncHandler) {
return describeEnvironmentsAsync(new DescribeEnvironmentsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeEnvironmentsResult> describeEnvironmentsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeEnvironmentsRequest, DescribeEnvironmentsResult> asyncHandler) {
return describeEnvironmentsAsync(new DescribeEnvironmentsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeEnvironmentsResult",
">",
"describeEnvironmentsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeEnvironmentsRequest",
",",
"DescribeEnvironmentsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeEnvironmentsAsync",
"(",
"new",
"DescribeEnvironmentsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeEnvironments operation with an AsyncHandler.
@see #describeEnvironmentsAsync(DescribeEnvironmentsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeEnvironments",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java#L1206-L1211
|
20,153
|
aws/aws-sdk-java
|
aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java
|
AWSElasticBeanstalkAsyncClient.swapEnvironmentCNAMEsAsync
|
@Override
public java.util.concurrent.Future<SwapEnvironmentCNAMEsResult> swapEnvironmentCNAMEsAsync(
com.amazonaws.handlers.AsyncHandler<SwapEnvironmentCNAMEsRequest, SwapEnvironmentCNAMEsResult> asyncHandler) {
return swapEnvironmentCNAMEsAsync(new SwapEnvironmentCNAMEsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<SwapEnvironmentCNAMEsResult> swapEnvironmentCNAMEsAsync(
com.amazonaws.handlers.AsyncHandler<SwapEnvironmentCNAMEsRequest, SwapEnvironmentCNAMEsResult> asyncHandler) {
return swapEnvironmentCNAMEsAsync(new SwapEnvironmentCNAMEsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SwapEnvironmentCNAMEsResult",
">",
"swapEnvironmentCNAMEsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"SwapEnvironmentCNAMEsRequest",
",",
"SwapEnvironmentCNAMEsResult",
">",
"asyncHandler",
")",
"{",
"return",
"swapEnvironmentCNAMEsAsync",
"(",
"new",
"SwapEnvironmentCNAMEsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the SwapEnvironmentCNAMEs operation with an AsyncHandler.
@see #swapEnvironmentCNAMEsAsync(SwapEnvironmentCNAMEsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SwapEnvironmentCNAMEs",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkAsyncClient.java#L1638-L1643
|
20,154
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.withPrimaryKeysToDelete
|
public TableWriteItems withPrimaryKeysToDelete(
PrimaryKey... primaryKeysToDelete) {
if (primaryKeysToDelete == null)
this.primaryKeysToDelete = null;
else {
Set<String> pkNameSet = null;
for (PrimaryKey pk : primaryKeysToDelete) {
if (pkNameSet == null)
pkNameSet = pk.getComponentNameSet();
else {
if (!pkNameSet.equals(pk.getComponentNameSet())) {
throw new IllegalArgumentException(
"primary key attribute names must be consistent for the specified primary keys");
}
}
}
this.primaryKeysToDelete = new ArrayList<PrimaryKey>(
Arrays.asList(primaryKeysToDelete));
}
return this;
}
|
java
|
public TableWriteItems withPrimaryKeysToDelete(
PrimaryKey... primaryKeysToDelete) {
if (primaryKeysToDelete == null)
this.primaryKeysToDelete = null;
else {
Set<String> pkNameSet = null;
for (PrimaryKey pk : primaryKeysToDelete) {
if (pkNameSet == null)
pkNameSet = pk.getComponentNameSet();
else {
if (!pkNameSet.equals(pk.getComponentNameSet())) {
throw new IllegalArgumentException(
"primary key attribute names must be consistent for the specified primary keys");
}
}
}
this.primaryKeysToDelete = new ArrayList<PrimaryKey>(
Arrays.asList(primaryKeysToDelete));
}
return this;
}
|
[
"public",
"TableWriteItems",
"withPrimaryKeysToDelete",
"(",
"PrimaryKey",
"...",
"primaryKeysToDelete",
")",
"{",
"if",
"(",
"primaryKeysToDelete",
"==",
"null",
")",
"this",
".",
"primaryKeysToDelete",
"=",
"null",
";",
"else",
"{",
"Set",
"<",
"String",
">",
"pkNameSet",
"=",
"null",
";",
"for",
"(",
"PrimaryKey",
"pk",
":",
"primaryKeysToDelete",
")",
"{",
"if",
"(",
"pkNameSet",
"==",
"null",
")",
"pkNameSet",
"=",
"pk",
".",
"getComponentNameSet",
"(",
")",
";",
"else",
"{",
"if",
"(",
"!",
"pkNameSet",
".",
"equals",
"(",
"pk",
".",
"getComponentNameSet",
"(",
")",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"primary key attribute names must be consistent for the specified primary keys\"",
")",
";",
"}",
"}",
"}",
"this",
".",
"primaryKeysToDelete",
"=",
"new",
"ArrayList",
"<",
"PrimaryKey",
">",
"(",
"Arrays",
".",
"asList",
"(",
"primaryKeysToDelete",
")",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
Used to specify multiple primary keys to be deleted from the current
table. A primary key could consist of either a hash-key or both a
hash-key and a range-key depending on the schema of the table.
|
[
"Used",
"to",
"specify",
"multiple",
"primary",
"keys",
"to",
"be",
"deleted",
"from",
"the",
"current",
"table",
".",
"A",
"primary",
"key",
"could",
"consist",
"of",
"either",
"a",
"hash",
"-",
"key",
"or",
"both",
"a",
"hash",
"-",
"key",
"and",
"a",
"range",
"-",
"key",
"depending",
"on",
"the",
"schema",
"of",
"the",
"table",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L52-L72
|
20,155
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.withHashOnlyKeysToDelete
|
public TableWriteItems withHashOnlyKeysToDelete(String hashKeyName,
Object... hashKeyValues) {
if (hashKeyName == null)
throw new IllegalArgumentException();
PrimaryKey[] primaryKeys = new PrimaryKey[hashKeyValues.length];
for (int i=0; i < hashKeyValues.length; i++)
primaryKeys[i] = new PrimaryKey(hashKeyName, hashKeyValues[i]);
return withPrimaryKeysToDelete(primaryKeys);
}
|
java
|
public TableWriteItems withHashOnlyKeysToDelete(String hashKeyName,
Object... hashKeyValues) {
if (hashKeyName == null)
throw new IllegalArgumentException();
PrimaryKey[] primaryKeys = new PrimaryKey[hashKeyValues.length];
for (int i=0; i < hashKeyValues.length; i++)
primaryKeys[i] = new PrimaryKey(hashKeyName, hashKeyValues[i]);
return withPrimaryKeysToDelete(primaryKeys);
}
|
[
"public",
"TableWriteItems",
"withHashOnlyKeysToDelete",
"(",
"String",
"hashKeyName",
",",
"Object",
"...",
"hashKeyValues",
")",
"{",
"if",
"(",
"hashKeyName",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"PrimaryKey",
"[",
"]",
"primaryKeys",
"=",
"new",
"PrimaryKey",
"[",
"hashKeyValues",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"hashKeyValues",
".",
"length",
";",
"i",
"++",
")",
"primaryKeys",
"[",
"i",
"]",
"=",
"new",
"PrimaryKey",
"(",
"hashKeyName",
",",
"hashKeyValues",
"[",
"i",
"]",
")",
";",
"return",
"withPrimaryKeysToDelete",
"(",
"primaryKeys",
")",
";",
"}"
] |
Used to specify multiple hash-only primary keys to be deleted from the
current table.
@param hashKeyName
hash-only key name
@param hashKeyValues
a list of hash key values
|
[
"Used",
"to",
"specify",
"multiple",
"hash",
"-",
"only",
"primary",
"keys",
"to",
"be",
"deleted",
"from",
"the",
"current",
"table",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L83-L91
|
20,156
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.withHashAndRangeKeysToDelete
|
public TableWriteItems withHashAndRangeKeysToDelete(
String hashKeyName, String rangeKeyName,
Object... alternatingHashAndRangeKeyValues) {
if (hashKeyName == null)
throw new IllegalArgumentException("hash key name must be specified");
if (rangeKeyName == null)
throw new IllegalArgumentException("range key name must be specified");
if (alternatingHashAndRangeKeyValues.length % 2 != 0)
throw new IllegalArgumentException("number of hash and range key values must be the same");
final int len = alternatingHashAndRangeKeyValues.length / 2;
PrimaryKey[] primaryKeys = new PrimaryKey[len];
for (int i=0; i < alternatingHashAndRangeKeyValues.length; i += 2) {
primaryKeys[i >> 1] = new PrimaryKey(
hashKeyName, alternatingHashAndRangeKeyValues[i],
rangeKeyName, alternatingHashAndRangeKeyValues[i+1]);
}
return withPrimaryKeysToDelete(primaryKeys);
}
|
java
|
public TableWriteItems withHashAndRangeKeysToDelete(
String hashKeyName, String rangeKeyName,
Object... alternatingHashAndRangeKeyValues) {
if (hashKeyName == null)
throw new IllegalArgumentException("hash key name must be specified");
if (rangeKeyName == null)
throw new IllegalArgumentException("range key name must be specified");
if (alternatingHashAndRangeKeyValues.length % 2 != 0)
throw new IllegalArgumentException("number of hash and range key values must be the same");
final int len = alternatingHashAndRangeKeyValues.length / 2;
PrimaryKey[] primaryKeys = new PrimaryKey[len];
for (int i=0; i < alternatingHashAndRangeKeyValues.length; i += 2) {
primaryKeys[i >> 1] = new PrimaryKey(
hashKeyName, alternatingHashAndRangeKeyValues[i],
rangeKeyName, alternatingHashAndRangeKeyValues[i+1]);
}
return withPrimaryKeysToDelete(primaryKeys);
}
|
[
"public",
"TableWriteItems",
"withHashAndRangeKeysToDelete",
"(",
"String",
"hashKeyName",
",",
"String",
"rangeKeyName",
",",
"Object",
"...",
"alternatingHashAndRangeKeyValues",
")",
"{",
"if",
"(",
"hashKeyName",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"hash key name must be specified\"",
")",
";",
"if",
"(",
"rangeKeyName",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"range key name must be specified\"",
")",
";",
"if",
"(",
"alternatingHashAndRangeKeyValues",
".",
"length",
"%",
"2",
"!=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"number of hash and range key values must be the same\"",
")",
";",
"final",
"int",
"len",
"=",
"alternatingHashAndRangeKeyValues",
".",
"length",
"/",
"2",
";",
"PrimaryKey",
"[",
"]",
"primaryKeys",
"=",
"new",
"PrimaryKey",
"[",
"len",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"alternatingHashAndRangeKeyValues",
".",
"length",
";",
"i",
"+=",
"2",
")",
"{",
"primaryKeys",
"[",
"i",
">>",
"1",
"]",
"=",
"new",
"PrimaryKey",
"(",
"hashKeyName",
",",
"alternatingHashAndRangeKeyValues",
"[",
"i",
"]",
",",
"rangeKeyName",
",",
"alternatingHashAndRangeKeyValues",
"[",
"i",
"+",
"1",
"]",
")",
";",
"}",
"return",
"withPrimaryKeysToDelete",
"(",
"primaryKeys",
")",
";",
"}"
] |
Used to specify multiple hash-and-range primary keys to be deleted
from the current table.
@param hashKeyName
hash key name
@param rangeKeyName
range key name
@param alternatingHashAndRangeKeyValues
a list of alternating hash key value and range key value
|
[
"Used",
"to",
"specify",
"multiple",
"hash",
"-",
"and",
"-",
"range",
"primary",
"keys",
"to",
"be",
"deleted",
"from",
"the",
"current",
"table",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L104-L121
|
20,157
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.addPrimaryKeyToDelete
|
public TableWriteItems addPrimaryKeyToDelete(PrimaryKey primaryKey) {
if (primaryKey != null) {
if (primaryKeysToDelete == null)
primaryKeysToDelete = new ArrayList<PrimaryKey>();
checkConsistency(primaryKey);
this.primaryKeysToDelete.add(primaryKey);
}
return this;
}
|
java
|
public TableWriteItems addPrimaryKeyToDelete(PrimaryKey primaryKey) {
if (primaryKey != null) {
if (primaryKeysToDelete == null)
primaryKeysToDelete = new ArrayList<PrimaryKey>();
checkConsistency(primaryKey);
this.primaryKeysToDelete.add(primaryKey);
}
return this;
}
|
[
"public",
"TableWriteItems",
"addPrimaryKeyToDelete",
"(",
"PrimaryKey",
"primaryKey",
")",
"{",
"if",
"(",
"primaryKey",
"!=",
"null",
")",
"{",
"if",
"(",
"primaryKeysToDelete",
"==",
"null",
")",
"primaryKeysToDelete",
"=",
"new",
"ArrayList",
"<",
"PrimaryKey",
">",
"(",
")",
";",
"checkConsistency",
"(",
"primaryKey",
")",
";",
"this",
".",
"primaryKeysToDelete",
".",
"add",
"(",
"primaryKey",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
Adds a primary key to be deleted in a batch write-item operation. A
primary key could consist of either a hash-key or both a
hash-key and a range-key depending on the schema of the table.
|
[
"Adds",
"a",
"primary",
"key",
"to",
"be",
"deleted",
"in",
"a",
"batch",
"write",
"-",
"item",
"operation",
".",
"A",
"primary",
"key",
"could",
"consist",
"of",
"either",
"a",
"hash",
"-",
"key",
"or",
"both",
"a",
"hash",
"-",
"key",
"and",
"a",
"range",
"-",
"key",
"depending",
"on",
"the",
"schema",
"of",
"the",
"table",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L128-L136
|
20,158
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.addHashOnlyPrimaryKeyToDelete
|
public TableWriteItems addHashOnlyPrimaryKeyToDelete(
String hashKeyName, Object hashKeyValue) {
this.addPrimaryKeyToDelete(new PrimaryKey(hashKeyName, hashKeyValue));
return this;
}
|
java
|
public TableWriteItems addHashOnlyPrimaryKeyToDelete(
String hashKeyName, Object hashKeyValue) {
this.addPrimaryKeyToDelete(new PrimaryKey(hashKeyName, hashKeyValue));
return this;
}
|
[
"public",
"TableWriteItems",
"addHashOnlyPrimaryKeyToDelete",
"(",
"String",
"hashKeyName",
",",
"Object",
"hashKeyValue",
")",
"{",
"this",
".",
"addPrimaryKeyToDelete",
"(",
"new",
"PrimaryKey",
"(",
"hashKeyName",
",",
"hashKeyValue",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Adds a hash-only primary key to be deleted in a batch write
operation.
@param hashKeyName name of the hash key attribute name
@param hashKeyValue name of the hash key value
@return the current instance for method chaining purposes
|
[
"Adds",
"a",
"hash",
"-",
"only",
"primary",
"key",
"to",
"be",
"deleted",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L156-L160
|
20,159
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.addHashOnlyPrimaryKeysToDelete
|
public TableWriteItems addHashOnlyPrimaryKeysToDelete(String hashKeyName,
Object ... hashKeyValues) {
for (Object hashKeyValue: hashKeyValues) {
this.addPrimaryKeyToDelete(new PrimaryKey(hashKeyName, hashKeyValue));
}
return this;
}
|
java
|
public TableWriteItems addHashOnlyPrimaryKeysToDelete(String hashKeyName,
Object ... hashKeyValues) {
for (Object hashKeyValue: hashKeyValues) {
this.addPrimaryKeyToDelete(new PrimaryKey(hashKeyName, hashKeyValue));
}
return this;
}
|
[
"public",
"TableWriteItems",
"addHashOnlyPrimaryKeysToDelete",
"(",
"String",
"hashKeyName",
",",
"Object",
"...",
"hashKeyValues",
")",
"{",
"for",
"(",
"Object",
"hashKeyValue",
":",
"hashKeyValues",
")",
"{",
"this",
".",
"addPrimaryKeyToDelete",
"(",
"new",
"PrimaryKey",
"(",
"hashKeyName",
",",
"hashKeyValue",
")",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
Adds multiple hash-only primary keys to be deleted in a batch write
operation.
@param hashKeyName name of the hash key attribute name
@param hashKeyValues multiple hash key values
@return the current instance for method chaining purposes
|
[
"Adds",
"multiple",
"hash",
"-",
"only",
"primary",
"keys",
"to",
"be",
"deleted",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L170-L176
|
20,160
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.addHashAndRangePrimaryKeysToDelete
|
public TableWriteItems addHashAndRangePrimaryKeysToDelete(
String hashKeyName, String rangeKeyName,
Object ... alternatingHashRangeKeyValues) {
if (alternatingHashRangeKeyValues.length % 2 != 0) {
throw new IllegalArgumentException(
"The multiple hash and range key values must alternate");
}
for (int i =0; i < alternatingHashRangeKeyValues.length; i+=2) {
Object hashKeyValue = alternatingHashRangeKeyValues[i];
Object rangeKeyValue = alternatingHashRangeKeyValues[i+1];
this.addPrimaryKeyToDelete(
new PrimaryKey()
.addComponent(hashKeyName, hashKeyValue)
.addComponent(rangeKeyName, rangeKeyValue)
);
}
return this;
}
|
java
|
public TableWriteItems addHashAndRangePrimaryKeysToDelete(
String hashKeyName, String rangeKeyName,
Object ... alternatingHashRangeKeyValues) {
if (alternatingHashRangeKeyValues.length % 2 != 0) {
throw new IllegalArgumentException(
"The multiple hash and range key values must alternate");
}
for (int i =0; i < alternatingHashRangeKeyValues.length; i+=2) {
Object hashKeyValue = alternatingHashRangeKeyValues[i];
Object rangeKeyValue = alternatingHashRangeKeyValues[i+1];
this.addPrimaryKeyToDelete(
new PrimaryKey()
.addComponent(hashKeyName, hashKeyValue)
.addComponent(rangeKeyName, rangeKeyValue)
);
}
return this;
}
|
[
"public",
"TableWriteItems",
"addHashAndRangePrimaryKeysToDelete",
"(",
"String",
"hashKeyName",
",",
"String",
"rangeKeyName",
",",
"Object",
"...",
"alternatingHashRangeKeyValues",
")",
"{",
"if",
"(",
"alternatingHashRangeKeyValues",
".",
"length",
"%",
"2",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The multiple hash and range key values must alternate\"",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"alternatingHashRangeKeyValues",
".",
"length",
";",
"i",
"+=",
"2",
")",
"{",
"Object",
"hashKeyValue",
"=",
"alternatingHashRangeKeyValues",
"[",
"i",
"]",
";",
"Object",
"rangeKeyValue",
"=",
"alternatingHashRangeKeyValues",
"[",
"i",
"+",
"1",
"]",
";",
"this",
".",
"addPrimaryKeyToDelete",
"(",
"new",
"PrimaryKey",
"(",
")",
".",
"addComponent",
"(",
"hashKeyName",
",",
"hashKeyValue",
")",
".",
"addComponent",
"(",
"rangeKeyName",
",",
"rangeKeyValue",
")",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
Adds multiple hash-and-range primary keys to be deleted in a batch
write operation.
@param hashKeyName
name of the hash key attribute name
@param rangeKeyName
name of the range key attribute name
@param alternatingHashRangeKeyValues
used to specify multiple alternating hash key and range key
values
@return the current instance for method chaining purposes
|
[
"Adds",
"multiple",
"hash",
"-",
"and",
"-",
"range",
"primary",
"keys",
"to",
"be",
"deleted",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L191-L208
|
20,161
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.withItemsToPut
|
public TableWriteItems withItemsToPut(Item ... itemsToPut) {
if (itemsToPut == null)
this.itemsToPut = null;
else
this.itemsToPut = new ArrayList<Item>(Arrays.asList(itemsToPut));
return this;
}
|
java
|
public TableWriteItems withItemsToPut(Item ... itemsToPut) {
if (itemsToPut == null)
this.itemsToPut = null;
else
this.itemsToPut = new ArrayList<Item>(Arrays.asList(itemsToPut));
return this;
}
|
[
"public",
"TableWriteItems",
"withItemsToPut",
"(",
"Item",
"...",
"itemsToPut",
")",
"{",
"if",
"(",
"itemsToPut",
"==",
"null",
")",
"this",
".",
"itemsToPut",
"=",
"null",
";",
"else",
"this",
".",
"itemsToPut",
"=",
"new",
"ArrayList",
"<",
"Item",
">",
"(",
"Arrays",
".",
"asList",
"(",
"itemsToPut",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Used to specify the items to be put in the current table in a batch write
operation.
@return the current instance for method chaining purposes
|
[
"Used",
"to",
"specify",
"the",
"items",
"to",
"be",
"put",
"in",
"the",
"current",
"table",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L236-L242
|
20,162
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.withItemsToPut
|
public TableWriteItems withItemsToPut(Collection<Item> itemsToPut) {
if (itemsToPut == null)
this.itemsToPut = null;
else
this.itemsToPut = new ArrayList<Item>(itemsToPut);
return this;
}
|
java
|
public TableWriteItems withItemsToPut(Collection<Item> itemsToPut) {
if (itemsToPut == null)
this.itemsToPut = null;
else
this.itemsToPut = new ArrayList<Item>(itemsToPut);
return this;
}
|
[
"public",
"TableWriteItems",
"withItemsToPut",
"(",
"Collection",
"<",
"Item",
">",
"itemsToPut",
")",
"{",
"if",
"(",
"itemsToPut",
"==",
"null",
")",
"this",
".",
"itemsToPut",
"=",
"null",
";",
"else",
"this",
".",
"itemsToPut",
"=",
"new",
"ArrayList",
"<",
"Item",
">",
"(",
"itemsToPut",
")",
";",
"return",
"this",
";",
"}"
] |
Used to specify the collection of items to be put in the current table in
a batch write operation.
@return the current instance for method chaining purposes
|
[
"Used",
"to",
"specify",
"the",
"collection",
"of",
"items",
"to",
"be",
"put",
"in",
"the",
"current",
"table",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L250-L256
|
20,163
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java
|
TableWriteItems.addItemToPut
|
public TableWriteItems addItemToPut(Item item) {
if (item != null) {
if (itemsToPut == null)
itemsToPut = new ArrayList<Item>();
this.itemsToPut.add(item);
}
return this;
}
|
java
|
public TableWriteItems addItemToPut(Item item) {
if (item != null) {
if (itemsToPut == null)
itemsToPut = new ArrayList<Item>();
this.itemsToPut.add(item);
}
return this;
}
|
[
"public",
"TableWriteItems",
"addItemToPut",
"(",
"Item",
"item",
")",
"{",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"if",
"(",
"itemsToPut",
"==",
"null",
")",
"itemsToPut",
"=",
"new",
"ArrayList",
"<",
"Item",
">",
"(",
")",
";",
"this",
".",
"itemsToPut",
".",
"add",
"(",
"item",
")",
";",
"}",
"return",
"this",
";",
"}"
] |
Adds an item to be put to the current table in a batch write operation.
|
[
"Adds",
"an",
"item",
"to",
"be",
"put",
"to",
"the",
"current",
"table",
"in",
"a",
"batch",
"write",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java#L275-L282
|
20,164
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/Condition.java
|
Condition.setEq
|
public void setEq(java.util.Collection<String> eq) {
if (eq == null) {
this.eq = null;
return;
}
this.eq = new java.util.ArrayList<String>(eq);
}
|
java
|
public void setEq(java.util.Collection<String> eq) {
if (eq == null) {
this.eq = null;
return;
}
this.eq = new java.util.ArrayList<String>(eq);
}
|
[
"public",
"void",
"setEq",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"eq",
")",
"{",
"if",
"(",
"eq",
"==",
"null",
")",
"{",
"this",
".",
"eq",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"eq",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"String",
">",
"(",
"eq",
")",
";",
"}"
] |
Represents the equal condition to be applied to a single field when querying for findings.
@param eq
Represents the equal condition to be applied to a single field when querying for findings.
|
[
"Represents",
"the",
"equal",
"condition",
"to",
"be",
"applied",
"to",
"a",
"single",
"field",
"when",
"querying",
"for",
"findings",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/Condition.java#L59-L66
|
20,165
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/Condition.java
|
Condition.setNeq
|
public void setNeq(java.util.Collection<String> neq) {
if (neq == null) {
this.neq = null;
return;
}
this.neq = new java.util.ArrayList<String>(neq);
}
|
java
|
public void setNeq(java.util.Collection<String> neq) {
if (neq == null) {
this.neq = null;
return;
}
this.neq = new java.util.ArrayList<String>(neq);
}
|
[
"public",
"void",
"setNeq",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"neq",
")",
"{",
"if",
"(",
"neq",
"==",
"null",
")",
"{",
"this",
".",
"neq",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"neq",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"String",
">",
"(",
"neq",
")",
";",
"}"
] |
Represents the not equal condition to be applied to a single field when querying for findings.
@param neq
Represents the not equal condition to be applied to a single field when querying for findings.
|
[
"Represents",
"the",
"not",
"equal",
"condition",
"to",
"be",
"applied",
"to",
"a",
"single",
"field",
"when",
"querying",
"for",
"findings",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/Condition.java#L257-L264
|
20,166
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java
|
AbstractTransfer.waitForCompletion
|
public void waitForCompletion()
throws AmazonClientException, AmazonServiceException, InterruptedException {
try {
Object result = null;
while (!monitor.isDone() || result == null) {
Future<?> f = monitor.getFuture();
result = f.get();
}
} catch (ExecutionException e) {
rethrowExecutionException(e);
}
}
|
java
|
public void waitForCompletion()
throws AmazonClientException, AmazonServiceException, InterruptedException {
try {
Object result = null;
while (!monitor.isDone() || result == null) {
Future<?> f = monitor.getFuture();
result = f.get();
}
} catch (ExecutionException e) {
rethrowExecutionException(e);
}
}
|
[
"public",
"void",
"waitForCompletion",
"(",
")",
"throws",
"AmazonClientException",
",",
"AmazonServiceException",
",",
"InterruptedException",
"{",
"try",
"{",
"Object",
"result",
"=",
"null",
";",
"while",
"(",
"!",
"monitor",
".",
"isDone",
"(",
")",
"||",
"result",
"==",
"null",
")",
"{",
"Future",
"<",
"?",
">",
"f",
"=",
"monitor",
".",
"getFuture",
"(",
")",
";",
"result",
"=",
"f",
".",
"get",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"ExecutionException",
"e",
")",
"{",
"rethrowExecutionException",
"(",
"e",
")",
";",
"}",
"}"
] |
Waits for this transfer to complete. This is a blocking call; the current
thread is suspended until this transfer completes.
@throws AmazonClientException
If any errors were encountered in the client while making the
request or handling the response.
@throws AmazonServiceException
If any errors occurred in Amazon S3 while processing the
request.
@throws InterruptedException
If this thread is interrupted while waiting for the transfer
to complete.
|
[
"Waits",
"for",
"this",
"transfer",
"to",
"complete",
".",
"This",
"is",
"a",
"blocking",
"call",
";",
"the",
"current",
"thread",
"is",
"suspended",
"until",
"this",
"transfer",
"completes",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java#L94-L106
|
20,167
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java
|
AbstractTransfer.setState
|
public void setState(TransferState state) {
synchronized (this) {
this.state = state;
}
for ( TransferStateChangeListener listener : stateChangeListeners ) {
listener.transferStateChanged(this, state);
}
}
|
java
|
public void setState(TransferState state) {
synchronized (this) {
this.state = state;
}
for ( TransferStateChangeListener listener : stateChangeListeners ) {
listener.transferStateChanged(this, state);
}
}
|
[
"public",
"void",
"setState",
"(",
"TransferState",
"state",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"state",
"=",
"state",
";",
"}",
"for",
"(",
"TransferStateChangeListener",
"listener",
":",
"stateChangeListeners",
")",
"{",
"listener",
".",
"transferStateChanged",
"(",
"this",
",",
"state",
")",
";",
"}",
"}"
] |
Sets the current state of this transfer.
|
[
"Sets",
"the",
"current",
"state",
"of",
"this",
"transfer",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java#L160-L167
|
20,168
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java
|
AbstractTransfer.unwrapExecutionException
|
protected AmazonClientException unwrapExecutionException(ExecutionException e) {
Throwable t = e;
while (t.getCause() != null && t instanceof ExecutionException) {
t = t.getCause();
}
if (t instanceof AmazonClientException) {
return (AmazonClientException) t;
}
return new AmazonClientException("Unable to complete transfer: " + t.getMessage(), t);
}
|
java
|
protected AmazonClientException unwrapExecutionException(ExecutionException e) {
Throwable t = e;
while (t.getCause() != null && t instanceof ExecutionException) {
t = t.getCause();
}
if (t instanceof AmazonClientException) {
return (AmazonClientException) t;
}
return new AmazonClientException("Unable to complete transfer: " + t.getMessage(), t);
}
|
[
"protected",
"AmazonClientException",
"unwrapExecutionException",
"(",
"ExecutionException",
"e",
")",
"{",
"Throwable",
"t",
"=",
"e",
";",
"while",
"(",
"t",
".",
"getCause",
"(",
")",
"!=",
"null",
"&&",
"t",
"instanceof",
"ExecutionException",
")",
"{",
"t",
"=",
"t",
".",
"getCause",
"(",
")",
";",
"}",
"if",
"(",
"t",
"instanceof",
"AmazonClientException",
")",
"{",
"return",
"(",
"AmazonClientException",
")",
"t",
";",
"}",
"return",
"new",
"AmazonClientException",
"(",
"\"Unable to complete transfer: \"",
"+",
"t",
".",
"getMessage",
"(",
")",
",",
"t",
")",
";",
"}"
] |
Unwraps the root exception that caused the specified ExecutionException
and returns it. If it was not an instance of AmazonClientException, it is
wrapped as an AmazonClientException.
@param e
The ExecutionException to unwrap.
@return The root exception that caused the specified ExecutionException.
|
[
"Unwraps",
"the",
"root",
"exception",
"that",
"caused",
"the",
"specified",
"ExecutionException",
"and",
"returns",
"it",
".",
"If",
"it",
"was",
"not",
"an",
"instance",
"of",
"AmazonClientException",
"it",
"is",
"wrapped",
"as",
"an",
"AmazonClientException",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/AbstractTransfer.java#L278-L287
|
20,169
|
aws/aws-sdk-java
|
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/GetConsoleOutputResult.java
|
GetConsoleOutputResult.getDecodedOutput
|
public String getDecodedOutput() {
byte[] bytes = com.amazonaws.util.BinaryUtils.fromBase64(output);
return new String(bytes, com.amazonaws.util.StringUtils.UTF8);
}
|
java
|
public String getDecodedOutput() {
byte[] bytes = com.amazonaws.util.BinaryUtils.fromBase64(output);
return new String(bytes, com.amazonaws.util.StringUtils.UTF8);
}
|
[
"public",
"String",
"getDecodedOutput",
"(",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"com",
".",
"amazonaws",
".",
"util",
".",
"BinaryUtils",
".",
"fromBase64",
"(",
"output",
")",
";",
"return",
"new",
"String",
"(",
"bytes",
",",
"com",
".",
"amazonaws",
".",
"util",
".",
"StringUtils",
".",
"UTF8",
")",
";",
"}"
] |
The decoded console output.
@return The decoded console output.
|
[
"The",
"decoded",
"console",
"output",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/GetConsoleOutputResult.java#L173-L176
|
20,170
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CreateApplicationRequest.java
|
CreateApplicationRequest.withTags
|
public CreateApplicationRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
java
|
public CreateApplicationRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
}
|
[
"public",
"CreateApplicationRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] |
The Tags for the app.
@param tags
The Tags for the app.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"The",
"Tags",
"for",
"the",
"app",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CreateApplicationRequest.java#L97-L100
|
20,171
|
aws/aws-sdk-java
|
aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/internal/netty/handler/PutMediaDecoder.java
|
PutMediaDecoder.decodeAckEvent
|
private static void decodeAckEvent(ByteBuf in, List<Object> decodedOut) throws IOException {
int readerIndex = in.readerIndex();
int writerIndex = in.writerIndex();
for (; readerIndex < writerIndex; ++readerIndex) {
// Read one byte at a time to avoid incrementing reader index
byte c = in.getByte(readerIndex);
if (NEW_LINE == c) {
ByteBuf json = extractObject(in, in.readerIndex(), readerIndex - in.readerIndex());
if (json != null) {
decodedOut.add(unmarshall(json));
}
in.readerIndex(readerIndex + 1);
in.discardReadBytes();
// Reader and writer index shift after discard. Update them
readerIndex = in.readerIndex();
writerIndex = in.writerIndex();
ReferenceCountUtil.release(json);
}
}
}
|
java
|
private static void decodeAckEvent(ByteBuf in, List<Object> decodedOut) throws IOException {
int readerIndex = in.readerIndex();
int writerIndex = in.writerIndex();
for (; readerIndex < writerIndex; ++readerIndex) {
// Read one byte at a time to avoid incrementing reader index
byte c = in.getByte(readerIndex);
if (NEW_LINE == c) {
ByteBuf json = extractObject(in, in.readerIndex(), readerIndex - in.readerIndex());
if (json != null) {
decodedOut.add(unmarshall(json));
}
in.readerIndex(readerIndex + 1);
in.discardReadBytes();
// Reader and writer index shift after discard. Update them
readerIndex = in.readerIndex();
writerIndex = in.writerIndex();
ReferenceCountUtil.release(json);
}
}
}
|
[
"private",
"static",
"void",
"decodeAckEvent",
"(",
"ByteBuf",
"in",
",",
"List",
"<",
"Object",
">",
"decodedOut",
")",
"throws",
"IOException",
"{",
"int",
"readerIndex",
"=",
"in",
".",
"readerIndex",
"(",
")",
";",
"int",
"writerIndex",
"=",
"in",
".",
"writerIndex",
"(",
")",
";",
"for",
"(",
";",
"readerIndex",
"<",
"writerIndex",
";",
"++",
"readerIndex",
")",
"{",
"// Read one byte at a time to avoid incrementing reader index",
"byte",
"c",
"=",
"in",
".",
"getByte",
"(",
"readerIndex",
")",
";",
"if",
"(",
"NEW_LINE",
"==",
"c",
")",
"{",
"ByteBuf",
"json",
"=",
"extractObject",
"(",
"in",
",",
"in",
".",
"readerIndex",
"(",
")",
",",
"readerIndex",
"-",
"in",
".",
"readerIndex",
"(",
")",
")",
";",
"if",
"(",
"json",
"!=",
"null",
")",
"{",
"decodedOut",
".",
"add",
"(",
"unmarshall",
"(",
"json",
")",
")",
";",
"}",
"in",
".",
"readerIndex",
"(",
"readerIndex",
"+",
"1",
")",
";",
"in",
".",
"discardReadBytes",
"(",
")",
";",
"// Reader and writer index shift after discard. Update them",
"readerIndex",
"=",
"in",
".",
"readerIndex",
"(",
")",
";",
"writerIndex",
"=",
"in",
".",
"writerIndex",
"(",
")",
";",
"ReferenceCountUtil",
".",
"release",
"(",
"json",
")",
";",
"}",
"}",
"}"
] |
Decode ByteBuf to AckEvent objects.
@param in byte buf
@param decodedOut list of AckEvent objects
|
[
"Decode",
"ByteBuf",
"to",
"AckEvent",
"objects",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/internal/netty/handler/PutMediaDecoder.java#L63-L83
|
20,172
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.addFlowOutputs
|
@Override
public AddFlowOutputsResult addFlowOutputs(AddFlowOutputsRequest request) {
request = beforeClientExecution(request);
return executeAddFlowOutputs(request);
}
|
java
|
@Override
public AddFlowOutputsResult addFlowOutputs(AddFlowOutputsRequest request) {
request = beforeClientExecution(request);
return executeAddFlowOutputs(request);
}
|
[
"@",
"Override",
"public",
"AddFlowOutputsResult",
"addFlowOutputs",
"(",
"AddFlowOutputsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeAddFlowOutputs",
"(",
"request",
")",
";",
"}"
] |
Adds outputs to an existing flow. You can create up to 20 outputs per flow.
@param addFlowOutputsRequest
A request to add outputs to the specified flow.
@return Result of the AddFlowOutputs operation returned by the service.
@throws AddFlowOutputs420Exception
AWS Elemental MediaConnect can't complete this request because this flow already has the maximum number
of allowed outputs (20). For more information, contact AWS Customer Support.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.AddFlowOutputs
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs" target="_top">AWS
API Documentation</a>
|
[
"Adds",
"outputs",
"to",
"an",
"existing",
"flow",
".",
"You",
"can",
"create",
"up",
"to",
"20",
"outputs",
"per",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L178-L182
|
20,173
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.deleteFlow
|
@Override
public DeleteFlowResult deleteFlow(DeleteFlowRequest request) {
request = beforeClientExecution(request);
return executeDeleteFlow(request);
}
|
java
|
@Override
public DeleteFlowResult deleteFlow(DeleteFlowRequest request) {
request = beforeClientExecution(request);
return executeDeleteFlow(request);
}
|
[
"@",
"Override",
"public",
"DeleteFlowResult",
"deleteFlow",
"(",
"DeleteFlowRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteFlow",
"(",
"request",
")",
";",
"}"
] |
Deletes a flow. Before you can delete a flow, you must stop the flow.
@param deleteFlowRequest
@return Result of the DeleteFlow operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.DeleteFlow
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow" target="_top">AWS API
Documentation</a>
|
[
"Deletes",
"a",
"flow",
".",
"Before",
"you",
"can",
"delete",
"a",
"flow",
"you",
"must",
"stop",
"the",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L306-L310
|
20,174
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.describeFlow
|
@Override
public DescribeFlowResult describeFlow(DescribeFlowRequest request) {
request = beforeClientExecution(request);
return executeDescribeFlow(request);
}
|
java
|
@Override
public DescribeFlowResult describeFlow(DescribeFlowRequest request) {
request = beforeClientExecution(request);
return executeDescribeFlow(request);
}
|
[
"@",
"Override",
"public",
"DescribeFlowResult",
"describeFlow",
"(",
"DescribeFlowRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDescribeFlow",
"(",
"request",
")",
";",
"}"
] |
Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as
details about the source, outputs, and entitlements.
@param describeFlowRequest
@return Result of the DescribeFlow operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.DescribeFlow
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow" target="_top">AWS API
Documentation</a>
|
[
"Displays",
"the",
"details",
"of",
"a",
"flow",
".",
"The",
"response",
"includes",
"the",
"flow",
"ARN",
"name",
"and",
"Availability",
"Zone",
"as",
"well",
"as",
"details",
"about",
"the",
"source",
"outputs",
"and",
"entitlements",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L369-L373
|
20,175
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.grantFlowEntitlements
|
@Override
public GrantFlowEntitlementsResult grantFlowEntitlements(GrantFlowEntitlementsRequest request) {
request = beforeClientExecution(request);
return executeGrantFlowEntitlements(request);
}
|
java
|
@Override
public GrantFlowEntitlementsResult grantFlowEntitlements(GrantFlowEntitlementsRequest request) {
request = beforeClientExecution(request);
return executeGrantFlowEntitlements(request);
}
|
[
"@",
"Override",
"public",
"GrantFlowEntitlementsResult",
"grantFlowEntitlements",
"(",
"GrantFlowEntitlementsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeGrantFlowEntitlements",
"(",
"request",
")",
";",
"}"
] |
Grants entitlements to an existing flow.
@param grantFlowEntitlementsRequest
A request to grant entitlements on a flow.
@return Result of the GrantFlowEntitlements operation returned by the service.
@throws GrantFlowEntitlements420Exception
AWS Elemental MediaConnect can't complete this request because this flow already has the maximum number
of allowed entitlements (50). For more information, contact AWS Customer Support.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.GrantFlowEntitlements
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements"
target="_top">AWS API Documentation</a>
|
[
"Grants",
"entitlements",
"to",
"an",
"existing",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L435-L439
|
20,176
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.listEntitlements
|
@Override
public ListEntitlementsResult listEntitlements(ListEntitlementsRequest request) {
request = beforeClientExecution(request);
return executeListEntitlements(request);
}
|
java
|
@Override
public ListEntitlementsResult listEntitlements(ListEntitlementsRequest request) {
request = beforeClientExecution(request);
return executeListEntitlements(request);
}
|
[
"@",
"Override",
"public",
"ListEntitlementsResult",
"listEntitlements",
"(",
"ListEntitlementsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListEntitlements",
"(",
"request",
")",
";",
"}"
] |
Displays a list of all entitlements that have been granted to this account. This request returns 20 results per
page.
@param listEntitlementsRequest
@return Result of the ListEntitlements operation returned by the service.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@sample AWSMediaConnect.ListEntitlements
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements" target="_top">AWS
API Documentation</a>
|
[
"Displays",
"a",
"list",
"of",
"all",
"entitlements",
"that",
"have",
"been",
"granted",
"to",
"this",
"account",
".",
"This",
"request",
"returns",
"20",
"results",
"per",
"page",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L495-L499
|
20,177
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.listFlows
|
@Override
public ListFlowsResult listFlows(ListFlowsRequest request) {
request = beforeClientExecution(request);
return executeListFlows(request);
}
|
java
|
@Override
public ListFlowsResult listFlows(ListFlowsRequest request) {
request = beforeClientExecution(request);
return executeListFlows(request);
}
|
[
"@",
"Override",
"public",
"ListFlowsResult",
"listFlows",
"(",
"ListFlowsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListFlows",
"(",
"request",
")",
";",
"}"
] |
Displays a list of flows that are associated with this account. This request returns a paginated result.
@param listFlowsRequest
@return Result of the ListFlows operation returned by the service.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@sample AWSMediaConnect.ListFlows
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows" target="_top">AWS API
Documentation</a>
|
[
"Displays",
"a",
"list",
"of",
"flows",
"that",
"are",
"associated",
"with",
"this",
"account",
".",
"This",
"request",
"returns",
"a",
"paginated",
"result",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L553-L557
|
20,178
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.removeFlowOutput
|
@Override
public RemoveFlowOutputResult removeFlowOutput(RemoveFlowOutputRequest request) {
request = beforeClientExecution(request);
return executeRemoveFlowOutput(request);
}
|
java
|
@Override
public RemoveFlowOutputResult removeFlowOutput(RemoveFlowOutputRequest request) {
request = beforeClientExecution(request);
return executeRemoveFlowOutput(request);
}
|
[
"@",
"Override",
"public",
"RemoveFlowOutputResult",
"removeFlowOutput",
"(",
"RemoveFlowOutputRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRemoveFlowOutput",
"(",
"request",
")",
";",
"}"
] |
Removes an output from an existing flow. This request can be made only on an output that does not have an
entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When
an entitlement is revoked from a flow, the service automatically removes the associated output.
@param removeFlowOutputRequest
@return Result of the RemoveFlowOutput operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.RemoveFlowOutput
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput" target="_top">AWS
API Documentation</a>
|
[
"Removes",
"an",
"output",
"from",
"an",
"existing",
"flow",
".",
"This",
"request",
"can",
"be",
"made",
"only",
"on",
"an",
"output",
"that",
"does",
"not",
"have",
"an",
"entitlement",
"associated",
"with",
"it",
".",
"If",
"the",
"output",
"has",
"an",
"entitlement",
"you",
"must",
"revoke",
"the",
"entitlement",
"instead",
".",
"When",
"an",
"entitlement",
"is",
"revoked",
"from",
"a",
"flow",
"the",
"service",
"automatically",
"removes",
"the",
"associated",
"output",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L673-L677
|
20,179
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.revokeFlowEntitlement
|
@Override
public RevokeFlowEntitlementResult revokeFlowEntitlement(RevokeFlowEntitlementRequest request) {
request = beforeClientExecution(request);
return executeRevokeFlowEntitlement(request);
}
|
java
|
@Override
public RevokeFlowEntitlementResult revokeFlowEntitlement(RevokeFlowEntitlementRequest request) {
request = beforeClientExecution(request);
return executeRevokeFlowEntitlement(request);
}
|
[
"@",
"Override",
"public",
"RevokeFlowEntitlementResult",
"revokeFlowEntitlement",
"(",
"RevokeFlowEntitlementRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeRevokeFlowEntitlement",
"(",
"request",
")",
";",
"}"
] |
Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the
subscriber and the associated output is removed.
@param revokeFlowEntitlementRequest
@return Result of the RevokeFlowEntitlement operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.RevokeFlowEntitlement
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement"
target="_top">AWS API Documentation</a>
|
[
"Revokes",
"an",
"entitlement",
"from",
"a",
"flow",
".",
"Once",
"an",
"entitlement",
"is",
"revoked",
"the",
"content",
"becomes",
"unavailable",
"to",
"the",
"subscriber",
"and",
"the",
"associated",
"output",
"is",
"removed",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L736-L740
|
20,180
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.startFlow
|
@Override
public StartFlowResult startFlow(StartFlowRequest request) {
request = beforeClientExecution(request);
return executeStartFlow(request);
}
|
java
|
@Override
public StartFlowResult startFlow(StartFlowRequest request) {
request = beforeClientExecution(request);
return executeStartFlow(request);
}
|
[
"@",
"Override",
"public",
"StartFlowResult",
"startFlow",
"(",
"StartFlowRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStartFlow",
"(",
"request",
")",
";",
"}"
] |
Starts a flow.
@param startFlowRequest
@return Result of the StartFlow operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.StartFlow
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow" target="_top">AWS API
Documentation</a>
|
[
"Starts",
"a",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L799-L803
|
20,181
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.stopFlow
|
@Override
public StopFlowResult stopFlow(StopFlowRequest request) {
request = beforeClientExecution(request);
return executeStopFlow(request);
}
|
java
|
@Override
public StopFlowResult stopFlow(StopFlowRequest request) {
request = beforeClientExecution(request);
return executeStopFlow(request);
}
|
[
"@",
"Override",
"public",
"StopFlowResult",
"stopFlow",
"(",
"StopFlowRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeStopFlow",
"(",
"request",
")",
";",
"}"
] |
Stops a flow.
@param stopFlowRequest
@return Result of the StopFlow operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.StopFlow
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow" target="_top">AWS API
Documentation</a>
|
[
"Stops",
"a",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L861-L865
|
20,182
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.updateFlowEntitlement
|
@Override
public UpdateFlowEntitlementResult updateFlowEntitlement(UpdateFlowEntitlementRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowEntitlement(request);
}
|
java
|
@Override
public UpdateFlowEntitlementResult updateFlowEntitlement(UpdateFlowEntitlementRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowEntitlement(request);
}
|
[
"@",
"Override",
"public",
"UpdateFlowEntitlementResult",
"updateFlowEntitlement",
"(",
"UpdateFlowEntitlementRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateFlowEntitlement",
"(",
"request",
")",
";",
"}"
] |
You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the
service will remove the outputs that are are used by the subscribers that are removed.
@param updateFlowEntitlementRequest
The entitlement fields that you want to update.
@return Result of the UpdateFlowEntitlement operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.UpdateFlowEntitlement
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement"
target="_top">AWS API Documentation</a>
|
[
"You",
"can",
"change",
"an",
"entitlement",
"s",
"description",
"subscribers",
"and",
"encryption",
".",
"If",
"you",
"change",
"the",
"subscribers",
"the",
"service",
"will",
"remove",
"the",
"outputs",
"that",
"are",
"are",
"used",
"by",
"the",
"subscribers",
"that",
"are",
"removed",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L1041-L1045
|
20,183
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.updateFlowOutput
|
@Override
public UpdateFlowOutputResult updateFlowOutput(UpdateFlowOutputRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowOutput(request);
}
|
java
|
@Override
public UpdateFlowOutputResult updateFlowOutput(UpdateFlowOutputRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowOutput(request);
}
|
[
"@",
"Override",
"public",
"UpdateFlowOutputResult",
"updateFlowOutput",
"(",
"UpdateFlowOutputRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateFlowOutput",
"(",
"request",
")",
";",
"}"
] |
Updates an existing flow output.
@param updateFlowOutputRequest
The fields that you want to update in the output.
@return Result of the UpdateFlowOutput operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.UpdateFlowOutput
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput" target="_top">AWS
API Documentation</a>
|
[
"Updates",
"an",
"existing",
"flow",
"output",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L1105-L1109
|
20,184
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java
|
AWSMediaConnectClient.updateFlowSource
|
@Override
public UpdateFlowSourceResult updateFlowSource(UpdateFlowSourceRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowSource(request);
}
|
java
|
@Override
public UpdateFlowSourceResult updateFlowSource(UpdateFlowSourceRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlowSource(request);
}
|
[
"@",
"Override",
"public",
"UpdateFlowSourceResult",
"updateFlowSource",
"(",
"UpdateFlowSourceRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateFlowSource",
"(",
"request",
")",
";",
"}"
] |
Updates the source of a flow.
@param updateFlowSourceRequest
A request to update the source of a flow.
@return Result of the UpdateFlowSource operation returned by the service.
@throws BadRequestException
The request that you submitted is not valid.
@throws InternalServerErrorException
AWS Elemental MediaConnect can't fulfill your request because it encountered an unexpected condition.
@throws ForbiddenException
You don't have the required permissions to perform this operation.
@throws NotFoundException
AWS Elemental MediaConnect did not find the resource that you specified in the request.
@throws ServiceUnavailableException
AWS Elemental MediaConnect is currently unavailable. Try again later.
@throws TooManyRequestsException
You have exceeded the service request rate limit for your AWS Elemental MediaConnect account.
@sample AWSMediaConnect.UpdateFlowSource
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource" target="_top">AWS
API Documentation</a>
|
[
"Updates",
"the",
"source",
"of",
"a",
"flow",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/AWSMediaConnectClient.java#L1168-L1172
|
20,185
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
|
XpathUtils.speedUpDTMManager
|
private static void speedUpDTMManager() throws Exception {
// https://github.com/aws/aws-sdk-java/issues/238
// http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance
if (System.getProperty(DTM_MANAGER_DEFAULT_PROP_NAME) == null) {
Class<?> XPathContextClass = Class.forName(XPATH_CONTEXT_CLASS_NAME);
Method getDTMManager = XPathContextClass.getMethod("getDTMManager");
Object XPathContext = XPathContextClass.newInstance();
Object dtmManager = getDTMManager.invoke(XPathContext);
if (DTM_MANAGER_IMPL_CLASS_NAME.equals(dtmManager.getClass().getName())) {
// This would avoid the file system to be accessed every time
// the internal XPathContext is instantiated.
System.setProperty(DTM_MANAGER_DEFAULT_PROP_NAME,
DTM_MANAGER_IMPL_CLASS_NAME);
}
}
}
|
java
|
private static void speedUpDTMManager() throws Exception {
// https://github.com/aws/aws-sdk-java/issues/238
// http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance
if (System.getProperty(DTM_MANAGER_DEFAULT_PROP_NAME) == null) {
Class<?> XPathContextClass = Class.forName(XPATH_CONTEXT_CLASS_NAME);
Method getDTMManager = XPathContextClass.getMethod("getDTMManager");
Object XPathContext = XPathContextClass.newInstance();
Object dtmManager = getDTMManager.invoke(XPathContext);
if (DTM_MANAGER_IMPL_CLASS_NAME.equals(dtmManager.getClass().getName())) {
// This would avoid the file system to be accessed every time
// the internal XPathContext is instantiated.
System.setProperty(DTM_MANAGER_DEFAULT_PROP_NAME,
DTM_MANAGER_IMPL_CLASS_NAME);
}
}
}
|
[
"private",
"static",
"void",
"speedUpDTMManager",
"(",
")",
"throws",
"Exception",
"{",
"// https://github.com/aws/aws-sdk-java/issues/238",
"// http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance",
"if",
"(",
"System",
".",
"getProperty",
"(",
"DTM_MANAGER_DEFAULT_PROP_NAME",
")",
"==",
"null",
")",
"{",
"Class",
"<",
"?",
">",
"XPathContextClass",
"=",
"Class",
".",
"forName",
"(",
"XPATH_CONTEXT_CLASS_NAME",
")",
";",
"Method",
"getDTMManager",
"=",
"XPathContextClass",
".",
"getMethod",
"(",
"\"getDTMManager\"",
")",
";",
"Object",
"XPathContext",
"=",
"XPathContextClass",
".",
"newInstance",
"(",
")",
";",
"Object",
"dtmManager",
"=",
"getDTMManager",
".",
"invoke",
"(",
"XPathContext",
")",
";",
"if",
"(",
"DTM_MANAGER_IMPL_CLASS_NAME",
".",
"equals",
"(",
"dtmManager",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
")",
"{",
"// This would avoid the file system to be accessed every time",
"// the internal XPathContext is instantiated.",
"System",
".",
"setProperty",
"(",
"DTM_MANAGER_DEFAULT_PROP_NAME",
",",
"DTM_MANAGER_IMPL_CLASS_NAME",
")",
";",
"}",
"}",
"}"
] |
Used to optimize performance by avoiding expensive file access every time
a DTMManager is constructed as a result of constructing a Xalan xpath
context!
|
[
"Used",
"to",
"optimize",
"performance",
"by",
"avoiding",
"expensive",
"file",
"access",
"every",
"time",
"a",
"DTMManager",
"is",
"constructed",
"as",
"a",
"result",
"of",
"constructing",
"a",
"Xalan",
"xpath",
"context!"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L102-L118
|
20,186
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
|
XpathUtils.speedUpDcoumentBuilderFactory
|
private static void speedUpDcoumentBuilderFactory() {
if (System.getProperty(DOCUMENT_BUILDER_FACTORY_PROP_NAME) == null) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if (DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME.equals(factory.getClass().getName())) {
// This would avoid the file system to be accessed every time
// the internal DocumentBuilderFactory is instantiated.
System.setProperty(DOCUMENT_BUILDER_FACTORY_PROP_NAME,
DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME);
}
}
}
|
java
|
private static void speedUpDcoumentBuilderFactory() {
if (System.getProperty(DOCUMENT_BUILDER_FACTORY_PROP_NAME) == null) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if (DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME.equals(factory.getClass().getName())) {
// This would avoid the file system to be accessed every time
// the internal DocumentBuilderFactory is instantiated.
System.setProperty(DOCUMENT_BUILDER_FACTORY_PROP_NAME,
DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME);
}
}
}
|
[
"private",
"static",
"void",
"speedUpDcoumentBuilderFactory",
"(",
")",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"DOCUMENT_BUILDER_FACTORY_PROP_NAME",
")",
"==",
"null",
")",
"{",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"if",
"(",
"DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME",
".",
"equals",
"(",
"factory",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
")",
"{",
"// This would avoid the file system to be accessed every time",
"// the internal DocumentBuilderFactory is instantiated.",
"System",
".",
"setProperty",
"(",
"DOCUMENT_BUILDER_FACTORY_PROP_NAME",
",",
"DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME",
")",
";",
"}",
"}",
"}"
] |
Used to optimize performance by avoiding expensive file access every time
a DocumentBuilderFactory is constructed as a result of constructing a
Xalan document factory.
|
[
"Used",
"to",
"optimize",
"performance",
"by",
"avoiding",
"expensive",
"file",
"access",
"every",
"time",
"a",
"DocumentBuilderFactory",
"is",
"constructed",
"as",
"a",
"result",
"of",
"constructing",
"a",
"Xalan",
"document",
"factory",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L125-L135
|
20,187
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
|
XpathUtils.documentFrom
|
public static Document documentFrom(InputStream is)
throws SAXException, IOException, ParserConfigurationException {
is = new NamespaceRemovingInputStream(is);
// DocumentBuilderFactory is not thread safe
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
// ensure that parser writes error/warning messages to the logger
// rather than stderr
builder.setErrorHandler(ERROR_HANDLER);
Document doc = builder.parse(is);
is.close();
return doc;
}
|
java
|
public static Document documentFrom(InputStream is)
throws SAXException, IOException, ParserConfigurationException {
is = new NamespaceRemovingInputStream(is);
// DocumentBuilderFactory is not thread safe
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
// ensure that parser writes error/warning messages to the logger
// rather than stderr
builder.setErrorHandler(ERROR_HANDLER);
Document doc = builder.parse(is);
is.close();
return doc;
}
|
[
"public",
"static",
"Document",
"documentFrom",
"(",
"InputStream",
"is",
")",
"throws",
"SAXException",
",",
"IOException",
",",
"ParserConfigurationException",
"{",
"is",
"=",
"new",
"NamespaceRemovingInputStream",
"(",
"is",
")",
";",
"// DocumentBuilderFactory is not thread safe",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"DocumentBuilder",
"builder",
"=",
"factory",
".",
"newDocumentBuilder",
"(",
")",
";",
"// ensure that parser writes error/warning messages to the logger",
"// rather than stderr",
"builder",
".",
"setErrorHandler",
"(",
"ERROR_HANDLER",
")",
";",
"Document",
"doc",
"=",
"builder",
".",
"parse",
"(",
"is",
")",
";",
"is",
".",
"close",
"(",
")",
";",
"return",
"doc",
";",
"}"
] |
This method closes the given input stream upon completion.
|
[
"This",
"method",
"closes",
"the",
"given",
"input",
"stream",
"upon",
"completion",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L164-L176
|
20,188
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
|
XpathUtils.asNode
|
public static Node asNode(String nodeName, Node node)
throws XPathExpressionException {
return asNode(nodeName, node, xpath());
}
|
java
|
public static Node asNode(String nodeName, Node node)
throws XPathExpressionException {
return asNode(nodeName, node, xpath());
}
|
[
"public",
"static",
"Node",
"asNode",
"(",
"String",
"nodeName",
",",
"Node",
"node",
")",
"throws",
"XPathExpressionException",
"{",
"return",
"asNode",
"(",
"nodeName",
",",
"node",
",",
"xpath",
"(",
")",
")",
";",
"}"
] |
Evaluates the specified XPath expression and returns the result as a
Node.
@param nodeName
The XPath expression to evaluate.
@param node
The node to run the expression on.
@return The Node result.
@throws XPathExpressionException
If there was a problem processing the specified XPath
expression.
|
[
"Evaluates",
"the",
"specified",
"XPath",
"expression",
"and",
"returns",
"the",
"result",
"as",
"a",
"Node",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L543-L546
|
20,189
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
|
XpathUtils.evaluateAsString
|
private static String evaluateAsString(String expression, Node node,
XPath xpath) throws XPathExpressionException {
if (isEmpty(node)) return null;
if (!expression.equals(".")) {
/*
* If the expression being evaluated doesn't select a node, we want
* to return null to distinguish between cases where a node isn't
* present (which should be represented as null) and when a node is
* present, but empty (which should be represented as the empty
* string).
*
* We skip this test if the expression is "." since we've already
* checked that the node exists.
*/
if (asNode(expression, node, xpath) == null) return null;
}
String s = xpath.evaluate(expression, node);
return s.trim();
}
|
java
|
private static String evaluateAsString(String expression, Node node,
XPath xpath) throws XPathExpressionException {
if (isEmpty(node)) return null;
if (!expression.equals(".")) {
/*
* If the expression being evaluated doesn't select a node, we want
* to return null to distinguish between cases where a node isn't
* present (which should be represented as null) and when a node is
* present, but empty (which should be represented as the empty
* string).
*
* We skip this test if the expression is "." since we've already
* checked that the node exists.
*/
if (asNode(expression, node, xpath) == null) return null;
}
String s = xpath.evaluate(expression, node);
return s.trim();
}
|
[
"private",
"static",
"String",
"evaluateAsString",
"(",
"String",
"expression",
",",
"Node",
"node",
",",
"XPath",
"xpath",
")",
"throws",
"XPathExpressionException",
"{",
"if",
"(",
"isEmpty",
"(",
"node",
")",
")",
"return",
"null",
";",
"if",
"(",
"!",
"expression",
".",
"equals",
"(",
"\".\"",
")",
")",
"{",
"/*\n * If the expression being evaluated doesn't select a node, we want\n * to return null to distinguish between cases where a node isn't\n * present (which should be represented as null) and when a node is\n * present, but empty (which should be represented as the empty\n * string).\n *\n * We skip this test if the expression is \".\" since we've already\n * checked that the node exists.\n */",
"if",
"(",
"asNode",
"(",
"expression",
",",
"node",
",",
"xpath",
")",
"==",
"null",
")",
"return",
"null",
";",
"}",
"String",
"s",
"=",
"xpath",
".",
"evaluate",
"(",
"expression",
",",
"node",
")",
";",
"return",
"s",
".",
"trim",
"(",
")",
";",
"}"
] |
Evaluates the specified expression on the specified node and returns the
result as a String.
@param expression
The Xpath expression to evaluate.
@param node
The node on which to evaluate the expression.
@return The result of evaluating the specified expression, or null if the
evaluation didn't return any result.
@throws XPathExpressionException
If there are any problems evaluating the Xpath expression.
|
[
"Evaluates",
"the",
"specified",
"expression",
"on",
"the",
"specified",
"node",
"and",
"returns",
"the",
"result",
"as",
"a",
"String",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L585-L606
|
20,190
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java
|
S3ObjectWrapper.hasEncryptionInfo
|
final boolean hasEncryptionInfo() {
ObjectMetadata metadata = s3obj.getObjectMetadata();
Map<String, String> userMeta = metadata.getUserMetadata();
return userMeta != null
&& userMeta.containsKey(Headers.CRYPTO_IV)
&& (userMeta.containsKey(Headers.CRYPTO_KEY_V2)
|| userMeta.containsKey(Headers.CRYPTO_KEY));
}
|
java
|
final boolean hasEncryptionInfo() {
ObjectMetadata metadata = s3obj.getObjectMetadata();
Map<String, String> userMeta = metadata.getUserMetadata();
return userMeta != null
&& userMeta.containsKey(Headers.CRYPTO_IV)
&& (userMeta.containsKey(Headers.CRYPTO_KEY_V2)
|| userMeta.containsKey(Headers.CRYPTO_KEY));
}
|
[
"final",
"boolean",
"hasEncryptionInfo",
"(",
")",
"{",
"ObjectMetadata",
"metadata",
"=",
"s3obj",
".",
"getObjectMetadata",
"(",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"userMeta",
"=",
"metadata",
".",
"getUserMetadata",
"(",
")",
";",
"return",
"userMeta",
"!=",
"null",
"&&",
"userMeta",
".",
"containsKey",
"(",
"Headers",
".",
"CRYPTO_IV",
")",
"&&",
"(",
"userMeta",
".",
"containsKey",
"(",
"Headers",
".",
"CRYPTO_KEY_V2",
")",
"||",
"userMeta",
".",
"containsKey",
"(",
"Headers",
".",
"CRYPTO_KEY",
")",
")",
";",
"}"
] |
Returns true if this S3 object has the encryption information stored
as user meta data; false otherwise.
|
[
"Returns",
"true",
"if",
"this",
"S3",
"object",
"has",
"the",
"encryption",
"information",
"stored",
"as",
"user",
"meta",
"data",
";",
"false",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java#L102-L109
|
20,191
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java
|
S3ObjectWrapper.toJsonString
|
String toJsonString() {
try {
return from(s3obj.getObjectContent());
} catch (Exception e) {
throw new SdkClientException("Error parsing JSON: " + e.getMessage());
}
}
|
java
|
String toJsonString() {
try {
return from(s3obj.getObjectContent());
} catch (Exception e) {
throw new SdkClientException("Error parsing JSON: " + e.getMessage());
}
}
|
[
"String",
"toJsonString",
"(",
")",
"{",
"try",
"{",
"return",
"from",
"(",
"s3obj",
".",
"getObjectContent",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Error parsing JSON: \"",
"+",
"e",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"}"
] |
Converts and return the underlying S3 object as a json string.
@throws SdkClientException if failed in JSON conversion.
|
[
"Converts",
"and",
"return",
"the",
"underlying",
"S3",
"object",
"as",
"a",
"json",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java#L116-L122
|
20,192
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java
|
S3ObjectWrapper.encryptionSchemeOf
|
ContentCryptoScheme encryptionSchemeOf(Map<String,String> instructionFile) {
if (instructionFile != null) {
String cekAlgo = instructionFile.get(Headers.CRYPTO_CEK_ALGORITHM);
return ContentCryptoScheme.fromCEKAlgo(cekAlgo);
}
ObjectMetadata meta = s3obj.getObjectMetadata();
Map<String, String> userMeta = meta.getUserMetadata();
String cekAlgo = userMeta.get(Headers.CRYPTO_CEK_ALGORITHM);
return ContentCryptoScheme.fromCEKAlgo(cekAlgo);
}
|
java
|
ContentCryptoScheme encryptionSchemeOf(Map<String,String> instructionFile) {
if (instructionFile != null) {
String cekAlgo = instructionFile.get(Headers.CRYPTO_CEK_ALGORITHM);
return ContentCryptoScheme.fromCEKAlgo(cekAlgo);
}
ObjectMetadata meta = s3obj.getObjectMetadata();
Map<String, String> userMeta = meta.getUserMetadata();
String cekAlgo = userMeta.get(Headers.CRYPTO_CEK_ALGORITHM);
return ContentCryptoScheme.fromCEKAlgo(cekAlgo);
}
|
[
"ContentCryptoScheme",
"encryptionSchemeOf",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"instructionFile",
")",
"{",
"if",
"(",
"instructionFile",
"!=",
"null",
")",
"{",
"String",
"cekAlgo",
"=",
"instructionFile",
".",
"get",
"(",
"Headers",
".",
"CRYPTO_CEK_ALGORITHM",
")",
";",
"return",
"ContentCryptoScheme",
".",
"fromCEKAlgo",
"(",
"cekAlgo",
")",
";",
"}",
"ObjectMetadata",
"meta",
"=",
"s3obj",
".",
"getObjectMetadata",
"(",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"userMeta",
"=",
"meta",
".",
"getUserMetadata",
"(",
")",
";",
"String",
"cekAlgo",
"=",
"userMeta",
".",
"get",
"(",
"Headers",
".",
"CRYPTO_CEK_ALGORITHM",
")",
";",
"return",
"ContentCryptoScheme",
".",
"fromCEKAlgo",
"(",
"cekAlgo",
")",
";",
"}"
] |
Returns the original crypto scheme used for encryption, which may
differ from the crypto scheme used for decryption during, for example,
a range-get operation.
@param instructionFile
the instruction file of the s3 object; or null if there is
none.
|
[
"Returns",
"the",
"original",
"crypto",
"scheme",
"used",
"for",
"encryption",
"which",
"may",
"differ",
"from",
"the",
"crypto",
"scheme",
"used",
"for",
"decryption",
"during",
"for",
"example",
"a",
"range",
"-",
"get",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java#L157-L166
|
20,193
|
aws/aws-sdk-java
|
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/HlsGroupSettings.java
|
HlsGroupSettings.setCaptionLanguageMappings
|
public void setCaptionLanguageMappings(java.util.Collection<HlsCaptionLanguageMapping> captionLanguageMappings) {
if (captionLanguageMappings == null) {
this.captionLanguageMappings = null;
return;
}
this.captionLanguageMappings = new java.util.ArrayList<HlsCaptionLanguageMapping>(captionLanguageMappings);
}
|
java
|
public void setCaptionLanguageMappings(java.util.Collection<HlsCaptionLanguageMapping> captionLanguageMappings) {
if (captionLanguageMappings == null) {
this.captionLanguageMappings = null;
return;
}
this.captionLanguageMappings = new java.util.ArrayList<HlsCaptionLanguageMapping>(captionLanguageMappings);
}
|
[
"public",
"void",
"setCaptionLanguageMappings",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"HlsCaptionLanguageMapping",
">",
"captionLanguageMappings",
")",
"{",
"if",
"(",
"captionLanguageMappings",
"==",
"null",
")",
"{",
"this",
".",
"captionLanguageMappings",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"captionLanguageMappings",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"HlsCaptionLanguageMapping",
">",
"(",
"captionLanguageMappings",
")",
";",
"}"
] |
Language to be used on Caption outputs
@param captionLanguageMappings
Language to be used on Caption outputs
|
[
"Language",
"to",
"be",
"used",
"on",
"Caption",
"outputs"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/HlsGroupSettings.java#L265-L272
|
20,194
|
aws/aws-sdk-java
|
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java
|
AmazonCloudFrontWaiters.distributionDeployed
|
public Waiter<GetDistributionRequest> distributionDeployed() {
return new WaiterBuilder<GetDistributionRequest, GetDistributionResult>().withSdkFunction(new GetDistributionFunction(client))
.withAcceptors(new DistributionDeployed.IsDeployedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetDistributionRequest> distributionDeployed() {
return new WaiterBuilder<GetDistributionRequest, GetDistributionResult>().withSdkFunction(new GetDistributionFunction(client))
.withAcceptors(new DistributionDeployed.IsDeployedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetDistributionRequest",
">",
"distributionDeployed",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetDistributionRequest",
",",
"GetDistributionResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetDistributionFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"DistributionDeployed",
".",
"IsDeployedMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"25",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"60",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a DistributionDeployed waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"DistributionDeployed",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java#L51-L57
|
20,195
|
aws/aws-sdk-java
|
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java
|
AmazonCloudFrontWaiters.streamingDistributionDeployed
|
public Waiter<GetStreamingDistributionRequest> streamingDistributionDeployed() {
return new WaiterBuilder<GetStreamingDistributionRequest, GetStreamingDistributionResult>()
.withSdkFunction(new GetStreamingDistributionFunction(client)).withAcceptors(new StreamingDistributionDeployed.IsDeployedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetStreamingDistributionRequest> streamingDistributionDeployed() {
return new WaiterBuilder<GetStreamingDistributionRequest, GetStreamingDistributionResult>()
.withSdkFunction(new GetStreamingDistributionFunction(client)).withAcceptors(new StreamingDistributionDeployed.IsDeployedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(60)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetStreamingDistributionRequest",
">",
"streamingDistributionDeployed",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetStreamingDistributionRequest",
",",
"GetStreamingDistributionResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetStreamingDistributionFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"StreamingDistributionDeployed",
".",
"IsDeployedMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"25",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"60",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a StreamingDistributionDeployed waiter by using custom parameters waiterParameters and other parameters
defined in the waiters specification, and then polls until it determines whether the resource entered the desired
state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"StreamingDistributionDeployed",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java#L64-L70
|
20,196
|
aws/aws-sdk-java
|
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java
|
AmazonCloudFrontWaiters.invalidationCompleted
|
public Waiter<GetInvalidationRequest> invalidationCompleted() {
return new WaiterBuilder<GetInvalidationRequest, GetInvalidationResult>().withSdkFunction(new GetInvalidationFunction(client))
.withAcceptors(new InvalidationCompleted.IsCompletedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(30), new FixedDelayStrategy(20)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetInvalidationRequest> invalidationCompleted() {
return new WaiterBuilder<GetInvalidationRequest, GetInvalidationResult>().withSdkFunction(new GetInvalidationFunction(client))
.withAcceptors(new InvalidationCompleted.IsCompletedMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(30), new FixedDelayStrategy(20)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetInvalidationRequest",
">",
"invalidationCompleted",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetInvalidationRequest",
",",
"GetInvalidationResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetInvalidationFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"InvalidationCompleted",
".",
"IsCompletedMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"30",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"20",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a InvalidationCompleted waiter by using custom parameters waiterParameters and other parameters defined in
the waiters specification, and then polls until it determines whether the resource entered the desired state or
not, where polling criteria is bound by either default polling strategy or custom polling strategy.
|
[
"Builds",
"a",
"InvalidationCompleted",
"waiter",
"by",
"using",
"custom",
"parameters",
"waiterParameters",
"and",
"other",
"parameters",
"defined",
"in",
"the",
"waiters",
"specification",
"and",
"then",
"polls",
"until",
"it",
"determines",
"whether",
"the",
"resource",
"entered",
"the",
"desired",
"state",
"or",
"not",
"where",
"polling",
"criteria",
"is",
"bound",
"by",
"either",
"default",
"polling",
"strategy",
"or",
"custom",
"polling",
"strategy",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/waiters/AmazonCloudFrontWaiters.java#L77-L83
|
20,197
|
aws/aws-sdk-java
|
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputResult.java
|
DescribeInputResult.setMediaConnectFlows
|
public void setMediaConnectFlows(java.util.Collection<MediaConnectFlow> mediaConnectFlows) {
if (mediaConnectFlows == null) {
this.mediaConnectFlows = null;
return;
}
this.mediaConnectFlows = new java.util.ArrayList<MediaConnectFlow>(mediaConnectFlows);
}
|
java
|
public void setMediaConnectFlows(java.util.Collection<MediaConnectFlow> mediaConnectFlows) {
if (mediaConnectFlows == null) {
this.mediaConnectFlows = null;
return;
}
this.mediaConnectFlows = new java.util.ArrayList<MediaConnectFlow>(mediaConnectFlows);
}
|
[
"public",
"void",
"setMediaConnectFlows",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"MediaConnectFlow",
">",
"mediaConnectFlows",
")",
"{",
"if",
"(",
"mediaConnectFlows",
"==",
"null",
")",
"{",
"this",
".",
"mediaConnectFlows",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"mediaConnectFlows",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"MediaConnectFlow",
">",
"(",
"mediaConnectFlows",
")",
";",
"}"
] |
A list of MediaConnect Flows for this input.
@param mediaConnectFlows
A list of MediaConnect Flows for this input.
|
[
"A",
"list",
"of",
"MediaConnect",
"Flows",
"for",
"this",
"input",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputResult.java#L360-L367
|
20,198
|
aws/aws-sdk-java
|
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputResult.java
|
DescribeInputResult.setSecurityGroups
|
public void setSecurityGroups(java.util.Collection<String> securityGroups) {
if (securityGroups == null) {
this.securityGroups = null;
return;
}
this.securityGroups = new java.util.ArrayList<String>(securityGroups);
}
|
java
|
public void setSecurityGroups(java.util.Collection<String> securityGroups) {
if (securityGroups == null) {
this.securityGroups = null;
return;
}
this.securityGroups = new java.util.ArrayList<String>(securityGroups);
}
|
[
"public",
"void",
"setSecurityGroups",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"securityGroups",
")",
"{",
"if",
"(",
"securityGroups",
"==",
"null",
")",
"{",
"this",
".",
"securityGroups",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"securityGroups",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"String",
">",
"(",
"securityGroups",
")",
";",
"}"
] |
A list of IDs for all the Input Security Groups attached to the input.
@param securityGroups
A list of IDs for all the Input Security Groups attached to the input.
|
[
"A",
"list",
"of",
"IDs",
"for",
"all",
"the",
"Input",
"Security",
"Groups",
"attached",
"to",
"the",
"input",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputResult.java#L490-L497
|
20,199
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
|
JmesPathCodeGenVisitor.visit
|
@Override
public String visit(final JmesPathSubExpression subExpression, final Void aVoid)
throws InvalidTypeException {
final String prefix = "new JmesPathSubExpression( ";
return subExpression.getExpressions().stream()
.map(a -> a.accept(this, aVoid))
.collect(Collectors.joining(",", prefix, ")"));
}
|
java
|
@Override
public String visit(final JmesPathSubExpression subExpression, final Void aVoid)
throws InvalidTypeException {
final String prefix = "new JmesPathSubExpression( ";
return subExpression.getExpressions().stream()
.map(a -> a.accept(this, aVoid))
.collect(Collectors.joining(",", prefix, ")"));
}
|
[
"@",
"Override",
"public",
"String",
"visit",
"(",
"final",
"JmesPathSubExpression",
"subExpression",
",",
"final",
"Void",
"aVoid",
")",
"throws",
"InvalidTypeException",
"{",
"final",
"String",
"prefix",
"=",
"\"new JmesPathSubExpression( \"",
";",
"return",
"subExpression",
".",
"getExpressions",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
"(",
"a",
"->",
"a",
".",
"accept",
"(",
"this",
",",
"aVoid",
")",
")",
".",
"collect",
"(",
"Collectors",
".",
"joining",
"(",
"\",\"",
",",
"prefix",
",",
"\")\"",
")",
")",
";",
"}"
] |
Generates the code for a new JmesPathSubExpression.
@param subExpression JmesPath subexpression type
@param aVoid void
@return String that represents a call to
the new subexpression
@throws InvalidTypeException
|
[
"Generates",
"the",
"code",
"for",
"a",
"new",
"JmesPathSubExpression",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L49-L56
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.