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,200
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathProjection jmesPathProjection, final Void aVoid) throws InvalidTypeException { return "new JmesPathProjection( " + jmesPathProjection.getLhsExpr() .accept(this, aVoid) + ", " + jmesPathProjection.getProjectionExpr() .accept(this, aVoid) + ")"; }
java
@Override public String visit(final JmesPathProjection jmesPathProjection, final Void aVoid) throws InvalidTypeException { return "new JmesPathProjection( " + jmesPathProjection.getLhsExpr() .accept(this, aVoid) + ", " + jmesPathProjection.getProjectionExpr() .accept(this, aVoid) + ")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathProjection", "jmesPathProjection", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathProjection( \"", "+", "jmesPathProjection", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\", \"", "+", "jmesPathProjection", ".", "getProjectionExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\")\"", ";", "}" ]
Generates the code for a new JmesPathProjection. @param jmesPathProjection JmesPath projection type @param aVoid void @return String that represents a call to the new list projection @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathProjection", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L80-L86
20,201
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathFlatten flatten, final Void aVoid) throws InvalidTypeException { return "new JmesPathFlatten( " + flatten.getFlattenExpr() .accept(this, aVoid) + ")"; }
java
@Override public String visit(final JmesPathFlatten flatten, final Void aVoid) throws InvalidTypeException { return "new JmesPathFlatten( " + flatten.getFlattenExpr() .accept(this, aVoid) + ")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathFlatten", "flatten", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathFlatten( \"", "+", "flatten", ".", "getFlattenExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\")\"", ";", "}" ]
Generates the code for a new JmesPathFlatten. @param flatten JmesPath flatten type @param aVoid void @return String that represents a call to the new flatten projection @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathFlatten", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L97-L102
20,202
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathValueProjection valueProjection, final Void aVoid) throws InvalidTypeException { return "new JmesPathValueProjection( " + valueProjection.getLhsExpr() .accept(this, aVoid) + ", " + valueProjection.getRhsExpr() .accept(this, aVoid) + ")"; }
java
@Override public String visit(final JmesPathValueProjection valueProjection, final Void aVoid) throws InvalidTypeException { return "new JmesPathValueProjection( " + valueProjection.getLhsExpr() .accept(this, aVoid) + ", " + valueProjection.getRhsExpr() .accept(this, aVoid) + ")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathValueProjection", "valueProjection", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathValueProjection( \"", "+", "valueProjection", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\", \"", "+", "valueProjection", ".", "getRhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\")\"", ";", "}" ]
Generates the code for a new JmesPathValueProjection. @param valueProjection JmesPath value projection type @param aVoid void @return String that represents a call to the new value projection @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathValueProjection", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L127-L133
20,203
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathLiteral literal, final Void aVoid) { return "new JmesPathLiteral(\"" + StringEscapeUtils .escapeJava(literal.getValue().toString()) + "\")"; }
java
@Override public String visit(final JmesPathLiteral literal, final Void aVoid) { return "new JmesPathLiteral(\"" + StringEscapeUtils .escapeJava(literal.getValue().toString()) + "\")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathLiteral", "literal", ",", "final", "Void", "aVoid", ")", "{", "return", "\"new JmesPathLiteral(\\\"\"", "+", "StringEscapeUtils", ".", "escapeJava", "(", "literal", ".", "getValue", "(", ")", ".", "toString", "(", ")", ")", "+", "\"\\\")\"", ";", "}" ]
Generates the code for a new JmesPathLiteral. @param literal JmesPath literal type @param aVoid void @return String that represents a call to the new literal expression
[ "Generates", "the", "code", "for", "a", "new", "JmesPathLiteral", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L143-L148
20,204
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathFilter filter, final Void aVoid) throws InvalidTypeException { return "new JmesPathFilter( " + filter.getLhsExpr().accept(this, aVoid) + ", " + filter.getRhsExpr().accept(this, aVoid) + ", " + filter.getComparator().accept(this, aVoid) + ")"; }
java
@Override public String visit(final JmesPathFilter filter, final Void aVoid) throws InvalidTypeException { return "new JmesPathFilter( " + filter.getLhsExpr().accept(this, aVoid) + ", " + filter.getRhsExpr().accept(this, aVoid) + ", " + filter.getComparator().accept(this, aVoid) + ")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathFilter", "filter", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathFilter( \"", "+", "filter", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\", \"", "+", "filter", ".", "getRhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\", \"", "+", "filter", ".", "getComparator", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\")\"", ";", "}" ]
Generates the code for a new JmesPathFilter. @param filter JmesPath filter type @param aVoid void @return String that represents a call to the new filter expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathFilter", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L159-L165
20,205
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathFunction function, final Void aVoid) throws InvalidTypeException { final String prefix = "new " + function.getClass() .getSimpleName() + "( "; return function.getExpressions().stream() .map(a -> a.accept(this, aVoid)) .collect(Collectors.joining(",", prefix, ")")); }
java
@Override public String visit(final JmesPathFunction function, final Void aVoid) throws InvalidTypeException { final String prefix = "new " + function.getClass() .getSimpleName() + "( "; return function.getExpressions().stream() .map(a -> a.accept(this, aVoid)) .collect(Collectors.joining(",", prefix, ")")); }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathFunction", "function", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "final", "String", "prefix", "=", "\"new \"", "+", "function", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")", "+", "\"( \"", ";", "return", "function", ".", "getExpressions", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "a", "->", "a", ".", "accept", "(", "this", ",", "aVoid", ")", ")", ".", "collect", "(", "Collectors", ".", "joining", "(", "\",\"", ",", "prefix", ",", "\")\"", ")", ")", ";", "}" ]
Generates the code for a new JmesPathFunction. @param function JmesPath function type @param aVoid void @return String that represents a call to the new function expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathFunction", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L176-L184
20,206
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final Comparator op, final Void aVoid) throws InvalidTypeException { String lhs = op.getLhsExpr().accept(this, aVoid); String rhs = op.getRhsExpr().accept(this, aVoid); return String.format("new %s(%s, %s)", op.getClass() .getSimpleName(), lhs, rhs); }
java
@Override public String visit(final Comparator op, final Void aVoid) throws InvalidTypeException { String lhs = op.getLhsExpr().accept(this, aVoid); String rhs = op.getRhsExpr().accept(this, aVoid); return String.format("new %s(%s, %s)", op.getClass() .getSimpleName(), lhs, rhs); }
[ "@", "Override", "public", "String", "visit", "(", "final", "Comparator", "op", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "String", "lhs", "=", "op", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", ";", "String", "rhs", "=", "op", ".", "getRhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", ";", "return", "String", ".", "format", "(", "\"new %s(%s, %s)\"", ",", "op", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")", ",", "lhs", ",", "rhs", ")", ";", "}" ]
Generates the code for a new Comparator. @param op JmesPath comparison operator type @param aVoid void @return String that represents a call to the new comparator expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "Comparator", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L195-L203
20,207
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathNotExpression notExpression, final Void aVoid) throws InvalidTypeException { return "new JmesPathNotExpression( " + notExpression.getExpr() .accept(this, aVoid) + " )"; }
java
@Override public String visit(final JmesPathNotExpression notExpression, final Void aVoid) throws InvalidTypeException { return "new JmesPathNotExpression( " + notExpression.getExpr() .accept(this, aVoid) + " )"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathNotExpression", "notExpression", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathNotExpression( \"", "+", "notExpression", ".", "getExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\" )\"", ";", "}" ]
Generates the code for a new JmesPathNotExpression. @param notExpression JmesPath not-expression type @param aVoid void @return String that represents a call to the new not-expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathNotExpression", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L214-L219
20,208
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathAndExpression andExpression, final Void aVoid) throws InvalidTypeException { return "new JmesPathAndExpression( " + andExpression.getLhsExpr() .accept(this, aVoid) + ", " + andExpression.getRhsExpr() .accept(this, aVoid) + " )"; }
java
@Override public String visit(final JmesPathAndExpression andExpression, final Void aVoid) throws InvalidTypeException { return "new JmesPathAndExpression( " + andExpression.getLhsExpr() .accept(this, aVoid) + ", " + andExpression.getRhsExpr() .accept(this, aVoid) + " )"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathAndExpression", "andExpression", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "return", "\"new JmesPathAndExpression( \"", "+", "andExpression", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\", \"", "+", "andExpression", ".", "getRhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ")", "+", "\" )\"", ";", "}" ]
Generates the code for a new JmesPathAndExpression. @param andExpression JmesPath and-expression type @param aVoid void @return String that represents a call to the new and-expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathAndExpression", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L230-L236
20,209
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathMultiSelectList multiSelectList, final Void aVoid) throws InvalidTypeException { final String prefix = "new JmesPathMultiSelectList( "; return multiSelectList.getExpressions().stream() .map(a -> a.accept(this, aVoid)) .collect(Collectors.joining(",", prefix, ")")); }
java
@Override public String visit(final JmesPathMultiSelectList multiSelectList, final Void aVoid) throws InvalidTypeException { final String prefix = "new JmesPathMultiSelectList( "; return multiSelectList.getExpressions().stream() .map(a -> a.accept(this, aVoid)) .collect(Collectors.joining(",", prefix, ")")); }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathMultiSelectList", "multiSelectList", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "final", "String", "prefix", "=", "\"new JmesPathMultiSelectList( \"", ";", "return", "multiSelectList", ".", "getExpressions", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "a", "->", "a", ".", "accept", "(", "this", ",", "aVoid", ")", ")", ".", "collect", "(", "Collectors", ".", "joining", "(", "\",\"", ",", "prefix", ",", "\")\"", ")", ")", ";", "}" ]
Generates the code for a new JmesPathMultiSelectList. @param multiSelectList JmesPath multiSelectList type @param aVoid void @return String that represents a call to the new multiSelectList @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "JmesPathMultiSelectList", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L247-L254
20,210
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/AwsHostNameUtils.java
AwsHostNameUtils.localHostName
public static String localHostName() { try { InetAddress localhost = InetAddress.getLocalHost(); return localhost.getHostName(); } catch (Exception e) { InternalLogFactory.getLog(AwsHostNameUtils.class) .debug( "Failed to determine the local hostname; fall back to " + "use \"localhost\".", e); return "localhost"; } }
java
public static String localHostName() { try { InetAddress localhost = InetAddress.getLocalHost(); return localhost.getHostName(); } catch (Exception e) { InternalLogFactory.getLog(AwsHostNameUtils.class) .debug( "Failed to determine the local hostname; fall back to " + "use \"localhost\".", e); return "localhost"; } }
[ "public", "static", "String", "localHostName", "(", ")", "{", "try", "{", "InetAddress", "localhost", "=", "InetAddress", ".", "getLocalHost", "(", ")", ";", "return", "localhost", ".", "getHostName", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "InternalLogFactory", ".", "getLog", "(", "AwsHostNameUtils", ".", "class", ")", ".", "debug", "(", "\"Failed to determine the local hostname; fall back to \"", "+", "\"use \\\"localhost\\\".\"", ",", "e", ")", ";", "return", "\"localhost\"", ";", "}", "}" ]
Returns the host name for the local host. If the operation is not allowed by the security check, the textual representation of the IP address of the local host is returned instead. If the ip address of the local host cannot be resolved or if there is any other failure, "localhost" is returned as a fallback.
[ "Returns", "the", "host", "name", "for", "the", "local", "host", ".", "If", "the", "operation", "is", "not", "allowed", "by", "the", "security", "check", "the", "textual", "representation", "of", "the", "IP", "address", "of", "the", "local", "host", "is", "returned", "instead", ".", "If", "the", "ip", "address", "of", "the", "local", "host", "cannot", "be", "resolved", "or", "if", "there", "is", "any", "other", "failure", "localhost", "is", "returned", "as", "a", "fallback", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/AwsHostNameUtils.java#L235-L246
20,211
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBQueryExpression.java
DynamoDBQueryExpression.withExpressionAttributeValues
public DynamoDBQueryExpression<T> withExpressionAttributeValues( java.util.Map<String, AttributeValue> expressionAttributeValues) { setExpressionAttributeValues(expressionAttributeValues); return this; }
java
public DynamoDBQueryExpression<T> withExpressionAttributeValues( java.util.Map<String, AttributeValue> expressionAttributeValues) { setExpressionAttributeValues(expressionAttributeValues); return this; }
[ "public", "DynamoDBQueryExpression", "<", "T", ">", "withExpressionAttributeValues", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "expressionAttributeValues", ")", "{", "setExpressionAttributeValues", "(", "expressionAttributeValues", ")", ";", "return", "this", ";", "}" ]
One or more values that can be substituted in an expression. @param expressionAttributeValues One or more values that can be substituted in an expression. @return A reference to this updated object so that method calls can be chained together. @see QueryRequest#withExpressionAttributeValues(Map)
[ "One", "or", "more", "values", "that", "can", "be", "substituted", "in", "an", "expression", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBQueryExpression.java#L940-L944
20,212
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageResponse.java
MessageResponse.withEndpointResult
public MessageResponse withEndpointResult(java.util.Map<String, EndpointMessageResult> endpointResult) { setEndpointResult(endpointResult); return this; }
java
public MessageResponse withEndpointResult(java.util.Map<String, EndpointMessageResult> endpointResult) { setEndpointResult(endpointResult); return this; }
[ "public", "MessageResponse", "withEndpointResult", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "EndpointMessageResult", ">", "endpointResult", ")", "{", "setEndpointResult", "(", "endpointResult", ")", ";", "return", "this", ";", "}" ]
A map containing a multi part response for each address, with the endpointId as the key and the result as the value. @param endpointResult A map containing a multi part response for each address, with the endpointId as the key and the result as the value. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "map", "containing", "a", "multi", "part", "response", "for", "each", "address", "with", "the", "endpointId", "as", "the", "key", "and", "the", "result", "as", "the", "value", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageResponse.java#L113-L116
20,213
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ExtraMaterialsDescription.java
ExtraMaterialsDescription.mergeInto
public Map<String, String> mergeInto(Map<String, String> core) { if (extra.size() == 0) return core; // no supplemental descriptions if (core == null || core.size() == 0) return extra; // only core descriptions switch(resolve) { case FAIL_FAST: { final int total = core.size() + extra.size(); Map<String, String> merged = new HashMap<String,String>(core); merged.putAll(extra); if (total != merged.size()) { throw new IllegalArgumentException( "The supplemental material descriptions contains conflicting entries"); } return Collections.unmodifiableMap(merged); } case OVERRIDDEN: { Map<String,String> merged = new HashMap<String,String>(extra); merged.putAll(core); return Collections.unmodifiableMap(merged); } case OVERRIDE: { Map<String,String> merged = new HashMap<String,String>(core); merged.putAll(extra); return Collections.unmodifiableMap(merged); } default: throw new UnsupportedOperationException(); } }
java
public Map<String, String> mergeInto(Map<String, String> core) { if (extra.size() == 0) return core; // no supplemental descriptions if (core == null || core.size() == 0) return extra; // only core descriptions switch(resolve) { case FAIL_FAST: { final int total = core.size() + extra.size(); Map<String, String> merged = new HashMap<String,String>(core); merged.putAll(extra); if (total != merged.size()) { throw new IllegalArgumentException( "The supplemental material descriptions contains conflicting entries"); } return Collections.unmodifiableMap(merged); } case OVERRIDDEN: { Map<String,String> merged = new HashMap<String,String>(extra); merged.putAll(core); return Collections.unmodifiableMap(merged); } case OVERRIDE: { Map<String,String> merged = new HashMap<String,String>(core); merged.putAll(extra); return Collections.unmodifiableMap(merged); } default: throw new UnsupportedOperationException(); } }
[ "public", "Map", "<", "String", ",", "String", ">", "mergeInto", "(", "Map", "<", "String", ",", "String", ">", "core", ")", "{", "if", "(", "extra", ".", "size", "(", ")", "==", "0", ")", "return", "core", ";", "// no supplemental descriptions", "if", "(", "core", "==", "null", "||", "core", ".", "size", "(", ")", "==", "0", ")", "return", "extra", ";", "// only core descriptions", "switch", "(", "resolve", ")", "{", "case", "FAIL_FAST", ":", "{", "final", "int", "total", "=", "core", ".", "size", "(", ")", "+", "extra", ".", "size", "(", ")", ";", "Map", "<", "String", ",", "String", ">", "merged", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "core", ")", ";", "merged", ".", "putAll", "(", "extra", ")", ";", "if", "(", "total", "!=", "merged", ".", "size", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The supplemental material descriptions contains conflicting entries\"", ")", ";", "}", "return", "Collections", ".", "unmodifiableMap", "(", "merged", ")", ";", "}", "case", "OVERRIDDEN", ":", "{", "Map", "<", "String", ",", "String", ">", "merged", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "extra", ")", ";", "merged", ".", "putAll", "(", "core", ")", ";", "return", "Collections", ".", "unmodifiableMap", "(", "merged", ")", ";", "}", "case", "OVERRIDE", ":", "{", "Map", "<", "String", ",", "String", ">", "merged", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "core", ")", ";", "merged", ".", "putAll", "(", "extra", ")", ";", "return", "Collections", ".", "unmodifiableMap", "(", "merged", ")", ";", "}", "default", ":", "throw", "new", "UnsupportedOperationException", "(", ")", ";", "}", "}" ]
Combine this supplemental material descriptions with those specified in the "core" parameter. This method has no side effect. @param core the core material descriptions to be supplemented; assumed to be unmodifiable. @return the merged material descriptions; never null. The returned map is always unmodifiable, assuming the passed in core material descriptions are unmodifiable. @throws IllegalArgumentException if this supplemental material descriptions contains conflicting entries @throws UnsupportedOperationException if the conflict resolution strategy is not supported
[ "Combine", "this", "supplemental", "material", "descriptions", "with", "those", "specified", "in", "the", "core", "parameter", ".", "This", "method", "has", "no", "side", "effect", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ExtraMaterialsDescription.java#L99-L128
20,214
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateBrokerRequest.java
CreateBrokerRequest.withTags
public CreateBrokerRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public CreateBrokerRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateBrokerRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
Create tags when creating the broker. @param tags Create tags when creating the broker. @return Returns a reference to this object so that method calls can be chained together.
[ "Create", "tags", "when", "creating", "the", "broker", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/CreateBrokerRequest.java#L717-L720
20,215
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/transform/GeneratePreSignUrlRequestHandler.java
GeneratePreSignUrlRequestHandler.generateRequestForPresigning
private Request<CopySnapshotRequest> generateRequestForPresigning( String sourceSnapshotId, String sourceRegion, String destinationRegion) { CopySnapshotRequest copySnapshotRequest = new CopySnapshotRequest() .withSourceSnapshotId(sourceSnapshotId) .withSourceRegion(sourceRegion) .withDestinationRegion(destinationRegion); return new CopySnapshotRequestMarshaller() .marshall(copySnapshotRequest); }
java
private Request<CopySnapshotRequest> generateRequestForPresigning( String sourceSnapshotId, String sourceRegion, String destinationRegion) { CopySnapshotRequest copySnapshotRequest = new CopySnapshotRequest() .withSourceSnapshotId(sourceSnapshotId) .withSourceRegion(sourceRegion) .withDestinationRegion(destinationRegion); return new CopySnapshotRequestMarshaller() .marshall(copySnapshotRequest); }
[ "private", "Request", "<", "CopySnapshotRequest", ">", "generateRequestForPresigning", "(", "String", "sourceSnapshotId", ",", "String", "sourceRegion", ",", "String", "destinationRegion", ")", "{", "CopySnapshotRequest", "copySnapshotRequest", "=", "new", "CopySnapshotRequest", "(", ")", ".", "withSourceSnapshotId", "(", "sourceSnapshotId", ")", ".", "withSourceRegion", "(", "sourceRegion", ")", ".", "withDestinationRegion", "(", "destinationRegion", ")", ";", "return", "new", "CopySnapshotRequestMarshaller", "(", ")", ".", "marshall", "(", "copySnapshotRequest", ")", ";", "}" ]
Generates a Request object for the pre-signed URL.
[ "Generates", "a", "Request", "object", "for", "the", "pre", "-", "signed", "URL", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/transform/GeneratePreSignUrlRequestHandler.java#L101-L113
20,216
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/transform/GeneratePreSignUrlRequestHandler.java
GeneratePreSignUrlRequestHandler.toURI
private URI toURI(String endpoint) throws IllegalArgumentException { if (endpoint.contains("://") == false) { endpoint = Protocol.HTTPS + "://" + endpoint; } try { return new URI(endpoint); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }
java
private URI toURI(String endpoint) throws IllegalArgumentException { if (endpoint.contains("://") == false) { endpoint = Protocol.HTTPS + "://" + endpoint; } try { return new URI(endpoint); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }
[ "private", "URI", "toURI", "(", "String", "endpoint", ")", "throws", "IllegalArgumentException", "{", "if", "(", "endpoint", ".", "contains", "(", "\"://\"", ")", "==", "false", ")", "{", "endpoint", "=", "Protocol", ".", "HTTPS", "+", "\"://\"", "+", "endpoint", ";", "}", "try", "{", "return", "new", "URI", "(", "endpoint", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "e", ")", ";", "}", "}" ]
Returns the endpoint as a URI.
[ "Returns", "the", "endpoint", "as", "a", "URI", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/transform/GeneratePreSignUrlRequestHandler.java#L143-L154
20,217
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/EncryptedPutObjectRequest.java
EncryptedPutObjectRequest.setMaterialsDescription
public void setMaterialsDescription(Map<String, String> materialsDescription) { this.materialsDescription = materialsDescription == null ? null : Collections.unmodifiableMap(new HashMap<String,String>(materialsDescription)) ; }
java
public void setMaterialsDescription(Map<String, String> materialsDescription) { this.materialsDescription = materialsDescription == null ? null : Collections.unmodifiableMap(new HashMap<String,String>(materialsDescription)) ; }
[ "public", "void", "setMaterialsDescription", "(", "Map", "<", "String", ",", "String", ">", "materialsDescription", ")", "{", "this", ".", "materialsDescription", "=", "materialsDescription", "==", "null", "?", "null", ":", "Collections", ".", "unmodifiableMap", "(", "new", "HashMap", "<", "String", ",", "String", ">", "(", "materialsDescription", ")", ")", ";", "}" ]
sets the materials description for the encryption materials to be used with the current PutObjectRequest. @param materialsDescription the materialsDescription to set
[ "sets", "the", "materials", "description", "for", "the", "encryption", "materials", "to", "be", "used", "with", "the", "current", "PutObjectRequest", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/EncryptedPutObjectRequest.java#L67-L72
20,218
aws/aws-sdk-java
aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AbstractAmazonRedshiftAsync.java
AbstractAmazonRedshiftAsync.describeClusterParameterGroupsAsync
@Override public java.util.concurrent.Future<DescribeClusterParameterGroupsResult> describeClusterParameterGroupsAsync( com.amazonaws.handlers.AsyncHandler<DescribeClusterParameterGroupsRequest, DescribeClusterParameterGroupsResult> asyncHandler) { return describeClusterParameterGroupsAsync(new DescribeClusterParameterGroupsRequest(), asyncHandler); }
java
@Override public java.util.concurrent.Future<DescribeClusterParameterGroupsResult> describeClusterParameterGroupsAsync( com.amazonaws.handlers.AsyncHandler<DescribeClusterParameterGroupsRequest, DescribeClusterParameterGroupsResult> asyncHandler) { return describeClusterParameterGroupsAsync(new DescribeClusterParameterGroupsRequest(), asyncHandler); }
[ "@", "Override", "public", "java", ".", "util", ".", "concurrent", ".", "Future", "<", "DescribeClusterParameterGroupsResult", ">", "describeClusterParameterGroupsAsync", "(", "com", ".", "amazonaws", ".", "handlers", ".", "AsyncHandler", "<", "DescribeClusterParameterGroupsRequest", ",", "DescribeClusterParameterGroupsResult", ">", "asyncHandler", ")", "{", "return", "describeClusterParameterGroupsAsync", "(", "new", "DescribeClusterParameterGroupsRequest", "(", ")", ",", "asyncHandler", ")", ";", "}" ]
Simplified method form for invoking the DescribeClusterParameterGroups operation with an AsyncHandler. @see #describeClusterParameterGroupsAsync(DescribeClusterParameterGroupsRequest, com.amazonaws.handlers.AsyncHandler)
[ "Simplified", "method", "form", "for", "invoking", "the", "DescribeClusterParameterGroups", "operation", "with", "an", "AsyncHandler", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AbstractAmazonRedshiftAsync.java#L463-L468
20,219
aws/aws-sdk-java
aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AbstractAmazonRedshiftAsync.java
AbstractAmazonRedshiftAsync.describeReservedNodeOfferingsAsync
@Override public java.util.concurrent.Future<DescribeReservedNodeOfferingsResult> describeReservedNodeOfferingsAsync( com.amazonaws.handlers.AsyncHandler<DescribeReservedNodeOfferingsRequest, DescribeReservedNodeOfferingsResult> asyncHandler) { return describeReservedNodeOfferingsAsync(new DescribeReservedNodeOfferingsRequest(), asyncHandler); }
java
@Override public java.util.concurrent.Future<DescribeReservedNodeOfferingsResult> describeReservedNodeOfferingsAsync( com.amazonaws.handlers.AsyncHandler<DescribeReservedNodeOfferingsRequest, DescribeReservedNodeOfferingsResult> asyncHandler) { return describeReservedNodeOfferingsAsync(new DescribeReservedNodeOfferingsRequest(), asyncHandler); }
[ "@", "Override", "public", "java", ".", "util", ".", "concurrent", ".", "Future", "<", "DescribeReservedNodeOfferingsResult", ">", "describeReservedNodeOfferingsAsync", "(", "com", ".", "amazonaws", ".", "handlers", ".", "AsyncHandler", "<", "DescribeReservedNodeOfferingsRequest", ",", "DescribeReservedNodeOfferingsResult", ">", "asyncHandler", ")", "{", "return", "describeReservedNodeOfferingsAsync", "(", "new", "DescribeReservedNodeOfferingsRequest", "(", ")", ",", "asyncHandler", ")", ";", "}" ]
Simplified method form for invoking the DescribeReservedNodeOfferings operation with an AsyncHandler. @see #describeReservedNodeOfferingsAsync(DescribeReservedNodeOfferingsRequest, com.amazonaws.handlers.AsyncHandler)
[ "Simplified", "method", "form", "for", "invoking", "the", "DescribeReservedNodeOfferings", "operation", "with", "an", "AsyncHandler", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AbstractAmazonRedshiftAsync.java#L953-L958
20,220
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/SkipMd5CheckStrategy.java
SkipMd5CheckStrategy.metadataInvolvesSse
private boolean metadataInvolvesSse(ObjectMetadata metadata) { if (metadata == null) { return false; } return containsNonNull(metadata.getSSECustomerAlgorithm(), metadata.getSSECustomerKeyMd5(), metadata.getSSEAwsKmsKeyId()); }
java
private boolean metadataInvolvesSse(ObjectMetadata metadata) { if (metadata == null) { return false; } return containsNonNull(metadata.getSSECustomerAlgorithm(), metadata.getSSECustomerKeyMd5(), metadata.getSSEAwsKmsKeyId()); }
[ "private", "boolean", "metadataInvolvesSse", "(", "ObjectMetadata", "metadata", ")", "{", "if", "(", "metadata", "==", "null", ")", "{", "return", "false", ";", "}", "return", "containsNonNull", "(", "metadata", ".", "getSSECustomerAlgorithm", "(", ")", ",", "metadata", ".", "getSSECustomerKeyMd5", "(", ")", ",", "metadata", ".", "getSSEAwsKmsKeyId", "(", ")", ")", ";", "}" ]
If SSE-C or SSE-KMS is involved then the Etag will be the MD5 of the ciphertext not the plaintext so we can't validate it client side. Plain SSE with S3 managed keys will return an Etag that does match the MD5 of the plaintext so it's still eligible for client side validation. @param metadata Metadata of request or response @return True if the metadata indicates that SSE-C or SSE-KMS is used. False otherwise
[ "If", "SSE", "-", "C", "or", "SSE", "-", "KMS", "is", "involved", "then", "the", "Etag", "will", "be", "the", "MD5", "of", "the", "ciphertext", "not", "the", "plaintext", "so", "we", "can", "t", "validate", "it", "client", "side", ".", "Plain", "SSE", "with", "S3", "managed", "keys", "will", "return", "an", "Etag", "that", "does", "match", "the", "MD5", "of", "the", "plaintext", "so", "it", "s", "still", "eligible", "for", "client", "side", "validation", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/SkipMd5CheckStrategy.java#L304-L310
20,221
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/SkipMd5CheckStrategy.java
SkipMd5CheckStrategy.containsNonNull
private static boolean containsNonNull(Object... items) { for (Object item : items) { if (item != null) { return true; } } return false; }
java
private static boolean containsNonNull(Object... items) { for (Object item : items) { if (item != null) { return true; } } return false; }
[ "private", "static", "boolean", "containsNonNull", "(", "Object", "...", "items", ")", "{", "for", "(", "Object", "item", ":", "items", ")", "{", "if", "(", "item", "!=", "null", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
Helper method to avoid long chains of non null checks @param items @return True if any of the provided items is not null. False if all items are null.
[ "Helper", "method", "to", "avoid", "long", "chains", "of", "non", "null", "checks" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/SkipMd5CheckStrategy.java#L338-L345
20,222
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.describeBroker
@Override public DescribeBrokerResult describeBroker(DescribeBrokerRequest request) { request = beforeClientExecution(request); return executeDescribeBroker(request); }
java
@Override public DescribeBrokerResult describeBroker(DescribeBrokerRequest request) { request = beforeClientExecution(request); return executeDescribeBroker(request); }
[ "@", "Override", "public", "DescribeBrokerResult", "describeBroker", "(", "DescribeBrokerRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeBroker", "(", "request", ")", ";", "}" ]
Returns information about the specified broker. @param describeBrokerRequest @return Result of the DescribeBroker operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.DescribeBroker @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeBroker" target="_top">AWS API Documentation</a>
[ "Returns", "information", "about", "the", "specified", "broker", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L580-L584
20,223
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.describeBrokerEngineTypes
@Override public DescribeBrokerEngineTypesResult describeBrokerEngineTypes(DescribeBrokerEngineTypesRequest request) { request = beforeClientExecution(request); return executeDescribeBrokerEngineTypes(request); }
java
@Override public DescribeBrokerEngineTypesResult describeBrokerEngineTypes(DescribeBrokerEngineTypesRequest request) { request = beforeClientExecution(request); return executeDescribeBrokerEngineTypes(request); }
[ "@", "Override", "public", "DescribeBrokerEngineTypesResult", "describeBrokerEngineTypes", "(", "DescribeBrokerEngineTypesRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeBrokerEngineTypes", "(", "request", ")", ";", "}" ]
Describe available engine types and versions. @param describeBrokerEngineTypesRequest @return Result of the DescribeBrokerEngineTypes operation returned by the service. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.DescribeBrokerEngineTypes @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeBrokerEngineTypes" target="_top">AWS API Documentation</a>
[ "Describe", "available", "engine", "types", "and", "versions", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L636-L640
20,224
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.describeBrokerInstanceOptions
@Override public DescribeBrokerInstanceOptionsResult describeBrokerInstanceOptions(DescribeBrokerInstanceOptionsRequest request) { request = beforeClientExecution(request); return executeDescribeBrokerInstanceOptions(request); }
java
@Override public DescribeBrokerInstanceOptionsResult describeBrokerInstanceOptions(DescribeBrokerInstanceOptionsRequest request) { request = beforeClientExecution(request); return executeDescribeBrokerInstanceOptions(request); }
[ "@", "Override", "public", "DescribeBrokerInstanceOptionsResult", "describeBrokerInstanceOptions", "(", "DescribeBrokerInstanceOptionsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeBrokerInstanceOptions", "(", "request", ")", ";", "}" ]
Describe available broker instance options. @param describeBrokerInstanceOptionsRequest @return Result of the DescribeBrokerInstanceOptions operation returned by the service. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.DescribeBrokerInstanceOptions @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeBrokerInstanceOptions" target="_top">AWS API Documentation</a>
[ "Describe", "available", "broker", "instance", "options", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L694-L698
20,225
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.describeConfiguration
@Override public DescribeConfigurationResult describeConfiguration(DescribeConfigurationRequest request) { request = beforeClientExecution(request); return executeDescribeConfiguration(request); }
java
@Override public DescribeConfigurationResult describeConfiguration(DescribeConfigurationRequest request) { request = beforeClientExecution(request); return executeDescribeConfiguration(request); }
[ "@", "Override", "public", "DescribeConfigurationResult", "describeConfiguration", "(", "DescribeConfigurationRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeConfiguration", "(", "request", ")", ";", "}" ]
Returns information about the specified configuration. @param describeConfigurationRequest @return Result of the DescribeConfiguration operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.DescribeConfiguration @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfiguration" target="_top">AWS API Documentation</a>
[ "Returns", "information", "about", "the", "specified", "configuration", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L754-L758
20,226
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.describeConfigurationRevision
@Override public DescribeConfigurationRevisionResult describeConfigurationRevision(DescribeConfigurationRevisionRequest request) { request = beforeClientExecution(request); return executeDescribeConfigurationRevision(request); }
java
@Override public DescribeConfigurationRevisionResult describeConfigurationRevision(DescribeConfigurationRevisionRequest request) { request = beforeClientExecution(request); return executeDescribeConfigurationRevision(request); }
[ "@", "Override", "public", "DescribeConfigurationRevisionResult", "describeConfigurationRevision", "(", "DescribeConfigurationRevisionRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeConfigurationRevision", "(", "request", ")", ";", "}" ]
Returns the specified configuration revision for the specified configuration. @param describeConfigurationRevisionRequest @return Result of the DescribeConfigurationRevision operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.DescribeConfigurationRevision @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DescribeConfigurationRevision" target="_top">AWS API Documentation</a>
[ "Returns", "the", "specified", "configuration", "revision", "for", "the", "specified", "configuration", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L813-L817
20,227
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.listBrokers
@Override public ListBrokersResult listBrokers(ListBrokersRequest request) { request = beforeClientExecution(request); return executeListBrokers(request); }
java
@Override public ListBrokersResult listBrokers(ListBrokersRequest request) { request = beforeClientExecution(request); return executeListBrokers(request); }
[ "@", "Override", "public", "ListBrokersResult", "listBrokers", "(", "ListBrokersRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListBrokers", "(", "request", ")", ";", "}" ]
Returns a list of all brokers. @param listBrokersRequest @return Result of the ListBrokers operation returned by the service. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.ListBrokers @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListBrokers" target="_top">AWS API Documentation</a>
[ "Returns", "a", "list", "of", "all", "brokers", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L929-L933
20,228
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.listConfigurationRevisions
@Override public ListConfigurationRevisionsResult listConfigurationRevisions(ListConfigurationRevisionsRequest request) { request = beforeClientExecution(request); return executeListConfigurationRevisions(request); }
java
@Override public ListConfigurationRevisionsResult listConfigurationRevisions(ListConfigurationRevisionsRequest request) { request = beforeClientExecution(request); return executeListConfigurationRevisions(request); }
[ "@", "Override", "public", "ListConfigurationRevisionsResult", "listConfigurationRevisions", "(", "ListConfigurationRevisionsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListConfigurationRevisions", "(", "request", ")", ";", "}" ]
Returns a list of all revisions for the specified configuration. @param listConfigurationRevisionsRequest @return Result of the ListConfigurationRevisions operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.ListConfigurationRevisions @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListConfigurationRevisions" target="_top">AWS API Documentation</a>
[ "Returns", "a", "list", "of", "all", "revisions", "for", "the", "specified", "configuration", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L987-L991
20,229
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.updateBroker
@Override public UpdateBrokerResult updateBroker(UpdateBrokerRequest request) { request = beforeClientExecution(request); return executeUpdateBroker(request); }
java
@Override public UpdateBrokerResult updateBroker(UpdateBrokerRequest request) { request = beforeClientExecution(request); return executeUpdateBroker(request); }
[ "@", "Override", "public", "UpdateBrokerResult", "updateBroker", "(", "UpdateBrokerRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdateBroker", "(", "request", ")", ";", "}" ]
Adds a pending configuration change to a broker. @param updateBrokerRequest Updates the broker using the specified properties. @return Result of the UpdateBroker operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ConflictException HTTP Status Code 409: Conflict. Concurrent broker update detected. Retrying your request might resolve the issue. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request. @sample AmazonMQ.UpdateBroker @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateBroker" target="_top">AWS API Documentation</a>
[ "Adds", "a", "pending", "configuration", "change", "to", "a", "broker", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L1281-L1285
20,230
aws/aws-sdk-java
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java
AmazonMQClient.updateConfiguration
@Override public UpdateConfigurationResult updateConfiguration(UpdateConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateConfiguration(request); }
java
@Override public UpdateConfigurationResult updateConfiguration(UpdateConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateConfiguration(request); }
[ "@", "Override", "public", "UpdateConfigurationResult", "updateConfiguration", "(", "UpdateConfigurationRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdateConfiguration", "(", "request", ")", ";", "}" ]
Updates the specified configuration. @param updateConfigurationRequest Updates the specified configuration. @return Result of the UpdateConfiguration operation returned by the service. @throws NotFoundException HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it. @throws BadRequestException HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it. @throws InternalServerErrorException HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue. @throws ConflictException HTTP Status Code 409: Conflict. Concurrent update to configuration. Retry to create a new revision. @throws ForbiddenException HTTP Status Code 403: Access forbidden. Correct your input and then retry your request. @sample AmazonMQ.UpdateConfiguration @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/UpdateConfiguration" target="_top">AWS API Documentation</a>
[ "Updates", "the", "specified", "configuration", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/AmazonMQClient.java#L1342-L1346
20,231
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.initClients
protected static void initClients() throws Exception { /* * The ProfileCredentialsProvider will return your [default] credential * profile by reading from the credentials file located at * (~/.aws/credentials). */ ProfileCredentialsProvider credentialsProvider = new ProfileCredentialsProvider(); try { credentialsProvider.getCredentials(); } catch (Exception e) { throw new AmazonClientException("Cannot load the credentials from the credential profiles file. " + "Please make sure that your credentials file is at the correct " + "location (~/.aws/credentials), and is in valid format.", e); } // S3 client s3Client = AmazonS3ClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(s3RegionName) .build(); // Firehose client firehoseClient = AmazonKinesisFirehoseClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(firehoseRegion) .build(); // IAM client iamClient = AmazonIdentityManagementClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(iamRegion) .build(); }
java
protected static void initClients() throws Exception { /* * The ProfileCredentialsProvider will return your [default] credential * profile by reading from the credentials file located at * (~/.aws/credentials). */ ProfileCredentialsProvider credentialsProvider = new ProfileCredentialsProvider(); try { credentialsProvider.getCredentials(); } catch (Exception e) { throw new AmazonClientException("Cannot load the credentials from the credential profiles file. " + "Please make sure that your credentials file is at the correct " + "location (~/.aws/credentials), and is in valid format.", e); } // S3 client s3Client = AmazonS3ClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(s3RegionName) .build(); // Firehose client firehoseClient = AmazonKinesisFirehoseClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(firehoseRegion) .build(); // IAM client iamClient = AmazonIdentityManagementClientBuilder.standard() .withCredentials(credentialsProvider) .withRegion(iamRegion) .build(); }
[ "protected", "static", "void", "initClients", "(", ")", "throws", "Exception", "{", "/*\n * The ProfileCredentialsProvider will return your [default] credential\n * profile by reading from the credentials file located at\n * (~/.aws/credentials).\n */", "ProfileCredentialsProvider", "credentialsProvider", "=", "new", "ProfileCredentialsProvider", "(", ")", ";", "try", "{", "credentialsProvider", ".", "getCredentials", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "AmazonClientException", "(", "\"Cannot load the credentials from the credential profiles file. \"", "+", "\"Please make sure that your credentials file is at the correct \"", "+", "\"location (~/.aws/credentials), and is in valid format.\"", ",", "e", ")", ";", "}", "// S3 client", "s3Client", "=", "AmazonS3ClientBuilder", ".", "standard", "(", ")", ".", "withCredentials", "(", "credentialsProvider", ")", ".", "withRegion", "(", "s3RegionName", ")", ".", "build", "(", ")", ";", "// Firehose client", "firehoseClient", "=", "AmazonKinesisFirehoseClientBuilder", ".", "standard", "(", ")", ".", "withCredentials", "(", "credentialsProvider", ")", ".", "withRegion", "(", "firehoseRegion", ")", ".", "build", "(", ")", ";", "// IAM client", "iamClient", "=", "AmazonIdentityManagementClientBuilder", ".", "standard", "(", ")", ".", "withCredentials", "(", "credentialsProvider", ")", ".", "withRegion", "(", "iamRegion", ")", ".", "build", "(", ")", ";", "}" ]
Method to initialize the clients using the specified AWSCredentials. @param Exception
[ "Method", "to", "initialize", "the", "clients", "using", "the", "specified", "AWSCredentials", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L119-L152
20,232
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.createS3Bucket
protected static void createS3Bucket() throws Exception { if (StringUtils.isNullOrEmpty(s3BucketName.trim())) { throw new IllegalArgumentException("Bucket name is empty. Please enter a bucket name " + "in firehosetos3sample.properties file"); } // Create S3 bucket if specified in the properties if (createS3Bucket) { s3Client.createBucket(s3BucketName); LOG.info("Created bucket " + s3BucketName + " in S3 to deliver Firehose records"); } }
java
protected static void createS3Bucket() throws Exception { if (StringUtils.isNullOrEmpty(s3BucketName.trim())) { throw new IllegalArgumentException("Bucket name is empty. Please enter a bucket name " + "in firehosetos3sample.properties file"); } // Create S3 bucket if specified in the properties if (createS3Bucket) { s3Client.createBucket(s3BucketName); LOG.info("Created bucket " + s3BucketName + " in S3 to deliver Firehose records"); } }
[ "protected", "static", "void", "createS3Bucket", "(", ")", "throws", "Exception", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "s3BucketName", ".", "trim", "(", ")", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Bucket name is empty. Please enter a bucket name \"", "+", "\"in firehosetos3sample.properties file\"", ")", ";", "}", "// Create S3 bucket if specified in the properties", "if", "(", "createS3Bucket", ")", "{", "s3Client", ".", "createBucket", "(", "s3BucketName", ")", ";", "LOG", ".", "info", "(", "\"Created bucket \"", "+", "s3BucketName", "+", "\" in S3 to deliver Firehose records\"", ")", ";", "}", "}" ]
Method to create the S3 bucket in specified region. @throws Exception
[ "Method", "to", "create", "the", "S3", "bucket", "in", "specified", "region", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L159-L170
20,233
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.printDeliveryStreams
protected static void printDeliveryStreams() { // list all of my DeliveryStreams List<String> deliveryStreamNames = listDeliveryStreams(); LOG.info("Printing my list of DeliveryStreams : "); if (deliveryStreamNames.isEmpty()) { LOG.info("There are no DeliveryStreams for account: " + accountId); } else { LOG.info("List of my DeliveryStreams: "); } for (int i = 0; i < deliveryStreamNames.size(); i++) { LOG.info(deliveryStreamNames.get(i)); } }
java
protected static void printDeliveryStreams() { // list all of my DeliveryStreams List<String> deliveryStreamNames = listDeliveryStreams(); LOG.info("Printing my list of DeliveryStreams : "); if (deliveryStreamNames.isEmpty()) { LOG.info("There are no DeliveryStreams for account: " + accountId); } else { LOG.info("List of my DeliveryStreams: "); } for (int i = 0; i < deliveryStreamNames.size(); i++) { LOG.info(deliveryStreamNames.get(i)); } }
[ "protected", "static", "void", "printDeliveryStreams", "(", ")", "{", "// list all of my DeliveryStreams", "List", "<", "String", ">", "deliveryStreamNames", "=", "listDeliveryStreams", "(", ")", ";", "LOG", ".", "info", "(", "\"Printing my list of DeliveryStreams : \"", ")", ";", "if", "(", "deliveryStreamNames", ".", "isEmpty", "(", ")", ")", "{", "LOG", ".", "info", "(", "\"There are no DeliveryStreams for account: \"", "+", "accountId", ")", ";", "}", "else", "{", "LOG", ".", "info", "(", "\"List of my DeliveryStreams: \"", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "deliveryStreamNames", ".", "size", "(", ")", ";", "i", "++", ")", "{", "LOG", ".", "info", "(", "deliveryStreamNames", ".", "get", "(", "i", ")", ")", ";", "}", "}" ]
Method to print all the delivery streams in the customer account.
[ "Method", "to", "print", "all", "the", "delivery", "streams", "in", "the", "customer", "account", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L175-L188
20,234
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.listDeliveryStreams
protected static List<String> listDeliveryStreams() { ListDeliveryStreamsRequest listDeliveryStreamsRequest = new ListDeliveryStreamsRequest(); ListDeliveryStreamsResult listDeliveryStreamsResult = firehoseClient.listDeliveryStreams(listDeliveryStreamsRequest); List<String> deliveryStreamNames = listDeliveryStreamsResult.getDeliveryStreamNames(); while (listDeliveryStreamsResult.isHasMoreDeliveryStreams()) { if (deliveryStreamNames.size() > 0) { listDeliveryStreamsRequest.setExclusiveStartDeliveryStreamName(deliveryStreamNames.get(deliveryStreamNames.size() - 1)); } listDeliveryStreamsResult = firehoseClient.listDeliveryStreams(listDeliveryStreamsRequest); deliveryStreamNames.addAll(listDeliveryStreamsResult.getDeliveryStreamNames()); } return deliveryStreamNames; }
java
protected static List<String> listDeliveryStreams() { ListDeliveryStreamsRequest listDeliveryStreamsRequest = new ListDeliveryStreamsRequest(); ListDeliveryStreamsResult listDeliveryStreamsResult = firehoseClient.listDeliveryStreams(listDeliveryStreamsRequest); List<String> deliveryStreamNames = listDeliveryStreamsResult.getDeliveryStreamNames(); while (listDeliveryStreamsResult.isHasMoreDeliveryStreams()) { if (deliveryStreamNames.size() > 0) { listDeliveryStreamsRequest.setExclusiveStartDeliveryStreamName(deliveryStreamNames.get(deliveryStreamNames.size() - 1)); } listDeliveryStreamsResult = firehoseClient.listDeliveryStreams(listDeliveryStreamsRequest); deliveryStreamNames.addAll(listDeliveryStreamsResult.getDeliveryStreamNames()); } return deliveryStreamNames; }
[ "protected", "static", "List", "<", "String", ">", "listDeliveryStreams", "(", ")", "{", "ListDeliveryStreamsRequest", "listDeliveryStreamsRequest", "=", "new", "ListDeliveryStreamsRequest", "(", ")", ";", "ListDeliveryStreamsResult", "listDeliveryStreamsResult", "=", "firehoseClient", ".", "listDeliveryStreams", "(", "listDeliveryStreamsRequest", ")", ";", "List", "<", "String", ">", "deliveryStreamNames", "=", "listDeliveryStreamsResult", ".", "getDeliveryStreamNames", "(", ")", ";", "while", "(", "listDeliveryStreamsResult", ".", "isHasMoreDeliveryStreams", "(", ")", ")", "{", "if", "(", "deliveryStreamNames", ".", "size", "(", ")", ">", "0", ")", "{", "listDeliveryStreamsRequest", ".", "setExclusiveStartDeliveryStreamName", "(", "deliveryStreamNames", ".", "get", "(", "deliveryStreamNames", ".", "size", "(", ")", "-", "1", ")", ")", ";", "}", "listDeliveryStreamsResult", "=", "firehoseClient", ".", "listDeliveryStreams", "(", "listDeliveryStreamsRequest", ")", ";", "deliveryStreamNames", ".", "addAll", "(", "listDeliveryStreamsResult", ".", "getDeliveryStreamNames", "(", ")", ")", ";", "}", "return", "deliveryStreamNames", ";", "}" ]
Method to list all the delivery streams in the customer account. @return the collection of delivery streams
[ "Method", "to", "list", "all", "the", "delivery", "streams", "in", "the", "customer", "account", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L195-L210
20,235
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.putRecordIntoDeliveryStream
protected static void putRecordIntoDeliveryStream() throws IOException { try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(PUT_RECORD_STREAM_SOURCE)) { if (inputStream == null) { throw new FileNotFoundException("Could not find file " + PUT_RECORD_STREAM_SOURCE); } try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { String line = null; while ((line = reader.readLine()) != null) { PutRecordRequest putRecordRequest = new PutRecordRequest(); putRecordRequest.setDeliveryStreamName(deliveryStreamName); String data = line + "\n"; Record record = createRecord(data); putRecordRequest.setRecord(record); // Put record into the DeliveryStream firehoseClient.putRecord(putRecordRequest); } } } }
java
protected static void putRecordIntoDeliveryStream() throws IOException { try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(PUT_RECORD_STREAM_SOURCE)) { if (inputStream == null) { throw new FileNotFoundException("Could not find file " + PUT_RECORD_STREAM_SOURCE); } try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { String line = null; while ((line = reader.readLine()) != null) { PutRecordRequest putRecordRequest = new PutRecordRequest(); putRecordRequest.setDeliveryStreamName(deliveryStreamName); String data = line + "\n"; Record record = createRecord(data); putRecordRequest.setRecord(record); // Put record into the DeliveryStream firehoseClient.putRecord(putRecordRequest); } } } }
[ "protected", "static", "void", "putRecordIntoDeliveryStream", "(", ")", "throws", "IOException", "{", "try", "(", "InputStream", "inputStream", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ".", "getResourceAsStream", "(", "PUT_RECORD_STREAM_SOURCE", ")", ")", "{", "if", "(", "inputStream", "==", "null", ")", "{", "throw", "new", "FileNotFoundException", "(", "\"Could not find file \"", "+", "PUT_RECORD_STREAM_SOURCE", ")", ";", "}", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "inputStream", ")", ")", ")", "{", "String", "line", "=", "null", ";", "while", "(", "(", "line", "=", "reader", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "PutRecordRequest", "putRecordRequest", "=", "new", "PutRecordRequest", "(", ")", ";", "putRecordRequest", ".", "setDeliveryStreamName", "(", "deliveryStreamName", ")", ";", "String", "data", "=", "line", "+", "\"\\n\"", ";", "Record", "record", "=", "createRecord", "(", "data", ")", ";", "putRecordRequest", ".", "setRecord", "(", "record", ")", ";", "// Put record into the DeliveryStream", "firehoseClient", ".", "putRecord", "(", "putRecordRequest", ")", ";", "}", "}", "}", "}" ]
Method to put records in the specified delivery stream by reading contents from sample input file using PutRecord API. @throws IOException
[ "Method", "to", "put", "records", "in", "the", "specified", "delivery", "stream", "by", "reading", "contents", "from", "sample", "input", "file", "using", "PutRecord", "API", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L218-L240
20,236
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.putRecordBatchIntoDeliveryStream
protected static void putRecordBatchIntoDeliveryStream() throws IOException { try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(BATCH_PUT_STREAM_SOURCE)) { if (inputStream == null) { throw new FileNotFoundException("Could not find file " + BATCH_PUT_STREAM_SOURCE); } List<Record> recordList = new ArrayList<Record>(); int batchSize = 0; try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { String line = null; while ((line = reader.readLine()) != null) { String data = line + "\n"; Record record = createRecord(data); recordList.add(record); batchSize++; if (batchSize == BATCH_PUT_MAX_SIZE) { putRecordBatch(recordList); recordList.clear(); batchSize = 0; } } if (batchSize > 0) { putRecordBatch(recordList); } } } }
java
protected static void putRecordBatchIntoDeliveryStream() throws IOException { try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(BATCH_PUT_STREAM_SOURCE)) { if (inputStream == null) { throw new FileNotFoundException("Could not find file " + BATCH_PUT_STREAM_SOURCE); } List<Record> recordList = new ArrayList<Record>(); int batchSize = 0; try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { String line = null; while ((line = reader.readLine()) != null) { String data = line + "\n"; Record record = createRecord(data); recordList.add(record); batchSize++; if (batchSize == BATCH_PUT_MAX_SIZE) { putRecordBatch(recordList); recordList.clear(); batchSize = 0; } } if (batchSize > 0) { putRecordBatch(recordList); } } } }
[ "protected", "static", "void", "putRecordBatchIntoDeliveryStream", "(", ")", "throws", "IOException", "{", "try", "(", "InputStream", "inputStream", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ".", "getResourceAsStream", "(", "BATCH_PUT_STREAM_SOURCE", ")", ")", "{", "if", "(", "inputStream", "==", "null", ")", "{", "throw", "new", "FileNotFoundException", "(", "\"Could not find file \"", "+", "BATCH_PUT_STREAM_SOURCE", ")", ";", "}", "List", "<", "Record", ">", "recordList", "=", "new", "ArrayList", "<", "Record", ">", "(", ")", ";", "int", "batchSize", "=", "0", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "inputStream", ")", ")", ")", "{", "String", "line", "=", "null", ";", "while", "(", "(", "line", "=", "reader", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "String", "data", "=", "line", "+", "\"\\n\"", ";", "Record", "record", "=", "createRecord", "(", "data", ")", ";", "recordList", ".", "add", "(", "record", ")", ";", "batchSize", "++", ";", "if", "(", "batchSize", "==", "BATCH_PUT_MAX_SIZE", ")", "{", "putRecordBatch", "(", "recordList", ")", ";", "recordList", ".", "clear", "(", ")", ";", "batchSize", "=", "0", ";", "}", "}", "if", "(", "batchSize", ">", "0", ")", "{", "putRecordBatch", "(", "recordList", ")", ";", "}", "}", "}", "}" ]
Method to put records in the specified delivery stream by reading contents from sample input file using PutRecordBatch API. @throws IOException
[ "Method", "to", "put", "records", "in", "the", "specified", "delivery", "stream", "by", "reading", "contents", "from", "sample", "input", "file", "using", "PutRecordBatch", "API", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L248-L278
20,237
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.createIamRole
protected static String createIamRole(String s3Prefix) throws InterruptedException { try { //set trust policy for the role iamClient.createRole(new CreateRoleRequest() .withRoleName(iamRoleName) .withAssumeRolePolicyDocument(getTrustPolicy())); } catch (EntityAlreadyExistsException e) { LOG.info("IAM role with name " + iamRoleName + " already exists"); } catch (MalformedPolicyDocumentException policyDocumentException){ LOG.error(String.format("Please check the trust policy document for malformation: %s", IAM_ROLE_TRUST_POLICY_DOCUMENT)); throw policyDocumentException; } // Update the role policy with permissions so that principal can access the resources // with necessary conditions putRolePolicy(s3Prefix); String roleARN = iamClient.getRole(new GetRoleRequest().withRoleName(iamRoleName)).getRole().getArn(); // Sleep for 5 seconds because IAM role creation takes some time to propagate Thread.sleep(5000); return roleARN; }
java
protected static String createIamRole(String s3Prefix) throws InterruptedException { try { //set trust policy for the role iamClient.createRole(new CreateRoleRequest() .withRoleName(iamRoleName) .withAssumeRolePolicyDocument(getTrustPolicy())); } catch (EntityAlreadyExistsException e) { LOG.info("IAM role with name " + iamRoleName + " already exists"); } catch (MalformedPolicyDocumentException policyDocumentException){ LOG.error(String.format("Please check the trust policy document for malformation: %s", IAM_ROLE_TRUST_POLICY_DOCUMENT)); throw policyDocumentException; } // Update the role policy with permissions so that principal can access the resources // with necessary conditions putRolePolicy(s3Prefix); String roleARN = iamClient.getRole(new GetRoleRequest().withRoleName(iamRoleName)).getRole().getArn(); // Sleep for 5 seconds because IAM role creation takes some time to propagate Thread.sleep(5000); return roleARN; }
[ "protected", "static", "String", "createIamRole", "(", "String", "s3Prefix", ")", "throws", "InterruptedException", "{", "try", "{", "//set trust policy for the role", "iamClient", ".", "createRole", "(", "new", "CreateRoleRequest", "(", ")", ".", "withRoleName", "(", "iamRoleName", ")", ".", "withAssumeRolePolicyDocument", "(", "getTrustPolicy", "(", ")", ")", ")", ";", "}", "catch", "(", "EntityAlreadyExistsException", "e", ")", "{", "LOG", ".", "info", "(", "\"IAM role with name \"", "+", "iamRoleName", "+", "\" already exists\"", ")", ";", "}", "catch", "(", "MalformedPolicyDocumentException", "policyDocumentException", ")", "{", "LOG", ".", "error", "(", "String", ".", "format", "(", "\"Please check the trust policy document for malformation: %s\"", ",", "IAM_ROLE_TRUST_POLICY_DOCUMENT", ")", ")", ";", "throw", "policyDocumentException", ";", "}", "// Update the role policy with permissions so that principal can access the resources", "// with necessary conditions", "putRolePolicy", "(", "s3Prefix", ")", ";", "String", "roleARN", "=", "iamClient", ".", "getRole", "(", "new", "GetRoleRequest", "(", ")", ".", "withRoleName", "(", "iamRoleName", ")", ")", ".", "getRole", "(", ")", ".", "getArn", "(", ")", ";", "// Sleep for 5 seconds because IAM role creation takes some time to propagate", "Thread", ".", "sleep", "(", "5000", ")", ";", "return", "roleARN", ";", "}" ]
Method to create the IAM role. @param s3Prefix the s3Prefix to be specified in role policy (only when KMS key ARN is specified) @return the role ARN @throws InterruptedException
[ "Method", "to", "create", "the", "IAM", "role", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L287-L309
20,238
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.waitForDeliveryStreamToBecomeAvailable
protected static void waitForDeliveryStreamToBecomeAvailable(String deliveryStreamName) throws Exception { LOG.info("Waiting for " + deliveryStreamName + " to become ACTIVE..."); long startTime = System.currentTimeMillis(); long endTime = startTime + (10 * 60 * 1000); while (System.currentTimeMillis() < endTime) { try { Thread.sleep(1000 * 20); } catch (InterruptedException e) { // Ignore interruption (doesn't impact deliveryStream creation) } DeliveryStreamDescription deliveryStreamDescription = describeDeliveryStream(deliveryStreamName); String deliveryStreamStatus = deliveryStreamDescription.getDeliveryStreamStatus(); LOG.info(" - current state: " + deliveryStreamStatus); if (deliveryStreamStatus.equals("ACTIVE")) { return; } } throw new AmazonServiceException("DeliveryStream " + deliveryStreamName + " never went active"); }
java
protected static void waitForDeliveryStreamToBecomeAvailable(String deliveryStreamName) throws Exception { LOG.info("Waiting for " + deliveryStreamName + " to become ACTIVE..."); long startTime = System.currentTimeMillis(); long endTime = startTime + (10 * 60 * 1000); while (System.currentTimeMillis() < endTime) { try { Thread.sleep(1000 * 20); } catch (InterruptedException e) { // Ignore interruption (doesn't impact deliveryStream creation) } DeliveryStreamDescription deliveryStreamDescription = describeDeliveryStream(deliveryStreamName); String deliveryStreamStatus = deliveryStreamDescription.getDeliveryStreamStatus(); LOG.info(" - current state: " + deliveryStreamStatus); if (deliveryStreamStatus.equals("ACTIVE")) { return; } } throw new AmazonServiceException("DeliveryStream " + deliveryStreamName + " never went active"); }
[ "protected", "static", "void", "waitForDeliveryStreamToBecomeAvailable", "(", "String", "deliveryStreamName", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Waiting for \"", "+", "deliveryStreamName", "+", "\" to become ACTIVE...\"", ")", ";", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "endTime", "=", "startTime", "+", "(", "10", "*", "60", "*", "1000", ")", ";", "while", "(", "System", ".", "currentTimeMillis", "(", ")", "<", "endTime", ")", "{", "try", "{", "Thread", ".", "sleep", "(", "1000", "*", "20", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "// Ignore interruption (doesn't impact deliveryStream creation)", "}", "DeliveryStreamDescription", "deliveryStreamDescription", "=", "describeDeliveryStream", "(", "deliveryStreamName", ")", ";", "String", "deliveryStreamStatus", "=", "deliveryStreamDescription", ".", "getDeliveryStreamStatus", "(", ")", ";", "LOG", ".", "info", "(", "\" - current state: \"", "+", "deliveryStreamStatus", ")", ";", "if", "(", "deliveryStreamStatus", ".", "equals", "(", "\"ACTIVE\"", ")", ")", "{", "return", ";", "}", "}", "throw", "new", "AmazonServiceException", "(", "\"DeliveryStream \"", "+", "deliveryStreamName", "+", "\" never went active\"", ")", ";", "}" ]
Method to wait until the delivery stream becomes active. @param deliveryStreamName the delivery stream @throws Exception
[ "Method", "to", "wait", "until", "the", "delivery", "stream", "becomes", "active", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L317-L339
20,239
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.describeDeliveryStream
protected static DeliveryStreamDescription describeDeliveryStream(String deliveryStreamName) { DescribeDeliveryStreamRequest describeDeliveryStreamRequest = new DescribeDeliveryStreamRequest(); describeDeliveryStreamRequest.withDeliveryStreamName(deliveryStreamName); DescribeDeliveryStreamResult describeDeliveryStreamResponse = firehoseClient.describeDeliveryStream(describeDeliveryStreamRequest); return describeDeliveryStreamResponse.getDeliveryStreamDescription(); }
java
protected static DeliveryStreamDescription describeDeliveryStream(String deliveryStreamName) { DescribeDeliveryStreamRequest describeDeliveryStreamRequest = new DescribeDeliveryStreamRequest(); describeDeliveryStreamRequest.withDeliveryStreamName(deliveryStreamName); DescribeDeliveryStreamResult describeDeliveryStreamResponse = firehoseClient.describeDeliveryStream(describeDeliveryStreamRequest); return describeDeliveryStreamResponse.getDeliveryStreamDescription(); }
[ "protected", "static", "DeliveryStreamDescription", "describeDeliveryStream", "(", "String", "deliveryStreamName", ")", "{", "DescribeDeliveryStreamRequest", "describeDeliveryStreamRequest", "=", "new", "DescribeDeliveryStreamRequest", "(", ")", ";", "describeDeliveryStreamRequest", ".", "withDeliveryStreamName", "(", "deliveryStreamName", ")", ";", "DescribeDeliveryStreamResult", "describeDeliveryStreamResponse", "=", "firehoseClient", ".", "describeDeliveryStream", "(", "describeDeliveryStreamRequest", ")", ";", "return", "describeDeliveryStreamResponse", ".", "getDeliveryStreamDescription", "(", ")", ";", "}" ]
Method to describe the delivery stream. @param deliveryStreamName the delivery stream @return the delivery description
[ "Method", "to", "describe", "the", "delivery", "stream", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L347-L353
20,240
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.waitForDataDelivery
protected static void waitForDataDelivery(int waitTimeSecs) throws InterruptedException { LOG.info("Since the Buffering Hints IntervalInSeconds parameter is specified as: " + waitTimeSecs + " seconds. Waiting for " + waitTimeSecs + " seconds for the data to be written to S3 bucket"); TimeUnit.SECONDS.sleep(waitTimeSecs); LOG.info("Data delivery to S3 bucket " + s3BucketName + " is complete"); }
java
protected static void waitForDataDelivery(int waitTimeSecs) throws InterruptedException { LOG.info("Since the Buffering Hints IntervalInSeconds parameter is specified as: " + waitTimeSecs + " seconds. Waiting for " + waitTimeSecs + " seconds for the data to be written to S3 bucket"); TimeUnit.SECONDS.sleep(waitTimeSecs); LOG.info("Data delivery to S3 bucket " + s3BucketName + " is complete"); }
[ "protected", "static", "void", "waitForDataDelivery", "(", "int", "waitTimeSecs", ")", "throws", "InterruptedException", "{", "LOG", ".", "info", "(", "\"Since the Buffering Hints IntervalInSeconds parameter is specified as: \"", "+", "waitTimeSecs", "+", "\" seconds. Waiting for \"", "+", "waitTimeSecs", "+", "\" seconds for the data to be written to S3 bucket\"", ")", ";", "TimeUnit", ".", "SECONDS", ".", "sleep", "(", "waitTimeSecs", ")", ";", "LOG", ".", "info", "(", "\"Data delivery to S3 bucket \"", "+", "s3BucketName", "+", "\" is complete\"", ")", ";", "}" ]
Method to wait for the specified buffering interval seconds so that data will be delivered to corresponding destination. @param waitTimeSecs the buffering interval seconds to wait upon @throws InterruptedException
[ "Method", "to", "wait", "for", "the", "specified", "buffering", "interval", "seconds", "so", "that", "data", "will", "be", "delivered", "to", "corresponding", "destination", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L362-L368
20,241
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.getBucketARN
protected static String getBucketARN(String bucketName) throws IllegalArgumentException { return new StringBuilder().append(S3_ARN_PREFIX).append(bucketName).toString(); }
java
protected static String getBucketARN(String bucketName) throws IllegalArgumentException { return new StringBuilder().append(S3_ARN_PREFIX).append(bucketName).toString(); }
[ "protected", "static", "String", "getBucketARN", "(", "String", "bucketName", ")", "throws", "IllegalArgumentException", "{", "return", "new", "StringBuilder", "(", ")", ".", "append", "(", "S3_ARN_PREFIX", ")", ".", "append", "(", "bucketName", ")", ".", "toString", "(", ")", ";", "}" ]
Method to return the bucket ARN. @param bucketName the bucket name to be formulated as ARN @return the bucket ARN @throws IllegalArgumentException
[ "Method", "to", "return", "the", "bucket", "ARN", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L377-L379
20,242
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.putRecordBatch
private static PutRecordBatchResult putRecordBatch(List<Record> recordList) { PutRecordBatchRequest putRecordBatchRequest = new PutRecordBatchRequest(); putRecordBatchRequest.setDeliveryStreamName(deliveryStreamName); putRecordBatchRequest.setRecords(recordList); // Put Record Batch records. Max No.Of Records we can put in a // single put record batch request is 500 return firehoseClient.putRecordBatch(putRecordBatchRequest); }
java
private static PutRecordBatchResult putRecordBatch(List<Record> recordList) { PutRecordBatchRequest putRecordBatchRequest = new PutRecordBatchRequest(); putRecordBatchRequest.setDeliveryStreamName(deliveryStreamName); putRecordBatchRequest.setRecords(recordList); // Put Record Batch records. Max No.Of Records we can put in a // single put record batch request is 500 return firehoseClient.putRecordBatch(putRecordBatchRequest); }
[ "private", "static", "PutRecordBatchResult", "putRecordBatch", "(", "List", "<", "Record", ">", "recordList", ")", "{", "PutRecordBatchRequest", "putRecordBatchRequest", "=", "new", "PutRecordBatchRequest", "(", ")", ";", "putRecordBatchRequest", ".", "setDeliveryStreamName", "(", "deliveryStreamName", ")", ";", "putRecordBatchRequest", ".", "setRecords", "(", "recordList", ")", ";", "// Put Record Batch records. Max No.Of Records we can put in a", "// single put record batch request is 500", "return", "firehoseClient", ".", "putRecordBatch", "(", "putRecordBatchRequest", ")", ";", "}" ]
Method to perform PutRecordBatch operation with the given record list. @param recordList the collection of records @return the output of PutRecordBatch
[ "Method", "to", "perform", "PutRecordBatch", "operation", "with", "the", "given", "record", "list", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L387-L395
20,243
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.putRolePolicy
protected static void putRolePolicy(String s3Prefix) { try { // set permissions policy for the role String permissionsPolicyDocument = containsKMSKeyARN() ? getPermissionsPolicyWithKMSResources(s3Prefix) : getPermissionsPolicyWithoutKMSResources(); iamClient.putRolePolicy(new PutRolePolicyRequest() .withRoleName(iamRoleName) .withPolicyName(FIREHOSE_ROLE_POLICY_NAME) .withPolicyDocument(permissionsPolicyDocument)); } catch (MalformedPolicyDocumentException policyDocumentException){ LOG.error(String.format("Please check the permissions policy document for malformation: %s", containsKMSKeyARN() ? IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT : IAM_ROLE_PERMISSIONS_POLICY_WITHOUT_KMS_RESOURCES_DOCUMENT)); throw policyDocumentException; } }
java
protected static void putRolePolicy(String s3Prefix) { try { // set permissions policy for the role String permissionsPolicyDocument = containsKMSKeyARN() ? getPermissionsPolicyWithKMSResources(s3Prefix) : getPermissionsPolicyWithoutKMSResources(); iamClient.putRolePolicy(new PutRolePolicyRequest() .withRoleName(iamRoleName) .withPolicyName(FIREHOSE_ROLE_POLICY_NAME) .withPolicyDocument(permissionsPolicyDocument)); } catch (MalformedPolicyDocumentException policyDocumentException){ LOG.error(String.format("Please check the permissions policy document for malformation: %s", containsKMSKeyARN() ? IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT : IAM_ROLE_PERMISSIONS_POLICY_WITHOUT_KMS_RESOURCES_DOCUMENT)); throw policyDocumentException; } }
[ "protected", "static", "void", "putRolePolicy", "(", "String", "s3Prefix", ")", "{", "try", "{", "// set permissions policy for the role", "String", "permissionsPolicyDocument", "=", "containsKMSKeyARN", "(", ")", "?", "getPermissionsPolicyWithKMSResources", "(", "s3Prefix", ")", ":", "getPermissionsPolicyWithoutKMSResources", "(", ")", ";", "iamClient", ".", "putRolePolicy", "(", "new", "PutRolePolicyRequest", "(", ")", ".", "withRoleName", "(", "iamRoleName", ")", ".", "withPolicyName", "(", "FIREHOSE_ROLE_POLICY_NAME", ")", ".", "withPolicyDocument", "(", "permissionsPolicyDocument", ")", ")", ";", "}", "catch", "(", "MalformedPolicyDocumentException", "policyDocumentException", ")", "{", "LOG", ".", "error", "(", "String", ".", "format", "(", "\"Please check the permissions policy document for malformation: %s\"", ",", "containsKMSKeyARN", "(", ")", "?", "IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT", ":", "IAM_ROLE_PERMISSIONS_POLICY_WITHOUT_KMS_RESOURCES_DOCUMENT", ")", ")", ";", "throw", "policyDocumentException", ";", "}", "}" ]
Method to put the role policy with permissions document. Permission document would change based on KMS Key ARN specified in properties file. If KMS Key ARN is specified, permissions document will contain KMS resource. @param s3Prefix the s3Prefix which will be included in KMS Condition (only if KMS Key is provided)
[ "Method", "to", "put", "the", "role", "policy", "with", "permissions", "document", ".", "Permission", "document", "would", "change", "based", "on", "KMS", "Key", "ARN", "specified", "in", "properties", "file", ".", "If", "KMS", "Key", "ARN", "is", "specified", "permissions", "document", "will", "contain", "KMS", "resource", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L404-L420
20,244
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.getPermissionsPolicyWithKMSResources
private static String getPermissionsPolicyWithKMSResources(String s3Prefix) { return readResource(IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT) .replace("{{S3_BUCKET_NAME}}", s3BucketName) .replace("{{KMS_KEY_ARN}}", s3DestinationAWSKMSKeyId) .replace("{{S3_REGION}}", s3RegionName) .replace("{{S3_PREFIX}}", s3Prefix); }
java
private static String getPermissionsPolicyWithKMSResources(String s3Prefix) { return readResource(IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT) .replace("{{S3_BUCKET_NAME}}", s3BucketName) .replace("{{KMS_KEY_ARN}}", s3DestinationAWSKMSKeyId) .replace("{{S3_REGION}}", s3RegionName) .replace("{{S3_PREFIX}}", s3Prefix); }
[ "private", "static", "String", "getPermissionsPolicyWithKMSResources", "(", "String", "s3Prefix", ")", "{", "return", "readResource", "(", "IAM_ROLE_PERMISSIONS_POLICY_WITH_KMS_RESOURCES_DOCUMENT", ")", ".", "replace", "(", "\"{{S3_BUCKET_NAME}}\"", ",", "s3BucketName", ")", ".", "replace", "(", "\"{{KMS_KEY_ARN}}\"", ",", "s3DestinationAWSKMSKeyId", ")", ".", "replace", "(", "\"{{S3_REGION}}\"", ",", "s3RegionName", ")", ".", "replace", "(", "\"{{S3_PREFIX}}\"", ",", "s3Prefix", ")", ";", "}" ]
Method to return the permissions policy document with KMS resource. @param s3Prefix the s3Prefix to be specified in KMS Condition @return the permissions policy document
[ "Method", "to", "return", "the", "permissions", "policy", "document", "with", "KMS", "resource", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L438-L444
20,245
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.readResource
private static String readResource(String name) { try { return IOUtils.toString(AmazonKinesisFirehoseToRedshiftSample.class.getResourceAsStream(name)); } catch (IOException e) { throw new RuntimeException("Failed to read document resource: " + name, e); } }
java
private static String readResource(String name) { try { return IOUtils.toString(AmazonKinesisFirehoseToRedshiftSample.class.getResourceAsStream(name)); } catch (IOException e) { throw new RuntimeException("Failed to read document resource: " + name, e); } }
[ "private", "static", "String", "readResource", "(", "String", "name", ")", "{", "try", "{", "return", "IOUtils", ".", "toString", "(", "AmazonKinesisFirehoseToRedshiftSample", ".", "class", ".", "getResourceAsStream", "(", "name", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "RuntimeException", "(", "\"Failed to read document resource: \"", "+", "name", ",", "e", ")", ";", "}", "}" ]
Method to read the resource for the given filename. @param name the file name @return the input stream as string
[ "Method", "to", "read", "the", "resource", "for", "the", "given", "filename", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L462-L468
20,246
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.createRecord
private static Record createRecord(String data) { return new Record().withData(ByteBuffer.wrap(data.getBytes())); }
java
private static Record createRecord(String data) { return new Record().withData(ByteBuffer.wrap(data.getBytes())); }
[ "private", "static", "Record", "createRecord", "(", "String", "data", ")", "{", "return", "new", "Record", "(", ")", ".", "withData", "(", "ByteBuffer", ".", "wrap", "(", "data", ".", "getBytes", "(", ")", ")", ")", ";", "}" ]
Method to create the record object for given data. @param data the content data @return the Record object
[ "Method", "to", "create", "the", "record", "object", "for", "given", "data", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L485-L487
20,247
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/S3ProgressPublisher.java
S3ProgressPublisher.publishTransferPersistable
public static Future<?> publishTransferPersistable( final ProgressListener listener, final PersistableTransfer persistableTransfer) { if (persistableTransfer == null || !(listener instanceof S3ProgressListener)) { return null; } final S3ProgressListener s3listener = (S3ProgressListener)listener; return deliverEvent(s3listener, persistableTransfer); }
java
public static Future<?> publishTransferPersistable( final ProgressListener listener, final PersistableTransfer persistableTransfer) { if (persistableTransfer == null || !(listener instanceof S3ProgressListener)) { return null; } final S3ProgressListener s3listener = (S3ProgressListener)listener; return deliverEvent(s3listener, persistableTransfer); }
[ "public", "static", "Future", "<", "?", ">", "publishTransferPersistable", "(", "final", "ProgressListener", "listener", ",", "final", "PersistableTransfer", "persistableTransfer", ")", "{", "if", "(", "persistableTransfer", "==", "null", "||", "!", "(", "listener", "instanceof", "S3ProgressListener", ")", ")", "{", "return", "null", ";", "}", "final", "S3ProgressListener", "s3listener", "=", "(", "S3ProgressListener", ")", "listener", ";", "return", "deliverEvent", "(", "s3listener", ",", "persistableTransfer", ")", ";", "}" ]
Used to deliver a persistable transfer to the given s3 listener. @param listener only listener of type {@link S3ProgressListener} will be notified. @return the future of a submitted task; or null if the delivery is synchronous with no future task involved. Note a listener should never block, and therefore returning null is the typical case.
[ "Used", "to", "deliver", "a", "persistable", "transfer", "to", "the", "given", "s3", "listener", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/S3ProgressPublisher.java#L40-L48
20,248
aws/aws-sdk-java
aws-java-sdk-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java
AmazonMachineLearningWaiters.batchPredictionAvailable
public Waiter<DescribeBatchPredictionsRequest> batchPredictionAvailable() { return new WaiterBuilder<DescribeBatchPredictionsRequest, DescribeBatchPredictionsResult>() .withSdkFunction(new DescribeBatchPredictionsFunction(client)) .withAcceptors(new BatchPredictionAvailable.IsCOMPLETEDMatcher(), new BatchPredictionAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeBatchPredictionsRequest> batchPredictionAvailable() { return new WaiterBuilder<DescribeBatchPredictionsRequest, DescribeBatchPredictionsResult>() .withSdkFunction(new DescribeBatchPredictionsFunction(client)) .withAcceptors(new BatchPredictionAvailable.IsCOMPLETEDMatcher(), new BatchPredictionAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeBatchPredictionsRequest", ">", "batchPredictionAvailable", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeBatchPredictionsRequest", ",", "DescribeBatchPredictionsResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeBatchPredictionsFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "BatchPredictionAvailable", ".", "IsCOMPLETEDMatcher", "(", ")", ",", "new", "BatchPredictionAvailable", ".", "IsFAILEDMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "60", ")", ",", "new", "FixedDelayStrategy", "(", "30", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a BatchPredictionAvailable 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", "BatchPredictionAvailable", "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-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java#L51-L58
20,249
aws/aws-sdk-java
aws-java-sdk-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java
AmazonMachineLearningWaiters.mLModelAvailable
public Waiter<DescribeMLModelsRequest> mLModelAvailable() { return new WaiterBuilder<DescribeMLModelsRequest, DescribeMLModelsResult>().withSdkFunction(new DescribeMLModelsFunction(client)) .withAcceptors(new MLModelAvailable.IsCOMPLETEDMatcher(), new MLModelAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeMLModelsRequest> mLModelAvailable() { return new WaiterBuilder<DescribeMLModelsRequest, DescribeMLModelsResult>().withSdkFunction(new DescribeMLModelsFunction(client)) .withAcceptors(new MLModelAvailable.IsCOMPLETEDMatcher(), new MLModelAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeMLModelsRequest", ">", "mLModelAvailable", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeMLModelsRequest", ",", "DescribeMLModelsResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeMLModelsFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "MLModelAvailable", ".", "IsCOMPLETEDMatcher", "(", ")", ",", "new", "MLModelAvailable", ".", "IsFAILEDMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "60", ")", ",", "new", "FixedDelayStrategy", "(", "30", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a MLModelAvailable 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", "MLModelAvailable", "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-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java#L65-L71
20,250
aws/aws-sdk-java
aws-java-sdk-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java
AmazonMachineLearningWaiters.dataSourceAvailable
public Waiter<DescribeDataSourcesRequest> dataSourceAvailable() { return new WaiterBuilder<DescribeDataSourcesRequest, DescribeDataSourcesResult>().withSdkFunction(new DescribeDataSourcesFunction(client)) .withAcceptors(new DataSourceAvailable.IsCOMPLETEDMatcher(), new DataSourceAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeDataSourcesRequest> dataSourceAvailable() { return new WaiterBuilder<DescribeDataSourcesRequest, DescribeDataSourcesResult>().withSdkFunction(new DescribeDataSourcesFunction(client)) .withAcceptors(new DataSourceAvailable.IsCOMPLETEDMatcher(), new DataSourceAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeDataSourcesRequest", ">", "dataSourceAvailable", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeDataSourcesRequest", ",", "DescribeDataSourcesResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeDataSourcesFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "DataSourceAvailable", ".", "IsCOMPLETEDMatcher", "(", ")", ",", "new", "DataSourceAvailable", ".", "IsFAILEDMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "60", ")", ",", "new", "FixedDelayStrategy", "(", "30", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a DataSourceAvailable 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", "DataSourceAvailable", "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-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java#L78-L84
20,251
aws/aws-sdk-java
aws-java-sdk-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java
AmazonMachineLearningWaiters.evaluationAvailable
public Waiter<DescribeEvaluationsRequest> evaluationAvailable() { return new WaiterBuilder<DescribeEvaluationsRequest, DescribeEvaluationsResult>().withSdkFunction(new DescribeEvaluationsFunction(client)) .withAcceptors(new EvaluationAvailable.IsCOMPLETEDMatcher(), new EvaluationAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeEvaluationsRequest> evaluationAvailable() { return new WaiterBuilder<DescribeEvaluationsRequest, DescribeEvaluationsResult>().withSdkFunction(new DescribeEvaluationsFunction(client)) .withAcceptors(new EvaluationAvailable.IsCOMPLETEDMatcher(), new EvaluationAvailable.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeEvaluationsRequest", ">", "evaluationAvailable", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeEvaluationsRequest", ",", "DescribeEvaluationsResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeEvaluationsFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "EvaluationAvailable", ".", "IsCOMPLETEDMatcher", "(", ")", ",", "new", "EvaluationAvailable", ".", "IsFAILEDMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "60", ")", ",", "new", "FixedDelayStrategy", "(", "30", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a EvaluationAvailable 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", "EvaluationAvailable", "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-machinelearning/src/main/java/com/amazonaws/services/machinelearning/waiters/AmazonMachineLearningWaiters.java#L91-L97
20,252
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java
S3Versions.withPrefix
public static S3Versions withPrefix(AmazonS3 s3, String bucketName, String prefix) { S3Versions versions = new S3Versions(s3, bucketName); versions.prefix = prefix; return versions; }
java
public static S3Versions withPrefix(AmazonS3 s3, String bucketName, String prefix) { S3Versions versions = new S3Versions(s3, bucketName); versions.prefix = prefix; return versions; }
[ "public", "static", "S3Versions", "withPrefix", "(", "AmazonS3", "s3", ",", "String", "bucketName", ",", "String", "prefix", ")", "{", "S3Versions", "versions", "=", "new", "S3Versions", "(", "s3", ",", "bucketName", ")", ";", "versions", ".", "prefix", "=", "prefix", ";", "return", "versions", ";", "}" ]
Constructs an iterable that covers the versions in an Amazon S3 bucket where the object key begins with the given prefix. @param s3 The Amazon S3 client. @param bucketName The bucket name. @param prefix The prefix. @return An iterator for object version summaries.
[ "Constructs", "an", "iterable", "that", "covers", "the", "versions", "in", "an", "Amazon", "S3", "bucket", "where", "the", "object", "key", "begins", "with", "the", "given", "prefix", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java#L77-L82
20,253
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java
S3Versions.forKey
public static S3Versions forKey(AmazonS3 s3, String bucketName, String key) { S3Versions versions = new S3Versions(s3, bucketName); versions.key = key; return versions; }
java
public static S3Versions forKey(AmazonS3 s3, String bucketName, String key) { S3Versions versions = new S3Versions(s3, bucketName); versions.key = key; return versions; }
[ "public", "static", "S3Versions", "forKey", "(", "AmazonS3", "s3", ",", "String", "bucketName", ",", "String", "key", ")", "{", "S3Versions", "versions", "=", "new", "S3Versions", "(", "s3", ",", "bucketName", ")", ";", "versions", ".", "key", "=", "key", ";", "return", "versions", ";", "}" ]
Constructs an iterable that covers the versions of a single Amazon S3 object. @param s3 The Amazon S3 client. @param bucketName The bucket name. @param key The key. @return An iterator for object version summaries.
[ "Constructs", "an", "iterable", "that", "covers", "the", "versions", "of", "a", "single", "Amazon", "S3", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java#L96-L100
20,254
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/AudioChannelMapping.java
AudioChannelMapping.setInputChannelLevels
public void setInputChannelLevels(java.util.Collection<InputChannelLevel> inputChannelLevels) { if (inputChannelLevels == null) { this.inputChannelLevels = null; return; } this.inputChannelLevels = new java.util.ArrayList<InputChannelLevel>(inputChannelLevels); }
java
public void setInputChannelLevels(java.util.Collection<InputChannelLevel> inputChannelLevels) { if (inputChannelLevels == null) { this.inputChannelLevels = null; return; } this.inputChannelLevels = new java.util.ArrayList<InputChannelLevel>(inputChannelLevels); }
[ "public", "void", "setInputChannelLevels", "(", "java", ".", "util", ".", "Collection", "<", "InputChannelLevel", ">", "inputChannelLevels", ")", "{", "if", "(", "inputChannelLevels", "==", "null", ")", "{", "this", ".", "inputChannelLevels", "=", "null", ";", "return", ";", "}", "this", ".", "inputChannelLevels", "=", "new", "java", ".", "util", ".", "ArrayList", "<", "InputChannelLevel", ">", "(", "inputChannelLevels", ")", ";", "}" ]
Indices and gain values for each input channel that should be remixed into this output channel. @param inputChannelLevels Indices and gain values for each input channel that should be remixed into this output channel.
[ "Indices", "and", "gain", "values", "for", "each", "input", "channel", "that", "should", "be", "remixed", "into", "this", "output", "channel", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/AudioChannelMapping.java#L51-L58
20,255
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/waiters/AmazonS3Waiters.java
AmazonS3Waiters.bucketNotExists
public Waiter<HeadBucketRequest> bucketNotExists() { return new WaiterBuilder<HeadBucketRequest, HeadBucketResult>() .withSdkFunction(new HeadBucketFunction(client)) .withAcceptors( new HttpFailureStatusAcceptor<HeadBucketResult>(404, WaiterState.SUCCESS)) .withDefaultPollingStrategy( new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(5))) .withExecutorService(executorService).build(); }
java
public Waiter<HeadBucketRequest> bucketNotExists() { return new WaiterBuilder<HeadBucketRequest, HeadBucketResult>() .withSdkFunction(new HeadBucketFunction(client)) .withAcceptors( new HttpFailureStatusAcceptor<HeadBucketResult>(404, WaiterState.SUCCESS)) .withDefaultPollingStrategy( new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(5))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "HeadBucketRequest", ">", "bucketNotExists", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "HeadBucketRequest", ",", "HeadBucketResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "HeadBucketFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "HttpFailureStatusAcceptor", "<", "HeadBucketResult", ">", "(", "404", ",", "WaiterState", ".", "SUCCESS", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "20", ")", ",", "new", "FixedDelayStrategy", "(", "5", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a BucketNotExists 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", "BucketNotExists", "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-s3/src/main/java/com/amazonaws/services/s3/waiters/AmazonS3Waiters.java#L53-L63
20,256
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/waiters/AmazonS3Waiters.java
AmazonS3Waiters.bucketExists
public Waiter<HeadBucketRequest> bucketExists() { return new WaiterBuilder<HeadBucketRequest, HeadBucketResult>() .withSdkFunction(new HeadBucketFunction(client)) .withAcceptors( new HttpSuccessStatusAcceptor<HeadBucketResult>(WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(301, WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(403, WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(404, WaiterState.RETRY)) .withDefaultPollingStrategy( new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(5))) .withExecutorService(executorService).build(); }
java
public Waiter<HeadBucketRequest> bucketExists() { return new WaiterBuilder<HeadBucketRequest, HeadBucketResult>() .withSdkFunction(new HeadBucketFunction(client)) .withAcceptors( new HttpSuccessStatusAcceptor<HeadBucketResult>(WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(301, WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(403, WaiterState.SUCCESS), new HttpFailureStatusAcceptor<HeadBucketResult>(404, WaiterState.RETRY)) .withDefaultPollingStrategy( new PollingStrategy(new MaxAttemptsRetryStrategy(20), new FixedDelayStrategy(5))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "HeadBucketRequest", ">", "bucketExists", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "HeadBucketRequest", ",", "HeadBucketResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "HeadBucketFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "HttpSuccessStatusAcceptor", "<", "HeadBucketResult", ">", "(", "WaiterState", ".", "SUCCESS", ")", ",", "new", "HttpFailureStatusAcceptor", "<", "HeadBucketResult", ">", "(", "301", ",", "WaiterState", ".", "SUCCESS", ")", ",", "new", "HttpFailureStatusAcceptor", "<", "HeadBucketResult", ">", "(", "403", ",", "WaiterState", ".", "SUCCESS", ")", ",", "new", "HttpFailureStatusAcceptor", "<", "HeadBucketResult", ">", "(", "404", ",", "WaiterState", ".", "RETRY", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "20", ")", ",", "new", "FixedDelayStrategy", "(", "5", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a BucketExists 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", "BucketExists", "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-s3/src/main/java/com/amazonaws/services/s3/waiters/AmazonS3Waiters.java#L72-L85
20,257
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/RequestXmlFactory.java
RequestXmlFactory.convertToXmlByteArray
public static byte[] convertToXmlByteArray(List<PartETag> partETags) { XmlWriter xml = new XmlWriter(); xml.start("CompleteMultipartUpload"); if (partETags != null) { List<PartETag> sortedPartETags = new ArrayList<PartETag>(partETags); Collections.sort(sortedPartETags, new Comparator<PartETag>() { public int compare(PartETag tag1, PartETag tag2) { if (tag1.getPartNumber() < tag2.getPartNumber()) return -1; if (tag1.getPartNumber() > tag2.getPartNumber()) return 1; return 0; } }); for (PartETag partEtag : sortedPartETags) { xml.start("Part"); xml.start("PartNumber").value(Integer.toString(partEtag.getPartNumber())).end(); xml.start("ETag").value(partEtag.getETag()).end(); xml.end(); } } xml.end(); return xml.getBytes(); }
java
public static byte[] convertToXmlByteArray(List<PartETag> partETags) { XmlWriter xml = new XmlWriter(); xml.start("CompleteMultipartUpload"); if (partETags != null) { List<PartETag> sortedPartETags = new ArrayList<PartETag>(partETags); Collections.sort(sortedPartETags, new Comparator<PartETag>() { public int compare(PartETag tag1, PartETag tag2) { if (tag1.getPartNumber() < tag2.getPartNumber()) return -1; if (tag1.getPartNumber() > tag2.getPartNumber()) return 1; return 0; } }); for (PartETag partEtag : sortedPartETags) { xml.start("Part"); xml.start("PartNumber").value(Integer.toString(partEtag.getPartNumber())).end(); xml.start("ETag").value(partEtag.getETag()).end(); xml.end(); } } xml.end(); return xml.getBytes(); }
[ "public", "static", "byte", "[", "]", "convertToXmlByteArray", "(", "List", "<", "PartETag", ">", "partETags", ")", "{", "XmlWriter", "xml", "=", "new", "XmlWriter", "(", ")", ";", "xml", ".", "start", "(", "\"CompleteMultipartUpload\"", ")", ";", "if", "(", "partETags", "!=", "null", ")", "{", "List", "<", "PartETag", ">", "sortedPartETags", "=", "new", "ArrayList", "<", "PartETag", ">", "(", "partETags", ")", ";", "Collections", ".", "sort", "(", "sortedPartETags", ",", "new", "Comparator", "<", "PartETag", ">", "(", ")", "{", "public", "int", "compare", "(", "PartETag", "tag1", ",", "PartETag", "tag2", ")", "{", "if", "(", "tag1", ".", "getPartNumber", "(", ")", "<", "tag2", ".", "getPartNumber", "(", ")", ")", "return", "-", "1", ";", "if", "(", "tag1", ".", "getPartNumber", "(", ")", ">", "tag2", ".", "getPartNumber", "(", ")", ")", "return", "1", ";", "return", "0", ";", "}", "}", ")", ";", "for", "(", "PartETag", "partEtag", ":", "sortedPartETags", ")", "{", "xml", ".", "start", "(", "\"Part\"", ")", ";", "xml", ".", "start", "(", "\"PartNumber\"", ")", ".", "value", "(", "Integer", ".", "toString", "(", "partEtag", ".", "getPartNumber", "(", ")", ")", ")", ".", "end", "(", ")", ";", "xml", ".", "start", "(", "\"ETag\"", ")", ".", "value", "(", "partEtag", ".", "getETag", "(", ")", ")", ".", "end", "(", ")", ";", "xml", ".", "end", "(", ")", ";", "}", "}", "xml", ".", "end", "(", ")", ";", "return", "xml", ".", "getBytes", "(", ")", ";", "}" ]
Converts the specified list of PartETags to an XML fragment that can be sent to the CompleteMultipartUpload operation of Amazon S3. @param partETags The list of part ETags containing the data to include in the new XML fragment. @return A byte array containing the data
[ "Converts", "the", "specified", "list", "of", "PartETags", "to", "an", "XML", "fragment", "that", "can", "be", "sent", "to", "the", "CompleteMultipartUpload", "operation", "of", "Amazon", "S3", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/RequestXmlFactory.java#L56-L79
20,258
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/RequestXmlFactory.java
RequestXmlFactory.convertToXmlByteArray
public static byte[] convertToXmlByteArray(SelectObjectContentRequest selectRequest) { XmlWriter xml = new XmlWriter(); xml.start("SelectObjectContentRequest"); addIfNotNull(xml, "Expression", selectRequest.getExpression()); addIfNotNull(xml, "ExpressionType", selectRequest.getExpressionType()); addRequestProgressIfNotNull(xml, selectRequest.getRequestProgress()); addInputSerializationIfNotNull(xml, selectRequest.getInputSerialization()); addOutputSerializationIfNotNull(xml, selectRequest.getOutputSerialization()); xml.end(); return xml.getBytes(); }
java
public static byte[] convertToXmlByteArray(SelectObjectContentRequest selectRequest) { XmlWriter xml = new XmlWriter(); xml.start("SelectObjectContentRequest"); addIfNotNull(xml, "Expression", selectRequest.getExpression()); addIfNotNull(xml, "ExpressionType", selectRequest.getExpressionType()); addRequestProgressIfNotNull(xml, selectRequest.getRequestProgress()); addInputSerializationIfNotNull(xml, selectRequest.getInputSerialization()); addOutputSerializationIfNotNull(xml, selectRequest.getOutputSerialization()); xml.end(); return xml.getBytes(); }
[ "public", "static", "byte", "[", "]", "convertToXmlByteArray", "(", "SelectObjectContentRequest", "selectRequest", ")", "{", "XmlWriter", "xml", "=", "new", "XmlWriter", "(", ")", ";", "xml", ".", "start", "(", "\"SelectObjectContentRequest\"", ")", ";", "addIfNotNull", "(", "xml", ",", "\"Expression\"", ",", "selectRequest", ".", "getExpression", "(", ")", ")", ";", "addIfNotNull", "(", "xml", ",", "\"ExpressionType\"", ",", "selectRequest", ".", "getExpressionType", "(", ")", ")", ";", "addRequestProgressIfNotNull", "(", "xml", ",", "selectRequest", ".", "getRequestProgress", "(", ")", ")", ";", "addInputSerializationIfNotNull", "(", "xml", ",", "selectRequest", ".", "getInputSerialization", "(", ")", ")", ";", "addOutputSerializationIfNotNull", "(", "xml", ",", "selectRequest", ".", "getOutputSerialization", "(", ")", ")", ";", "xml", ".", "end", "(", ")", ";", "return", "xml", ".", "getBytes", "(", ")", ";", "}" ]
Converts the SelectObjectContentRequest to an XML fragment that can be sent to the SelectObjectContent operation of Amazon S3.
[ "Converts", "the", "SelectObjectContentRequest", "to", "an", "XML", "fragment", "that", "can", "be", "sent", "to", "the", "SelectObjectContent", "operation", "of", "Amazon", "S3", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/RequestXmlFactory.java#L124-L136
20,259
aws/aws-sdk-java
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java
RefreshableTask.blockingRefresh
private void blockingRefresh() { try { if (blockingRefreshLock .tryLock(BLOCKING_REFRESH_MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)) { try { // Return if successful refresh occurred while waiting for the lock if (!shouldDoBlockingRefresh()) { return; } else { // Otherwise do a synchronous refresh if the last lock holder was unable to // refresh the value refreshValue(); return; } } finally { blockingRefreshLock.unlock(); } } } catch (InterruptedException ex) { handleInterruptedException("Interrupted waiting to refresh the value.", ex); } // Couldn't acquire the lock. Just try a synchronous refresh refreshValue(); }
java
private void blockingRefresh() { try { if (blockingRefreshLock .tryLock(BLOCKING_REFRESH_MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)) { try { // Return if successful refresh occurred while waiting for the lock if (!shouldDoBlockingRefresh()) { return; } else { // Otherwise do a synchronous refresh if the last lock holder was unable to // refresh the value refreshValue(); return; } } finally { blockingRefreshLock.unlock(); } } } catch (InterruptedException ex) { handleInterruptedException("Interrupted waiting to refresh the value.", ex); } // Couldn't acquire the lock. Just try a synchronous refresh refreshValue(); }
[ "private", "void", "blockingRefresh", "(", ")", "{", "try", "{", "if", "(", "blockingRefreshLock", ".", "tryLock", "(", "BLOCKING_REFRESH_MAX_WAIT_IN_SECONDS", ",", "TimeUnit", ".", "SECONDS", ")", ")", "{", "try", "{", "// Return if successful refresh occurred while waiting for the lock", "if", "(", "!", "shouldDoBlockingRefresh", "(", ")", ")", "{", "return", ";", "}", "else", "{", "// Otherwise do a synchronous refresh if the last lock holder was unable to", "// refresh the value", "refreshValue", "(", ")", ";", "return", ";", "}", "}", "finally", "{", "blockingRefreshLock", ".", "unlock", "(", ")", ";", "}", "}", "}", "catch", "(", "InterruptedException", "ex", ")", "{", "handleInterruptedException", "(", "\"Interrupted waiting to refresh the value.\"", ",", "ex", ")", ";", "}", "// Couldn't acquire the lock. Just try a synchronous refresh", "refreshValue", "(", ")", ";", "}" ]
Used when there is no valid value to return. Callers are blocked until a new value is created or an exception is thrown.
[ "Used", "when", "there", "is", "no", "valid", "value", "to", "return", ".", "Callers", "are", "blocked", "until", "a", "new", "value", "is", "created", "or", "an", "exception", "is", "thrown", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java#L202-L225
20,260
aws/aws-sdk-java
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java
RefreshableTask.asyncRefresh
private void asyncRefresh() { // Immediately return if refresh already in progress if (asyncRefreshing.compareAndSet(false, true)) { try { executor.submit(new Runnable() { @Override public void run() { try { refreshValue(); } finally { asyncRefreshing.set(false); } } }); } catch (RuntimeException ex) { asyncRefreshing.set(false); throw ex; } } }
java
private void asyncRefresh() { // Immediately return if refresh already in progress if (asyncRefreshing.compareAndSet(false, true)) { try { executor.submit(new Runnable() { @Override public void run() { try { refreshValue(); } finally { asyncRefreshing.set(false); } } }); } catch (RuntimeException ex) { asyncRefreshing.set(false); throw ex; } } }
[ "private", "void", "asyncRefresh", "(", ")", "{", "// Immediately return if refresh already in progress", "if", "(", "asyncRefreshing", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "try", "{", "executor", ".", "submit", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "try", "{", "refreshValue", "(", ")", ";", "}", "finally", "{", "asyncRefreshing", ".", "set", "(", "false", ")", ";", "}", "}", "}", ")", ";", "}", "catch", "(", "RuntimeException", "ex", ")", "{", "asyncRefreshing", ".", "set", "(", "false", ")", ";", "throw", "ex", ";", "}", "}", "}" ]
Used to asynchronously refresh the value. Caller is never blocked.
[ "Used", "to", "asynchronously", "refresh", "the", "value", ".", "Caller", "is", "never", "blocked", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java#L230-L249
20,261
aws/aws-sdk-java
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java
RefreshableTask.refreshValue
private void refreshValue() { try { refreshableValueHolder .compareAndSet(refreshableValueHolder.get(), refreshCallable.call()); } catch (AmazonServiceException ase) { // Preserve the original ASE throw ase; } catch (AmazonClientException ace) { // Preserve the original ACE throw ace; } catch (Exception e) { throw new AmazonClientException(e); } }
java
private void refreshValue() { try { refreshableValueHolder .compareAndSet(refreshableValueHolder.get(), refreshCallable.call()); } catch (AmazonServiceException ase) { // Preserve the original ASE throw ase; } catch (AmazonClientException ace) { // Preserve the original ACE throw ace; } catch (Exception e) { throw new AmazonClientException(e); } }
[ "private", "void", "refreshValue", "(", ")", "{", "try", "{", "refreshableValueHolder", ".", "compareAndSet", "(", "refreshableValueHolder", ".", "get", "(", ")", ",", "refreshCallable", ".", "call", "(", ")", ")", ";", "}", "catch", "(", "AmazonServiceException", "ase", ")", "{", "// Preserve the original ASE", "throw", "ase", ";", "}", "catch", "(", "AmazonClientException", "ace", ")", "{", "// Preserve the original ACE", "throw", "ace", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "AmazonClientException", "(", "e", ")", ";", "}", "}" ]
Invokes the callback to get a new value.
[ "Invokes", "the", "callback", "to", "get", "a", "new", "value", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java#L254-L267
20,262
aws/aws-sdk-java
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java
RefreshableTask.handleInterruptedException
private void handleInterruptedException(String message, InterruptedException cause) { Thread.currentThread().interrupt(); throw new AbortedException(message, cause); }
java
private void handleInterruptedException(String message, InterruptedException cause) { Thread.currentThread().interrupt(); throw new AbortedException(message, cause); }
[ "private", "void", "handleInterruptedException", "(", "String", "message", ",", "InterruptedException", "cause", ")", "{", "Thread", ".", "currentThread", "(", ")", ".", "interrupt", "(", ")", ";", "throw", "new", "AbortedException", "(", "message", ",", "cause", ")", ";", "}" ]
If we are interrupted while waiting for a lock we just restore the interrupt status and throw an AmazonClientException back to the caller.
[ "If", "we", "are", "interrupted", "while", "waiting", "for", "a", "lock", "we", "just", "restore", "the", "interrupt", "status", "and", "throw", "an", "AmazonClientException", "back", "to", "the", "caller", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java#L273-L276
20,263
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/AttributesResource.java
AttributesResource.setAttributes
public void setAttributes(java.util.Collection<String> attributes) { if (attributes == null) { this.attributes = null; return; } this.attributes = new java.util.ArrayList<String>(attributes); }
java
public void setAttributes(java.util.Collection<String> attributes) { if (attributes == null) { this.attributes = null; return; } this.attributes = new java.util.ArrayList<String>(attributes); }
[ "public", "void", "setAttributes", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "attributes", ")", "{", "if", "(", "attributes", "==", "null", ")", "{", "this", ".", "attributes", "=", "null", ";", "return", ";", "}", "this", ".", "attributes", "=", "new", "java", ".", "util", ".", "ArrayList", "<", "String", ">", "(", "attributes", ")", ";", "}" ]
The attributes for the application. @param attributes The attributes for the application.
[ "The", "attributes", "for", "the", "application", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/AttributesResource.java#L121-L128
20,264
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java
AmazonS3EncryptionClient.newAWSKMSClient
private AWSKMSClient newAWSKMSClient( AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig, RequestMetricCollector requestMetricCollector ) { final AWSKMSClient kmsClient = new AWSKMSClient( credentialsProvider, clientConfig, requestMetricCollector); final Region kmsRegion = cryptoConfig.getAwsKmsRegion(); if (kmsRegion != null) kmsClient.setRegion(kmsRegion); return kmsClient; }
java
private AWSKMSClient newAWSKMSClient( AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig, RequestMetricCollector requestMetricCollector ) { final AWSKMSClient kmsClient = new AWSKMSClient( credentialsProvider, clientConfig, requestMetricCollector); final Region kmsRegion = cryptoConfig.getAwsKmsRegion(); if (kmsRegion != null) kmsClient.setRegion(kmsRegion); return kmsClient; }
[ "private", "AWSKMSClient", "newAWSKMSClient", "(", "AWSCredentialsProvider", "credentialsProvider", ",", "ClientConfiguration", "clientConfig", ",", "CryptoConfiguration", "cryptoConfig", ",", "RequestMetricCollector", "requestMetricCollector", ")", "{", "final", "AWSKMSClient", "kmsClient", "=", "new", "AWSKMSClient", "(", "credentialsProvider", ",", "clientConfig", ",", "requestMetricCollector", ")", ";", "final", "Region", "kmsRegion", "=", "cryptoConfig", ".", "getAwsKmsRegion", "(", ")", ";", "if", "(", "kmsRegion", "!=", "null", ")", "kmsClient", ".", "setRegion", "(", "kmsRegion", ")", ";", "return", "kmsClient", ";", "}" ]
Creates and returns a new instance of AWS KMS client in the case when an explicit AWS KMS client is not specified.
[ "Creates", "and", "returns", "a", "new", "instance", "of", "AWS", "KMS", "client", "in", "the", "case", "when", "an", "explicit", "AWS", "KMS", "client", "is", "not", "specified", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java#L539-L551
20,265
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java
AmazonS3EncryptionClient.onAbort
private <T extends Throwable> T onAbort(UploadObjectObserver observer, T t) { observer.onAbort(); return t; }
java
private <T extends Throwable> T onAbort(UploadObjectObserver observer, T t) { observer.onAbort(); return t; }
[ "private", "<", "T", "extends", "Throwable", ">", "T", "onAbort", "(", "UploadObjectObserver", "observer", ",", "T", "t", ")", "{", "observer", ".", "onAbort", "(", ")", ";", "return", "t", ";", "}" ]
Convenient method to notifies the observer to abort the multi-part upload, and returns the original exception.
[ "Convenient", "method", "to", "notifies", "the", "observer", "to", "abort", "the", "multi", "-", "part", "upload", "and", "returns", "the", "original", "exception", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3EncryptionClient.java#L843-L846
20,266
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonServiceException.java
AmazonServiceException.setRawResponseContent
public void setRawResponseContent(String rawResponseContent) { this.rawResponse = rawResponseContent == null ? null : rawResponseContent.getBytes (StringUtils.UTF8); }
java
public void setRawResponseContent(String rawResponseContent) { this.rawResponse = rawResponseContent == null ? null : rawResponseContent.getBytes (StringUtils.UTF8); }
[ "public", "void", "setRawResponseContent", "(", "String", "rawResponseContent", ")", "{", "this", ".", "rawResponse", "=", "rawResponseContent", "==", "null", "?", "null", ":", "rawResponseContent", ".", "getBytes", "(", "StringUtils", ".", "UTF8", ")", ";", "}" ]
Sets the raw response content.
[ "Sets", "the", "raw", "response", "content", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonServiceException.java#L283-L286
20,267
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java
ReflectionUtils.getFieldNameByGetter
static String getFieldNameByGetter(Method getter, boolean forceCamelCase) { String getterName = getter.getName(); String fieldNameWithUpperCamelCase = ""; if ( getterName.startsWith("get") ) { fieldNameWithUpperCamelCase = getterName.substring("get".length()); } else if ( getterName.startsWith("is") ) { fieldNameWithUpperCamelCase = getterName.substring("is".length()); } if (fieldNameWithUpperCamelCase.length() == 0) { throw new DynamoDBMappingException( "Getter must begin with 'get' or 'is', and the field name must contain at least one character."); } if (forceCamelCase) { // Lowercase the first letter of the name return StringUtils.lowerCase(fieldNameWithUpperCamelCase.substring(0, 1)) + fieldNameWithUpperCamelCase.substring(1); } else { return fieldNameWithUpperCamelCase; } }
java
static String getFieldNameByGetter(Method getter, boolean forceCamelCase) { String getterName = getter.getName(); String fieldNameWithUpperCamelCase = ""; if ( getterName.startsWith("get") ) { fieldNameWithUpperCamelCase = getterName.substring("get".length()); } else if ( getterName.startsWith("is") ) { fieldNameWithUpperCamelCase = getterName.substring("is".length()); } if (fieldNameWithUpperCamelCase.length() == 0) { throw new DynamoDBMappingException( "Getter must begin with 'get' or 'is', and the field name must contain at least one character."); } if (forceCamelCase) { // Lowercase the first letter of the name return StringUtils.lowerCase(fieldNameWithUpperCamelCase.substring(0, 1)) + fieldNameWithUpperCamelCase.substring(1); } else { return fieldNameWithUpperCamelCase; } }
[ "static", "String", "getFieldNameByGetter", "(", "Method", "getter", ",", "boolean", "forceCamelCase", ")", "{", "String", "getterName", "=", "getter", ".", "getName", "(", ")", ";", "String", "fieldNameWithUpperCamelCase", "=", "\"\"", ";", "if", "(", "getterName", ".", "startsWith", "(", "\"get\"", ")", ")", "{", "fieldNameWithUpperCamelCase", "=", "getterName", ".", "substring", "(", "\"get\"", ".", "length", "(", ")", ")", ";", "}", "else", "if", "(", "getterName", ".", "startsWith", "(", "\"is\"", ")", ")", "{", "fieldNameWithUpperCamelCase", "=", "getterName", ".", "substring", "(", "\"is\"", ".", "length", "(", ")", ")", ";", "}", "if", "(", "fieldNameWithUpperCamelCase", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "DynamoDBMappingException", "(", "\"Getter must begin with 'get' or 'is', and the field name must contain at least one character.\"", ")", ";", "}", "if", "(", "forceCamelCase", ")", "{", "// Lowercase the first letter of the name", "return", "StringUtils", ".", "lowerCase", "(", "fieldNameWithUpperCamelCase", ".", "substring", "(", "0", ",", "1", ")", ")", "+", "fieldNameWithUpperCamelCase", ".", "substring", "(", "1", ")", ";", "}", "else", "{", "return", "fieldNameWithUpperCamelCase", ";", "}", "}" ]
Returns the field name that corresponds to the given getter method, according to the Java naming convention. @param getter The getter method. @param forceCamelCase True if the returned field name should be in camel-case, i.e. the first letter is lower-cased.
[ "Returns", "the", "field", "name", "that", "corresponds", "to", "the", "given", "getter", "method", "according", "to", "the", "Java", "naming", "convention", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java#L40-L62
20,268
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java
ReflectionUtils.getClassFieldByName
static Field getClassFieldByName(Class<?> clazz, String fieldName) { try { return clazz.getDeclaredField(fieldName); } catch (SecurityException e) { throw new DynamoDBMappingException( "Denied access to the [" + fieldName + "] field in class [" + clazz + "].", e); } catch (NoSuchFieldException e) { return null; } }
java
static Field getClassFieldByName(Class<?> clazz, String fieldName) { try { return clazz.getDeclaredField(fieldName); } catch (SecurityException e) { throw new DynamoDBMappingException( "Denied access to the [" + fieldName + "] field in class [" + clazz + "].", e); } catch (NoSuchFieldException e) { return null; } }
[ "static", "Field", "getClassFieldByName", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "{", "try", "{", "return", "clazz", ".", "getDeclaredField", "(", "fieldName", ")", ";", "}", "catch", "(", "SecurityException", "e", ")", "{", "throw", "new", "DynamoDBMappingException", "(", "\"Denied access to the [\"", "+", "fieldName", "+", "\"] field in class [\"", "+", "clazz", "+", "\"].\"", ",", "e", ")", ";", "}", "catch", "(", "NoSuchFieldException", "e", ")", "{", "return", "null", ";", "}", "}" ]
Returns the Field object for the specified field name declared in the specified class. Returns null if no such field can be found. @param clazz The declaring class where the field will be reflected. This method will NOT attempt to reflect its superclass if such field is not found in this class. @param fieldName The case-sensitive name of the field to be searched.
[ "Returns", "the", "Field", "object", "for", "the", "specified", "field", "name", "declared", "in", "the", "specified", "class", ".", "Returns", "null", "if", "no", "such", "field", "can", "be", "found", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java#L75-L84
20,269
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java
ReflectionUtils.getAnnotationFromGetterOrField
static <T extends Annotation> T getAnnotationFromGetterOrField( Method getter, Class<T> annotationClass) { // Check annotation on the getter method T onGetter = getter.getAnnotation(annotationClass); if (onGetter != null) { return onGetter; } // Check annotation on the corresponding field String fieldName = getFieldNameByGetter(getter, true); // Only consider the field declared in the same class where getter is defined. Field field = getClassFieldByName(getter.getDeclaringClass(), fieldName); T onField = null; if (field != null) { onField = field.getAnnotation(annotationClass); } return onField; }
java
static <T extends Annotation> T getAnnotationFromGetterOrField( Method getter, Class<T> annotationClass) { // Check annotation on the getter method T onGetter = getter.getAnnotation(annotationClass); if (onGetter != null) { return onGetter; } // Check annotation on the corresponding field String fieldName = getFieldNameByGetter(getter, true); // Only consider the field declared in the same class where getter is defined. Field field = getClassFieldByName(getter.getDeclaringClass(), fieldName); T onField = null; if (field != null) { onField = field.getAnnotation(annotationClass); } return onField; }
[ "static", "<", "T", "extends", "Annotation", ">", "T", "getAnnotationFromGetterOrField", "(", "Method", "getter", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "// Check annotation on the getter method", "T", "onGetter", "=", "getter", ".", "getAnnotation", "(", "annotationClass", ")", ";", "if", "(", "onGetter", "!=", "null", ")", "{", "return", "onGetter", ";", "}", "// Check annotation on the corresponding field", "String", "fieldName", "=", "getFieldNameByGetter", "(", "getter", ",", "true", ")", ";", "// Only consider the field declared in the same class where getter is defined.", "Field", "field", "=", "getClassFieldByName", "(", "getter", ".", "getDeclaringClass", "(", ")", ",", "fieldName", ")", ";", "T", "onField", "=", "null", ";", "if", "(", "field", "!=", "null", ")", "{", "onField", "=", "field", ".", "getAnnotation", "(", "annotationClass", ")", ";", "}", "return", "onField", ";", "}" ]
This method searches for a specific type of annotation that is applied to either the specified getter method or its corresponding class field. Returns the annotation if it is found, else null.
[ "This", "method", "searches", "for", "a", "specific", "type", "of", "annotation", "that", "is", "applied", "to", "either", "the", "specified", "getter", "method", "or", "its", "corresponding", "class", "field", ".", "Returns", "the", "annotation", "if", "it", "is", "found", "else", "null", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java#L91-L108
20,270
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java
ReflectionUtils.getterOrFieldHasAnnotation
static <T extends Annotation> boolean getterOrFieldHasAnnotation( Method getter, Class<T> annotationClass) { return getAnnotationFromGetterOrField(getter, annotationClass) != null; }
java
static <T extends Annotation> boolean getterOrFieldHasAnnotation( Method getter, Class<T> annotationClass) { return getAnnotationFromGetterOrField(getter, annotationClass) != null; }
[ "static", "<", "T", "extends", "Annotation", ">", "boolean", "getterOrFieldHasAnnotation", "(", "Method", "getter", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "return", "getAnnotationFromGetterOrField", "(", "getter", ",", "annotationClass", ")", "!=", "null", ";", "}" ]
Returns true if an annotation for the specified type is found on the getter method or its corresponding class field.
[ "Returns", "true", "if", "an", "annotation", "for", "the", "specified", "type", "is", "found", "on", "the", "getter", "method", "or", "its", "corresponding", "class", "field", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ReflectionUtils.java#L114-L117
20,271
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.deleteJobTemplate
@Override public DeleteJobTemplateResult deleteJobTemplate(DeleteJobTemplateRequest request) { request = beforeClientExecution(request); return executeDeleteJobTemplate(request); }
java
@Override public DeleteJobTemplateResult deleteJobTemplate(DeleteJobTemplateRequest request) { request = beforeClientExecution(request); return executeDeleteJobTemplate(request); }
[ "@", "Override", "public", "DeleteJobTemplateResult", "deleteJobTemplate", "(", "DeleteJobTemplateRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteJobTemplate", "(", "request", ")", ";", "}" ]
Permanently delete a job template you have created. @param deleteJobTemplateRequest @return Result of the DeleteJobTemplate operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.DeleteJobTemplate @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplate" target="_top">AWS API Documentation</a>
[ "Permanently", "delete", "a", "job", "template", "you", "have", "created", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L562-L566
20,272
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.deleteQueue
@Override public DeleteQueueResult deleteQueue(DeleteQueueRequest request) { request = beforeClientExecution(request); return executeDeleteQueue(request); }
java
@Override public DeleteQueueResult deleteQueue(DeleteQueueRequest request) { request = beforeClientExecution(request); return executeDeleteQueue(request); }
[ "@", "Override", "public", "DeleteQueueResult", "deleteQueue", "(", "DeleteQueueRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteQueue", "(", "request", ")", ";", "}" ]
Permanently delete a queue you have created. @param deleteQueueRequest @return Result of the DeleteQueue operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.DeleteQueue @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueue" target="_top">AWS API Documentation</a>
[ "Permanently", "delete", "a", "queue", "you", "have", "created", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L692-L696
20,273
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.getJobTemplate
@Override public GetJobTemplateResult getJobTemplate(GetJobTemplateRequest request) { request = beforeClientExecution(request); return executeGetJobTemplate(request); }
java
@Override public GetJobTemplateResult getJobTemplate(GetJobTemplateRequest request) { request = beforeClientExecution(request); return executeGetJobTemplate(request); }
[ "@", "Override", "public", "GetJobTemplateResult", "getJobTemplate", "(", "GetJobTemplateRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetJobTemplate", "(", "request", ")", ";", "}" ]
Retrieve the JSON for a specific job template. @param getJobTemplateRequest @return Result of the GetJobTemplate operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.GetJobTemplate @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplate" target="_top">AWS API Documentation</a>
[ "Retrieve", "the", "JSON", "for", "a", "specific", "job", "template", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L953-L957
20,274
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.getPreset
@Override public GetPresetResult getPreset(GetPresetRequest request) { request = beforeClientExecution(request); return executeGetPreset(request); }
java
@Override public GetPresetResult getPreset(GetPresetRequest request) { request = beforeClientExecution(request); return executeGetPreset(request); }
[ "@", "Override", "public", "GetPresetResult", "getPreset", "(", "GetPresetRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetPreset", "(", "request", ")", ";", "}" ]
Retrieve the JSON for a specific preset. @param getPresetRequest @return Result of the GetPreset operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.GetPreset @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPreset" target="_top">AWS API Documentation</a>
[ "Retrieve", "the", "JSON", "for", "a", "specific", "preset", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1018-L1022
20,275
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.getQueue
@Override public GetQueueResult getQueue(GetQueueRequest request) { request = beforeClientExecution(request); return executeGetQueue(request); }
java
@Override public GetQueueResult getQueue(GetQueueRequest request) { request = beforeClientExecution(request); return executeGetQueue(request); }
[ "@", "Override", "public", "GetQueueResult", "getQueue", "(", "GetQueueRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetQueue", "(", "request", ")", ";", "}" ]
Retrieve the JSON for a specific queue. @param getQueueRequest @return Result of the GetQueue operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.GetQueue @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueue" target="_top">AWS API Documentation</a>
[ "Retrieve", "the", "JSON", "for", "a", "specific", "queue", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1083-L1087
20,276
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.listJobTemplates
@Override public ListJobTemplatesResult listJobTemplates(ListJobTemplatesRequest request) { request = beforeClientExecution(request); return executeListJobTemplates(request); }
java
@Override public ListJobTemplatesResult listJobTemplates(ListJobTemplatesRequest request) { request = beforeClientExecution(request); return executeListJobTemplates(request); }
[ "@", "Override", "public", "ListJobTemplatesResult", "listJobTemplates", "(", "ListJobTemplatesRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListJobTemplates", "(", "request", ")", ";", "}" ]
Retrieve a JSON array of up to twenty of your job templates. This will return the templates themselves, not just a list of them. To retrieve the next twenty templates, use the nextToken string returned with the array @param listJobTemplatesRequest @return Result of the ListJobTemplates operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.ListJobTemplates @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobTemplates" target="_top">AWS API Documentation</a>
[ "Retrieve", "a", "JSON", "array", "of", "up", "to", "twenty", "of", "your", "job", "templates", ".", "This", "will", "return", "the", "templates", "themselves", "not", "just", "a", "list", "of", "them", ".", "To", "retrieve", "the", "next", "twenty", "templates", "use", "the", "nextToken", "string", "returned", "with", "the", "array" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1149-L1153
20,277
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.listQueues
@Override public ListQueuesResult listQueues(ListQueuesRequest request) { request = beforeClientExecution(request); return executeListQueues(request); }
java
@Override public ListQueuesResult listQueues(ListQueuesRequest request) { request = beforeClientExecution(request); return executeListQueues(request); }
[ "@", "Override", "public", "ListQueuesResult", "listQueues", "(", "ListQueuesRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListQueues", "(", "request", ")", ";", "}" ]
Retrieve a JSON array of up to twenty of your queues. This will return the queues themselves, not just a list of them. To retrieve the next twenty queues, use the nextToken string returned with the array. @param listQueuesRequest @return Result of the ListQueues operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.ListQueues @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueues" target="_top">AWS API Documentation</a>
[ "Retrieve", "a", "JSON", "array", "of", "up", "to", "twenty", "of", "your", "queues", ".", "This", "will", "return", "the", "queues", "themselves", "not", "just", "a", "list", "of", "them", ".", "To", "retrieve", "the", "next", "twenty", "queues", "use", "the", "nextToken", "string", "returned", "with", "the", "array", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1348-L1352
20,278
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.updateJobTemplate
@Override public UpdateJobTemplateResult updateJobTemplate(UpdateJobTemplateRequest request) { request = beforeClientExecution(request); return executeUpdateJobTemplate(request); }
java
@Override public UpdateJobTemplateResult updateJobTemplate(UpdateJobTemplateRequest request) { request = beforeClientExecution(request); return executeUpdateJobTemplate(request); }
[ "@", "Override", "public", "UpdateJobTemplateResult", "updateJobTemplate", "(", "UpdateJobTemplateRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdateJobTemplate", "(", "request", ")", ";", "}" ]
Modify one of your existing job templates. @param updateJobTemplateRequest @return Result of the UpdateJobTemplate operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.UpdateJobTemplate @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplate" target="_top">AWS API Documentation</a>
[ "Modify", "one", "of", "your", "existing", "job", "templates", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1610-L1614
20,279
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.updatePreset
@Override public UpdatePresetResult updatePreset(UpdatePresetRequest request) { request = beforeClientExecution(request); return executeUpdatePreset(request); }
java
@Override public UpdatePresetResult updatePreset(UpdatePresetRequest request) { request = beforeClientExecution(request); return executeUpdatePreset(request); }
[ "@", "Override", "public", "UpdatePresetResult", "updatePreset", "(", "UpdatePresetRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdatePreset", "(", "request", ")", ";", "}" ]
Modify one of your existing presets. @param updatePresetRequest @return Result of the UpdatePreset operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.UpdatePreset @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePreset" target="_top">AWS API Documentation</a>
[ "Modify", "one", "of", "your", "existing", "presets", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1675-L1679
20,280
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java
AWSMediaConvertClient.updateQueue
@Override public UpdateQueueResult updateQueue(UpdateQueueRequest request) { request = beforeClientExecution(request); return executeUpdateQueue(request); }
java
@Override public UpdateQueueResult updateQueue(UpdateQueueRequest request) { request = beforeClientExecution(request); return executeUpdateQueue(request); }
[ "@", "Override", "public", "UpdateQueueResult", "updateQueue", "(", "UpdateQueueRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUpdateQueue", "(", "request", ")", ";", "}" ]
Modify one of your existing queues. @param updateQueueRequest @return Result of the UpdateQueue operation returned by the service. @throws BadRequestException The service can't process your request because of a problem in the request. Please check your request form and syntax. @throws InternalServerErrorException The service encountered an unexpected condition and can't fulfill your request. @throws ForbiddenException You don't have permissions for this action with the credentials you sent. @throws NotFoundException The resource you requested doesn't exist. @throws TooManyRequestsException Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests. @throws ConflictException The service couldn't complete your request because there is a conflict with the current state of the resource. @sample AWSMediaConvert.UpdateQueue @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueue" target="_top">AWS API Documentation</a>
[ "Modify", "one", "of", "your", "existing", "queues", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/AWSMediaConvertClient.java#L1740-L1744
20,281
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/ImmutableMapParameter.java
ImmutableMapParameter.of
public static <K, V> ImmutableMapParameter<K, V> of(K k0, V v0) { Map<K, V> map = Collections.singletonMap(k0, v0); return new ImmutableMapParameter<K, V>(map); }
java
public static <K, V> ImmutableMapParameter<K, V> of(K k0, V v0) { Map<K, V> map = Collections.singletonMap(k0, v0); return new ImmutableMapParameter<K, V>(map); }
[ "public", "static", "<", "K", ",", "V", ">", "ImmutableMapParameter", "<", "K", ",", "V", ">", "of", "(", "K", "k0", ",", "V", "v0", ")", "{", "Map", "<", "K", ",", "V", ">", "map", "=", "Collections", ".", "singletonMap", "(", "k0", ",", "v0", ")", ";", "return", "new", "ImmutableMapParameter", "<", "K", ",", "V", ">", "(", "map", ")", ";", "}" ]
Returns an ImmutableMapParameter instance containing a single entry. @param k0 Key of the single entry. @param v0 Value of the single entry.
[ "Returns", "an", "ImmutableMapParameter", "instance", "containing", "a", "single", "entry", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/ImmutableMapParameter.java#L82-L85
20,282
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/ImmutableMapParameter.java
ImmutableMapParameter.of
public static <K, V> ImmutableMapParameter<K, V> of(K k0, V v0, K k1, V v1) { Map<K, V> map = new HashMap<K, V>(); putAndWarnDuplicateKeys(map, k0, v0); putAndWarnDuplicateKeys(map, k1, v1); return new ImmutableMapParameter<K, V>(map); }
java
public static <K, V> ImmutableMapParameter<K, V> of(K k0, V v0, K k1, V v1) { Map<K, V> map = new HashMap<K, V>(); putAndWarnDuplicateKeys(map, k0, v0); putAndWarnDuplicateKeys(map, k1, v1); return new ImmutableMapParameter<K, V>(map); }
[ "public", "static", "<", "K", ",", "V", ">", "ImmutableMapParameter", "<", "K", ",", "V", ">", "of", "(", "K", "k0", ",", "V", "v0", ",", "K", "k1", ",", "V", "v1", ")", "{", "Map", "<", "K", ",", "V", ">", "map", "=", "new", "HashMap", "<", "K", ",", "V", ">", "(", ")", ";", "putAndWarnDuplicateKeys", "(", "map", ",", "k0", ",", "v0", ")", ";", "putAndWarnDuplicateKeys", "(", "map", ",", "k1", ",", "v1", ")", ";", "return", "new", "ImmutableMapParameter", "<", "K", ",", "V", ">", "(", "map", ")", ";", "}" ]
Returns an ImmutableMapParameter instance containing two entries. @param k0 Key of the first entry. @param v0 Value of the first entry. @param k1 Key of the second entry. @param v1 Value of the second entry.
[ "Returns", "an", "ImmutableMapParameter", "instance", "containing", "two", "entries", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/ImmutableMapParameter.java#L99-L104
20,283
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/waiters/AmazonDynamoDBWaiters.java
AmazonDynamoDBWaiters.tableExists
public Waiter<DescribeTableRequest> tableExists() { return new WaiterBuilder<DescribeTableRequest, DescribeTableResult>().withSdkFunction(new DescribeTableFunction(client)) .withAcceptors(new TableExists.IsACTIVEMatcher(), new TableExists.IsResourceNotFoundExceptionMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeTableRequest> tableExists() { return new WaiterBuilder<DescribeTableRequest, DescribeTableResult>().withSdkFunction(new DescribeTableFunction(client)) .withAcceptors(new TableExists.IsACTIVEMatcher(), new TableExists.IsResourceNotFoundExceptionMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeTableRequest", ">", "tableExists", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeTableRequest", ",", "DescribeTableResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeTableFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "TableExists", ".", "IsACTIVEMatcher", "(", ")", ",", "new", "TableExists", ".", "IsResourceNotFoundExceptionMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "25", ")", ",", "new", "FixedDelayStrategy", "(", "20", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a TableExists 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", "TableExists", "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-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/waiters/AmazonDynamoDBWaiters.java#L51-L57
20,284
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/waiters/AmazonDynamoDBWaiters.java
AmazonDynamoDBWaiters.tableNotExists
public Waiter<DescribeTableRequest> tableNotExists() { return new WaiterBuilder<DescribeTableRequest, DescribeTableResult>().withSdkFunction(new DescribeTableFunction(client)) .withAcceptors(new TableNotExists.IsResourceNotFoundExceptionMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeTableRequest> tableNotExists() { return new WaiterBuilder<DescribeTableRequest, DescribeTableResult>().withSdkFunction(new DescribeTableFunction(client)) .withAcceptors(new TableNotExists.IsResourceNotFoundExceptionMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(25), new FixedDelayStrategy(20))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeTableRequest", ">", "tableNotExists", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeTableRequest", ",", "DescribeTableResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeTableFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "TableNotExists", ".", "IsResourceNotFoundExceptionMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "25", ")", ",", "new", "FixedDelayStrategy", "(", "20", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a TableNotExists 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", "TableNotExists", "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-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/waiters/AmazonDynamoDBWaiters.java#L64-L70
20,285
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/OutputGroupDetail.java
OutputGroupDetail.setOutputDetails
public void setOutputDetails(java.util.Collection<OutputDetail> outputDetails) { if (outputDetails == null) { this.outputDetails = null; return; } this.outputDetails = new java.util.ArrayList<OutputDetail>(outputDetails); }
java
public void setOutputDetails(java.util.Collection<OutputDetail> outputDetails) { if (outputDetails == null) { this.outputDetails = null; return; } this.outputDetails = new java.util.ArrayList<OutputDetail>(outputDetails); }
[ "public", "void", "setOutputDetails", "(", "java", ".", "util", ".", "Collection", "<", "OutputDetail", ">", "outputDetails", ")", "{", "if", "(", "outputDetails", "==", "null", ")", "{", "this", ".", "outputDetails", "=", "null", ";", "return", ";", "}", "this", ".", "outputDetails", "=", "new", "java", ".", "util", ".", "ArrayList", "<", "OutputDetail", ">", "(", "outputDetails", ")", ";", "}" ]
Details about the output @param outputDetails Details about the output
[ "Details", "about", "the", "output" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/OutputGroupDetail.java#L49-L56
20,286
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java
AwsChunkedEncodingInputStream.mark
@Override public void mark(int readlimit) { abortIfNeeded(); if ( !isAtStart ) throw new UnsupportedOperationException("Chunk-encoded stream only supports mark() at the start of the stream."); if (is.markSupported()) { if (log.isDebugEnabled()) { log.debug("AwsChunkedEncodingInputStream marked at the start of the stream " + "(will directly mark the wrapped stream since it's mark-supported)."); } is.mark(readlimit); } else { if (log.isDebugEnabled()) { log.debug("AwsChunkedEncodingInputStream marked at the start of the stream " + "(initializing the buffer since the wrapped stream is not mark-supported)."); } decodedStreamBuffer = new DecodedStreamBuffer(maxBufferSize); } }
java
@Override public void mark(int readlimit) { abortIfNeeded(); if ( !isAtStart ) throw new UnsupportedOperationException("Chunk-encoded stream only supports mark() at the start of the stream."); if (is.markSupported()) { if (log.isDebugEnabled()) { log.debug("AwsChunkedEncodingInputStream marked at the start of the stream " + "(will directly mark the wrapped stream since it's mark-supported)."); } is.mark(readlimit); } else { if (log.isDebugEnabled()) { log.debug("AwsChunkedEncodingInputStream marked at the start of the stream " + "(initializing the buffer since the wrapped stream is not mark-supported)."); } decodedStreamBuffer = new DecodedStreamBuffer(maxBufferSize); } }
[ "@", "Override", "public", "void", "mark", "(", "int", "readlimit", ")", "{", "abortIfNeeded", "(", ")", ";", "if", "(", "!", "isAtStart", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Chunk-encoded stream only supports mark() at the start of the stream.\"", ")", ";", "if", "(", "is", ".", "markSupported", "(", ")", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"AwsChunkedEncodingInputStream marked at the start of the stream \"", "+", "\"(will directly mark the wrapped stream since it's mark-supported).\"", ")", ";", "}", "is", ".", "mark", "(", "readlimit", ")", ";", "}", "else", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"AwsChunkedEncodingInputStream marked at the start of the stream \"", "+", "\"(initializing the buffer since the wrapped stream is not mark-supported).\"", ")", ";", "}", "decodedStreamBuffer", "=", "new", "DecodedStreamBuffer", "(", "maxBufferSize", ")", ";", "}", "}" ]
The readlimit parameter is ignored.
[ "The", "readlimit", "parameter", "is", "ignored", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java#L214-L233
20,287
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java
AwsChunkedEncodingInputStream.reset
@Override public void reset() throws IOException { abortIfNeeded(); // Clear up any encoded data currentChunkIterator = null; priorChunkSignature = headerSignature; // Reset the wrapped stream if it is mark-supported, // otherwise use our buffered data. if (is.markSupported()) { if (log.isDebugEnabled()) log.debug("AwsChunkedEncodingInputStream reset " + "(will reset the wrapped stream because it is mark-supported)."); is.reset(); } else { if (log.isDebugEnabled()) log.debug("AwsChunkedEncodingInputStream reset " + "(will use the buffer of the decoded stream)."); if (null == decodedStreamBuffer) { throw new IOException("Cannot reset the stream because the mark is not set."); } decodedStreamBuffer.startReadBuffer(); } currentChunkIterator = null; isAtStart = true; isTerminating = false; }
java
@Override public void reset() throws IOException { abortIfNeeded(); // Clear up any encoded data currentChunkIterator = null; priorChunkSignature = headerSignature; // Reset the wrapped stream if it is mark-supported, // otherwise use our buffered data. if (is.markSupported()) { if (log.isDebugEnabled()) log.debug("AwsChunkedEncodingInputStream reset " + "(will reset the wrapped stream because it is mark-supported)."); is.reset(); } else { if (log.isDebugEnabled()) log.debug("AwsChunkedEncodingInputStream reset " + "(will use the buffer of the decoded stream)."); if (null == decodedStreamBuffer) { throw new IOException("Cannot reset the stream because the mark is not set."); } decodedStreamBuffer.startReadBuffer(); } currentChunkIterator = null; isAtStart = true; isTerminating = false; }
[ "@", "Override", "public", "void", "reset", "(", ")", "throws", "IOException", "{", "abortIfNeeded", "(", ")", ";", "// Clear up any encoded data", "currentChunkIterator", "=", "null", ";", "priorChunkSignature", "=", "headerSignature", ";", "// Reset the wrapped stream if it is mark-supported,", "// otherwise use our buffered data.", "if", "(", "is", ".", "markSupported", "(", ")", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"AwsChunkedEncodingInputStream reset \"", "+", "\"(will reset the wrapped stream because it is mark-supported).\"", ")", ";", "is", ".", "reset", "(", ")", ";", "}", "else", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"AwsChunkedEncodingInputStream reset \"", "+", "\"(will use the buffer of the decoded stream).\"", ")", ";", "if", "(", "null", "==", "decodedStreamBuffer", ")", "{", "throw", "new", "IOException", "(", "\"Cannot reset the stream because the mark is not set.\"", ")", ";", "}", "decodedStreamBuffer", ".", "startReadBuffer", "(", ")", ";", "}", "currentChunkIterator", "=", "null", ";", "isAtStart", "=", "true", ";", "isTerminating", "=", "false", ";", "}" ]
Reset the stream, either by resetting the wrapped stream or using the buffer created by this class.
[ "Reset", "the", "stream", "either", "by", "resetting", "the", "wrapped", "stream", "or", "using", "the", "buffer", "created", "by", "this", "class", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java#L239-L266
20,288
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java
AwsChunkedEncodingInputStream.setUpNextChunk
private boolean setUpNextChunk() throws IOException { byte[] chunkData = new byte[DEFAULT_CHUNK_SIZE]; int chunkSizeInBytes = 0; while (chunkSizeInBytes < DEFAULT_CHUNK_SIZE) { /** Read from the buffer of the decoded stream */ if (null != decodedStreamBuffer && decodedStreamBuffer.hasNext()) { chunkData[chunkSizeInBytes++] = decodedStreamBuffer.next(); } /** Read from the wrapped stream */ else { int bytesToRead = DEFAULT_CHUNK_SIZE - chunkSizeInBytes; int count = is.read(chunkData, chunkSizeInBytes, bytesToRead); if (count != -1) { if (null != decodedStreamBuffer) decodedStreamBuffer.buffer(chunkData, chunkSizeInBytes, count); chunkSizeInBytes += count; } else break; } } if (chunkSizeInBytes == 0){ byte[] signedFinalChunk = createSignedChunk(FINAL_CHUNK); currentChunkIterator = new ChunkContentIterator(signedFinalChunk); return true; } else { if (chunkSizeInBytes < chunkData.length) { chunkData = Arrays.copyOf(chunkData, chunkSizeInBytes); } byte[] signedChunkContent = createSignedChunk(chunkData); currentChunkIterator = new ChunkContentIterator(signedChunkContent); return false; } }
java
private boolean setUpNextChunk() throws IOException { byte[] chunkData = new byte[DEFAULT_CHUNK_SIZE]; int chunkSizeInBytes = 0; while (chunkSizeInBytes < DEFAULT_CHUNK_SIZE) { /** Read from the buffer of the decoded stream */ if (null != decodedStreamBuffer && decodedStreamBuffer.hasNext()) { chunkData[chunkSizeInBytes++] = decodedStreamBuffer.next(); } /** Read from the wrapped stream */ else { int bytesToRead = DEFAULT_CHUNK_SIZE - chunkSizeInBytes; int count = is.read(chunkData, chunkSizeInBytes, bytesToRead); if (count != -1) { if (null != decodedStreamBuffer) decodedStreamBuffer.buffer(chunkData, chunkSizeInBytes, count); chunkSizeInBytes += count; } else break; } } if (chunkSizeInBytes == 0){ byte[] signedFinalChunk = createSignedChunk(FINAL_CHUNK); currentChunkIterator = new ChunkContentIterator(signedFinalChunk); return true; } else { if (chunkSizeInBytes < chunkData.length) { chunkData = Arrays.copyOf(chunkData, chunkSizeInBytes); } byte[] signedChunkContent = createSignedChunk(chunkData); currentChunkIterator = new ChunkContentIterator(signedChunkContent); return false; } }
[ "private", "boolean", "setUpNextChunk", "(", ")", "throws", "IOException", "{", "byte", "[", "]", "chunkData", "=", "new", "byte", "[", "DEFAULT_CHUNK_SIZE", "]", ";", "int", "chunkSizeInBytes", "=", "0", ";", "while", "(", "chunkSizeInBytes", "<", "DEFAULT_CHUNK_SIZE", ")", "{", "/** Read from the buffer of the decoded stream */", "if", "(", "null", "!=", "decodedStreamBuffer", "&&", "decodedStreamBuffer", ".", "hasNext", "(", ")", ")", "{", "chunkData", "[", "chunkSizeInBytes", "++", "]", "=", "decodedStreamBuffer", ".", "next", "(", ")", ";", "}", "/** Read from the wrapped stream */", "else", "{", "int", "bytesToRead", "=", "DEFAULT_CHUNK_SIZE", "-", "chunkSizeInBytes", ";", "int", "count", "=", "is", ".", "read", "(", "chunkData", ",", "chunkSizeInBytes", ",", "bytesToRead", ")", ";", "if", "(", "count", "!=", "-", "1", ")", "{", "if", "(", "null", "!=", "decodedStreamBuffer", ")", "decodedStreamBuffer", ".", "buffer", "(", "chunkData", ",", "chunkSizeInBytes", ",", "count", ")", ";", "chunkSizeInBytes", "+=", "count", ";", "}", "else", "break", ";", "}", "}", "if", "(", "chunkSizeInBytes", "==", "0", ")", "{", "byte", "[", "]", "signedFinalChunk", "=", "createSignedChunk", "(", "FINAL_CHUNK", ")", ";", "currentChunkIterator", "=", "new", "ChunkContentIterator", "(", "signedFinalChunk", ")", ";", "return", "true", ";", "}", "else", "{", "if", "(", "chunkSizeInBytes", "<", "chunkData", ".", "length", ")", "{", "chunkData", "=", "Arrays", ".", "copyOf", "(", "chunkData", ",", "chunkSizeInBytes", ")", ";", "}", "byte", "[", "]", "signedChunkContent", "=", "createSignedChunk", "(", "chunkData", ")", ";", "currentChunkIterator", "=", "new", "ChunkContentIterator", "(", "signedChunkContent", ")", ";", "return", "false", ";", "}", "}" ]
Read in the next chunk of data, and create the necessary chunk extensions. @return Returns true if next chunk is the last empty chunk.
[ "Read", "in", "the", "next", "chunk", "of", "data", "and", "create", "the", "necessary", "chunk", "extensions", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java#L294-L329
20,289
aws/aws-sdk-java
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingCriteria.java
FindingCriteria.withCriterion
public FindingCriteria withCriterion(java.util.Map<String, Condition> criterion) { setCriterion(criterion); return this; }
java
public FindingCriteria withCriterion(java.util.Map<String, Condition> criterion) { setCriterion(criterion); return this; }
[ "public", "FindingCriteria", "withCriterion", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Condition", ">", "criterion", ")", "{", "setCriterion", "(", "criterion", ")", ";", "return", "this", ";", "}" ]
Represents a map of finding properties that match specified conditions and values when querying findings. @param criterion Represents a map of finding properties that match specified conditions and values when querying findings. @return Returns a reference to this object so that method calls can be chained together.
[ "Represents", "a", "map", "of", "finding", "properties", "that", "match", "specified", "conditions", "and", "values", "when", "querying", "findings", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingCriteria.java#L61-L64
20,290
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddMetadata.java
AddMetadata.requiresApiKey
private static boolean requiresApiKey(ServiceModel serviceModel) { return serviceModel.getOperations().values().stream() .anyMatch(Operation::requiresApiKey); }
java
private static boolean requiresApiKey(ServiceModel serviceModel) { return serviceModel.getOperations().values().stream() .anyMatch(Operation::requiresApiKey); }
[ "private", "static", "boolean", "requiresApiKey", "(", "ServiceModel", "serviceModel", ")", "{", "return", "serviceModel", ".", "getOperations", "(", ")", ".", "values", "(", ")", ".", "stream", "(", ")", ".", "anyMatch", "(", "Operation", "::", "requiresApiKey", ")", ";", "}" ]
If any operation requires an API key we generate a setter on the builder. @return True if any operation requires an API key. False otherwise.
[ "If", "any", "operation", "requires", "an", "API", "key", "we", "generate", "a", "setter", "on", "the", "builder", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddMetadata.java#L151-L154
20,291
aws/aws-sdk-java
aws-java-sdk-opsworkscm/src/main/java/com/amazonaws/services/opsworkscm/waiters/AWSOpsWorksCMWaiters.java
AWSOpsWorksCMWaiters.nodeAssociated
public Waiter<DescribeNodeAssociationStatusRequest> nodeAssociated() { return new WaiterBuilder<DescribeNodeAssociationStatusRequest, DescribeNodeAssociationStatusResult>() .withSdkFunction(new DescribeNodeAssociationStatusFunction(client)) .withAcceptors(new NodeAssociated.IsSUCCESSMatcher(), new NodeAssociated.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(15), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }
java
public Waiter<DescribeNodeAssociationStatusRequest> nodeAssociated() { return new WaiterBuilder<DescribeNodeAssociationStatusRequest, DescribeNodeAssociationStatusResult>() .withSdkFunction(new DescribeNodeAssociationStatusFunction(client)) .withAcceptors(new NodeAssociated.IsSUCCESSMatcher(), new NodeAssociated.IsFAILEDMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(15), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }
[ "public", "Waiter", "<", "DescribeNodeAssociationStatusRequest", ">", "nodeAssociated", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "DescribeNodeAssociationStatusRequest", ",", "DescribeNodeAssociationStatusResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "DescribeNodeAssociationStatusFunction", "(", "client", ")", ")", ".", "withAcceptors", "(", "new", "NodeAssociated", ".", "IsSUCCESSMatcher", "(", ")", ",", "new", "NodeAssociated", ".", "IsFAILEDMatcher", "(", ")", ")", ".", "withDefaultPollingStrategy", "(", "new", "PollingStrategy", "(", "new", "MaxAttemptsRetryStrategy", "(", "15", ")", ",", "new", "FixedDelayStrategy", "(", "15", ")", ")", ")", ".", "withExecutorService", "(", "executorService", ")", ".", "build", "(", ")", ";", "}" ]
Builds a NodeAssociated 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", "NodeAssociated", "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-opsworkscm/src/main/java/com/amazonaws/services/opsworkscm/waiters/AWSOpsWorksCMWaiters.java#L51-L58
20,292
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.eq
public static StringEqualsCondition.Builder eq(String variable, String expectedValue) { return StringEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static StringEqualsCondition.Builder eq(String variable, String expectedValue) { return StringEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "StringEqualsCondition", ".", "Builder", "eq", "(", "String", "variable", ",", "String", "expectedValue", ")", "{", "return", "StringEqualsCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for String equality comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "String", "equality", "comparison", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L212-L214
20,293
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.eq
public static NumericEqualsCondition.Builder eq(String variable, long expectedValue) { return NumericEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static NumericEqualsCondition.Builder eq(String variable, long expectedValue) { return NumericEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "NumericEqualsCondition", ".", "Builder", "eq", "(", "String", "variable", ",", "long", "expectedValue", ")", "{", "return", "NumericEqualsCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for Numeric equality comparison. Supports both integral and floating point numeric types. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "Numeric", "equality", "comparison", ".", "Supports", "both", "integral", "and", "floating", "point", "numeric", "types", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L224-L226
20,294
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.eq
public static BooleanEqualsCondition.Builder eq(String variable, boolean expectedValue) { return BooleanEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static BooleanEqualsCondition.Builder eq(String variable, boolean expectedValue) { return BooleanEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "BooleanEqualsCondition", ".", "Builder", "eq", "(", "String", "variable", ",", "boolean", "expectedValue", ")", "{", "return", "BooleanEqualsCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for Boolean equality comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "Boolean", "equality", "comparison", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L248-L250
20,295
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.eq
public static TimestampEqualsCondition.Builder eq(String variable, Date expectedValue) { return TimestampEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static TimestampEqualsCondition.Builder eq(String variable, Date expectedValue) { return TimestampEqualsCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "TimestampEqualsCondition", ".", "Builder", "eq", "(", "String", "variable", ",", "Date", "expectedValue", ")", "{", "return", "TimestampEqualsCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for Timestamp equality comparison. Dates are converted to ISO8601 UTC timestamps. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "Timestamp", "equality", "comparison", ".", "Dates", "are", "converted", "to", "ISO8601", "UTC", "timestamps", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L260-L262
20,296
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.gt
public static StringGreaterThanCondition.Builder gt(String variable, String expectedValue) { return StringGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static StringGreaterThanCondition.Builder gt(String variable, String expectedValue) { return StringGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "StringGreaterThanCondition", ".", "Builder", "gt", "(", "String", "variable", ",", "String", "expectedValue", ")", "{", "return", "StringGreaterThanCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for String greater than comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "String", "greater", "than", "comparison", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L272-L274
20,297
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.gt
public static TimestampGreaterThanCondition.Builder gt(String variable, Date expectedValue) { return TimestampGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static TimestampGreaterThanCondition.Builder gt(String variable, Date expectedValue) { return TimestampGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "TimestampGreaterThanCondition", ".", "Builder", "gt", "(", "String", "variable", ",", "Date", "expectedValue", ")", "{", "return", "TimestampGreaterThanCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for Timestamp greater than comparison. Dates are converted to ISO8601 UTC timestamps. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "Timestamp", "greater", "than", "comparison", ".", "Dates", "are", "converted", "to", "ISO8601", "UTC", "timestamps", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L308-L310
20,298
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.gte
public static StringGreaterThanOrEqualCondition.Builder gte(String variable, String expectedValue) { return StringGreaterThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static StringGreaterThanOrEqualCondition.Builder gte(String variable, String expectedValue) { return StringGreaterThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "StringGreaterThanOrEqualCondition", ".", "Builder", "gte", "(", "String", "variable", ",", "String", "expectedValue", ")", "{", "return", "StringGreaterThanOrEqualCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for String greater than or equal to comparison. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "String", "greater", "than", "or", "equal", "to", "comparison", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L320-L322
20,299
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java
StepFunctionBuilder.gte
public static TimestampGreaterThanOrEqualCondition.Builder gte(String variable, Date expectedValue) { return TimestampGreaterThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
java
public static TimestampGreaterThanOrEqualCondition.Builder gte(String variable, Date expectedValue) { return TimestampGreaterThanOrEqualCondition.builder().variable(variable).expectedValue(expectedValue); }
[ "public", "static", "TimestampGreaterThanOrEqualCondition", ".", "Builder", "gte", "(", "String", "variable", ",", "Date", "expectedValue", ")", "{", "return", "TimestampGreaterThanOrEqualCondition", ".", "builder", "(", ")", ".", "variable", "(", "variable", ")", ".", "expectedValue", "(", "expectedValue", ")", ";", "}" ]
Binary condition for Timestamp greater than or equal to comparison. Dates are converted to ISO8601 UTC timestamps. @param variable The JSONPath expression that determines which piece of the input document is used for the comparison. @param expectedValue The expected value for this condition. @see <a href="https://states-language.net/spec.html#choice-state">https://states-language.net/spec.html#choice-state</a> @see com.amazonaws.services.stepfunctions.builder.states.Choice
[ "Binary", "condition", "for", "Timestamp", "greater", "than", "or", "equal", "to", "comparison", ".", "Dates", "are", "converted", "to", "ISO8601", "UTC", "timestamps", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L356-L358