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,000
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.publishAsync
|
@Override
public java.util.concurrent.Future<PublishResult> publishAsync(String topicArn, String message, String subject) {
return publishAsync(new PublishRequest().withTopicArn(topicArn).withMessage(message).withSubject(subject));
}
|
java
|
@Override
public java.util.concurrent.Future<PublishResult> publishAsync(String topicArn, String message, String subject) {
return publishAsync(new PublishRequest().withTopicArn(topicArn).withMessage(message).withSubject(subject));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"PublishResult",
">",
"publishAsync",
"(",
"String",
"topicArn",
",",
"String",
"message",
",",
"String",
"subject",
")",
"{",
"return",
"publishAsync",
"(",
"new",
"PublishRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withMessage",
"(",
"message",
")",
".",
"withSubject",
"(",
"subject",
")",
")",
";",
"}"
] |
Simplified method form for invoking the Publish operation.
@see #publishAsync(PublishRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"Publish",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L686-L690
|
20,001
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.removePermissionAsync
|
@Override
public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label,
com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) {
return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label,
com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) {
return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"RemovePermissionResult",
">",
"removePermissionAsync",
"(",
"String",
"topicArn",
",",
"String",
"label",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"RemovePermissionRequest",
",",
"RemovePermissionResult",
">",
"asyncHandler",
")",
"{",
"return",
"removePermissionAsync",
"(",
"new",
"RemovePermissionRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withLabel",
"(",
"label",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the RemovePermission operation with an AsyncHandler.
@see #removePermissionAsync(RemovePermissionRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"RemovePermission",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L733-L738
|
20,002
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.setSubscriptionAttributesAsync
|
@Override
public java.util.concurrent.Future<SetSubscriptionAttributesResult> setSubscriptionAttributesAsync(String subscriptionArn, String attributeName,
String attributeValue) {
return setSubscriptionAttributesAsync(new SetSubscriptionAttributesRequest().withSubscriptionArn(subscriptionArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue));
}
|
java
|
@Override
public java.util.concurrent.Future<SetSubscriptionAttributesResult> setSubscriptionAttributesAsync(String subscriptionArn, String attributeName,
String attributeValue) {
return setSubscriptionAttributesAsync(new SetSubscriptionAttributesRequest().withSubscriptionArn(subscriptionArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SetSubscriptionAttributesResult",
">",
"setSubscriptionAttributesAsync",
"(",
"String",
"subscriptionArn",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
")",
"{",
"return",
"setSubscriptionAttributesAsync",
"(",
"new",
"SetSubscriptionAttributesRequest",
"(",
")",
".",
"withSubscriptionArn",
"(",
"subscriptionArn",
")",
".",
"withAttributeName",
"(",
"attributeName",
")",
".",
"withAttributeValue",
"(",
"attributeValue",
")",
")",
";",
"}"
] |
Simplified method form for invoking the SetSubscriptionAttributes operation.
@see #setSubscriptionAttributesAsync(SetSubscriptionAttributesRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SetSubscriptionAttributes",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L799-L805
|
20,003
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.setSubscriptionAttributesAsync
|
@Override
public java.util.concurrent.Future<SetSubscriptionAttributesResult> setSubscriptionAttributesAsync(String subscriptionArn, String attributeName,
String attributeValue, com.amazonaws.handlers.AsyncHandler<SetSubscriptionAttributesRequest, SetSubscriptionAttributesResult> asyncHandler) {
return setSubscriptionAttributesAsync(new SetSubscriptionAttributesRequest().withSubscriptionArn(subscriptionArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<SetSubscriptionAttributesResult> setSubscriptionAttributesAsync(String subscriptionArn, String attributeName,
String attributeValue, com.amazonaws.handlers.AsyncHandler<SetSubscriptionAttributesRequest, SetSubscriptionAttributesResult> asyncHandler) {
return setSubscriptionAttributesAsync(new SetSubscriptionAttributesRequest().withSubscriptionArn(subscriptionArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SetSubscriptionAttributesResult",
">",
"setSubscriptionAttributesAsync",
"(",
"String",
"subscriptionArn",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"SetSubscriptionAttributesRequest",
",",
"SetSubscriptionAttributesResult",
">",
"asyncHandler",
")",
"{",
"return",
"setSubscriptionAttributesAsync",
"(",
"new",
"SetSubscriptionAttributesRequest",
"(",
")",
".",
"withSubscriptionArn",
"(",
"subscriptionArn",
")",
".",
"withAttributeName",
"(",
"attributeName",
")",
".",
"withAttributeValue",
"(",
"attributeValue",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the SetSubscriptionAttributes operation with an AsyncHandler.
@see #setSubscriptionAttributesAsync(SetSubscriptionAttributesRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SetSubscriptionAttributes",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L812-L818
|
20,004
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.setTopicAttributesAsync
|
@Override
public java.util.concurrent.Future<SetTopicAttributesResult> setTopicAttributesAsync(String topicArn, String attributeName, String attributeValue) {
return setTopicAttributesAsync(new SetTopicAttributesRequest().withTopicArn(topicArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue));
}
|
java
|
@Override
public java.util.concurrent.Future<SetTopicAttributesResult> setTopicAttributesAsync(String topicArn, String attributeName, String attributeValue) {
return setTopicAttributesAsync(new SetTopicAttributesRequest().withTopicArn(topicArn).withAttributeName(attributeName)
.withAttributeValue(attributeValue));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SetTopicAttributesResult",
">",
"setTopicAttributesAsync",
"(",
"String",
"topicArn",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
")",
"{",
"return",
"setTopicAttributesAsync",
"(",
"new",
"SetTopicAttributesRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withAttributeName",
"(",
"attributeName",
")",
".",
"withAttributeValue",
"(",
"attributeValue",
")",
")",
";",
"}"
] |
Simplified method form for invoking the SetTopicAttributes operation.
@see #setTopicAttributesAsync(SetTopicAttributesRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SetTopicAttributes",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L838-L843
|
20,005
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.setTopicAttributesAsync
|
@Override
public java.util.concurrent.Future<SetTopicAttributesResult> setTopicAttributesAsync(String topicArn, String attributeName, String attributeValue,
com.amazonaws.handlers.AsyncHandler<SetTopicAttributesRequest, SetTopicAttributesResult> asyncHandler) {
return setTopicAttributesAsync(
new SetTopicAttributesRequest().withTopicArn(topicArn).withAttributeName(attributeName).withAttributeValue(attributeValue), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<SetTopicAttributesResult> setTopicAttributesAsync(String topicArn, String attributeName, String attributeValue,
com.amazonaws.handlers.AsyncHandler<SetTopicAttributesRequest, SetTopicAttributesResult> asyncHandler) {
return setTopicAttributesAsync(
new SetTopicAttributesRequest().withTopicArn(topicArn).withAttributeName(attributeName).withAttributeValue(attributeValue), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SetTopicAttributesResult",
">",
"setTopicAttributesAsync",
"(",
"String",
"topicArn",
",",
"String",
"attributeName",
",",
"String",
"attributeValue",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"SetTopicAttributesRequest",
",",
"SetTopicAttributesResult",
">",
"asyncHandler",
")",
"{",
"return",
"setTopicAttributesAsync",
"(",
"new",
"SetTopicAttributesRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withAttributeName",
"(",
"attributeName",
")",
".",
"withAttributeValue",
"(",
"attributeValue",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the SetTopicAttributes operation with an AsyncHandler.
@see #setTopicAttributesAsync(SetTopicAttributesRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"SetTopicAttributes",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L850-L856
|
20,006
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.subscribeAsync
|
@Override
public java.util.concurrent.Future<SubscribeResult> subscribeAsync(String topicArn, String protocol, String endpoint) {
return subscribeAsync(new SubscribeRequest().withTopicArn(topicArn).withProtocol(protocol).withEndpoint(endpoint));
}
|
java
|
@Override
public java.util.concurrent.Future<SubscribeResult> subscribeAsync(String topicArn, String protocol, String endpoint) {
return subscribeAsync(new SubscribeRequest().withTopicArn(topicArn).withProtocol(protocol).withEndpoint(endpoint));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SubscribeResult",
">",
"subscribeAsync",
"(",
"String",
"topicArn",
",",
"String",
"protocol",
",",
"String",
"endpoint",
")",
"{",
"return",
"subscribeAsync",
"(",
"new",
"SubscribeRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withProtocol",
"(",
"protocol",
")",
".",
"withEndpoint",
"(",
"endpoint",
")",
")",
";",
"}"
] |
Simplified method form for invoking the Subscribe operation.
@see #subscribeAsync(SubscribeRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"Subscribe",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L876-L880
|
20,007
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.subscribeAsync
|
@Override
public java.util.concurrent.Future<SubscribeResult> subscribeAsync(String topicArn, String protocol, String endpoint,
com.amazonaws.handlers.AsyncHandler<SubscribeRequest, SubscribeResult> asyncHandler) {
return subscribeAsync(new SubscribeRequest().withTopicArn(topicArn).withProtocol(protocol).withEndpoint(endpoint), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<SubscribeResult> subscribeAsync(String topicArn, String protocol, String endpoint,
com.amazonaws.handlers.AsyncHandler<SubscribeRequest, SubscribeResult> asyncHandler) {
return subscribeAsync(new SubscribeRequest().withTopicArn(topicArn).withProtocol(protocol).withEndpoint(endpoint), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"SubscribeResult",
">",
"subscribeAsync",
"(",
"String",
"topicArn",
",",
"String",
"protocol",
",",
"String",
"endpoint",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"SubscribeRequest",
",",
"SubscribeResult",
">",
"asyncHandler",
")",
"{",
"return",
"subscribeAsync",
"(",
"new",
"SubscribeRequest",
"(",
")",
".",
"withTopicArn",
"(",
"topicArn",
")",
".",
"withProtocol",
"(",
"protocol",
")",
".",
"withEndpoint",
"(",
"endpoint",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the Subscribe operation with an AsyncHandler.
@see #subscribeAsync(SubscribeRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"Subscribe",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L887-L892
|
20,008
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.unsubscribeAsync
|
@Override
public java.util.concurrent.Future<UnsubscribeResult> unsubscribeAsync(String subscriptionArn) {
return unsubscribeAsync(new UnsubscribeRequest().withSubscriptionArn(subscriptionArn));
}
|
java
|
@Override
public java.util.concurrent.Future<UnsubscribeResult> unsubscribeAsync(String subscriptionArn) {
return unsubscribeAsync(new UnsubscribeRequest().withSubscriptionArn(subscriptionArn));
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"UnsubscribeResult",
">",
"unsubscribeAsync",
"(",
"String",
"subscriptionArn",
")",
"{",
"return",
"unsubscribeAsync",
"(",
"new",
"UnsubscribeRequest",
"(",
")",
".",
"withSubscriptionArn",
"(",
"subscriptionArn",
")",
")",
";",
"}"
] |
Simplified method form for invoking the Unsubscribe operation.
@see #unsubscribeAsync(UnsubscribeRequest)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"Unsubscribe",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L925-L929
|
20,009
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java
|
AbstractAmazonSNSAsync.unsubscribeAsync
|
@Override
public java.util.concurrent.Future<UnsubscribeResult> unsubscribeAsync(String subscriptionArn,
com.amazonaws.handlers.AsyncHandler<UnsubscribeRequest, UnsubscribeResult> asyncHandler) {
return unsubscribeAsync(new UnsubscribeRequest().withSubscriptionArn(subscriptionArn), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<UnsubscribeResult> unsubscribeAsync(String subscriptionArn,
com.amazonaws.handlers.AsyncHandler<UnsubscribeRequest, UnsubscribeResult> asyncHandler) {
return unsubscribeAsync(new UnsubscribeRequest().withSubscriptionArn(subscriptionArn), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"UnsubscribeResult",
">",
"unsubscribeAsync",
"(",
"String",
"subscriptionArn",
",",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"UnsubscribeRequest",
",",
"UnsubscribeResult",
">",
"asyncHandler",
")",
"{",
"return",
"unsubscribeAsync",
"(",
"new",
"UnsubscribeRequest",
"(",
")",
".",
"withSubscriptionArn",
"(",
"subscriptionArn",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the Unsubscribe operation with an AsyncHandler.
@see #unsubscribeAsync(UnsubscribeRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"Unsubscribe",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AbstractAmazonSNSAsync.java#L936-L941
|
20,010
|
aws/aws-sdk-java
|
aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/model/DescribeOriginEndpointResult.java
|
DescribeOriginEndpointResult.setWhitelist
|
public void setWhitelist(java.util.Collection<String> whitelist) {
if (whitelist == null) {
this.whitelist = null;
return;
}
this.whitelist = new java.util.ArrayList<String>(whitelist);
}
|
java
|
public void setWhitelist(java.util.Collection<String> whitelist) {
if (whitelist == null) {
this.whitelist = null;
return;
}
this.whitelist = new java.util.ArrayList<String>(whitelist);
}
|
[
"public",
"void",
"setWhitelist",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"String",
">",
"whitelist",
")",
"{",
"if",
"(",
"whitelist",
"==",
"null",
")",
"{",
"this",
".",
"whitelist",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"whitelist",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"String",
">",
"(",
"whitelist",
")",
";",
"}"
] |
A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
@param whitelist
A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
|
[
"A",
"list",
"of",
"source",
"IP",
"CIDR",
"blocks",
"that",
"will",
"be",
"allowed",
"to",
"access",
"the",
"OriginEndpoint",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediapackage/src/main/java/com/amazonaws/services/mediapackage/model/DescribeOriginEndpointResult.java#L513-L520
|
20,011
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ItemResponse.java
|
ItemResponse.withEventsItemResponse
|
public ItemResponse withEventsItemResponse(java.util.Map<String, EventItemResponse> eventsItemResponse) {
setEventsItemResponse(eventsItemResponse);
return this;
}
|
java
|
public ItemResponse withEventsItemResponse(java.util.Map<String, EventItemResponse> eventsItemResponse) {
setEventsItemResponse(eventsItemResponse);
return this;
}
|
[
"public",
"ItemResponse",
"withEventsItemResponse",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"EventItemResponse",
">",
"eventsItemResponse",
")",
"{",
"setEventsItemResponse",
"(",
"eventsItemResponse",
")",
";",
"return",
"this",
";",
"}"
] |
A multipart response object that contains a key and value for each event ID in the request. In each object, the
event ID is the key, and an EventItemResponse object is the value.
@param eventsItemResponse
A multipart response object that contains a key and value for each event ID in the request. In each
object, the event ID is the key, and an EventItemResponse object is the value.
@return Returns a reference to this object so that method calls can be chained together.
|
[
"A",
"multipart",
"response",
"object",
"that",
"contains",
"a",
"key",
"and",
"value",
"for",
"each",
"event",
"ID",
"in",
"the",
"request",
".",
"In",
"each",
"object",
"the",
"event",
"ID",
"is",
"the",
"key",
"and",
"an",
"EventItemResponse",
"object",
"is",
"the",
"value",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ItemResponse.java#L106-L109
|
20,012
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/http/JsonErrorResponseHandler.java
|
JsonErrorResponseHandler.createException
|
private AmazonServiceException createException(String errorCode, JsonContent jsonContent) {
AmazonServiceException ase = unmarshallException(errorCode, jsonContent);
if (ase == null) {
ase = new AmazonServiceException(
"Unable to unmarshall exception response with the unmarshallers provided");
}
return ase;
}
|
java
|
private AmazonServiceException createException(String errorCode, JsonContent jsonContent) {
AmazonServiceException ase = unmarshallException(errorCode, jsonContent);
if (ase == null) {
ase = new AmazonServiceException(
"Unable to unmarshall exception response with the unmarshallers provided");
}
return ase;
}
|
[
"private",
"AmazonServiceException",
"createException",
"(",
"String",
"errorCode",
",",
"JsonContent",
"jsonContent",
")",
"{",
"AmazonServiceException",
"ase",
"=",
"unmarshallException",
"(",
"errorCode",
",",
"jsonContent",
")",
";",
"if",
"(",
"ase",
"==",
"null",
")",
"{",
"ase",
"=",
"new",
"AmazonServiceException",
"(",
"\"Unable to unmarshall exception response with the unmarshallers provided\"",
")",
";",
"}",
"return",
"ase",
";",
"}"
] |
Create an AmazonServiceException using the chain of unmarshallers. This method will never
return null, it will always return a valid AmazonServiceException
@param errorCode
Error code to find an appropriate unmarshaller
@param jsonContent
JsonContent of HTTP response
@return AmazonServiceException
|
[
"Create",
"an",
"AmazonServiceException",
"using",
"the",
"chain",
"of",
"unmarshallers",
".",
"This",
"method",
"will",
"never",
"return",
"null",
"it",
"will",
"always",
"return",
"a",
"valid",
"AmazonServiceException"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/JsonErrorResponseHandler.java#L95-L102
|
20,013
|
aws/aws-sdk-java
|
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingStatistics.java
|
FindingStatistics.withCountBySeverity
|
public FindingStatistics withCountBySeverity(java.util.Map<String, Integer> countBySeverity) {
setCountBySeverity(countBySeverity);
return this;
}
|
java
|
public FindingStatistics withCountBySeverity(java.util.Map<String, Integer> countBySeverity) {
setCountBySeverity(countBySeverity);
return this;
}
|
[
"public",
"FindingStatistics",
"withCountBySeverity",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"Integer",
">",
"countBySeverity",
")",
"{",
"setCountBySeverity",
"(",
"countBySeverity",
")",
";",
"return",
"this",
";",
"}"
] |
Represents a map of severity to count statistic for a set of findings
@param countBySeverity
Represents a map of severity to count statistic for a set of findings
@return Returns a reference to this object so that method calls can be chained together.
|
[
"Represents",
"a",
"map",
"of",
"severity",
"to",
"count",
"statistic",
"for",
"a",
"set",
"of",
"findings"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingStatistics.java#L61-L64
|
20,014
|
aws/aws-sdk-java
|
src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java
|
AmazonKinesisApplicationSampleRecordProcessor.processRecordsWithRetries
|
private void processRecordsWithRetries(List<Record> records) {
for (Record record : records) {
boolean processedSuccessfully = false;
for (int i = 0; i < NUM_RETRIES; i++) {
try {
//
// Logic to process record goes here.
//
processSingleRecord(record);
processedSuccessfully = true;
break;
} catch (Throwable t) {
LOG.warn("Caught throwable while processing record " + record, t);
}
// backoff if we encounter an exception.
try {
Thread.sleep(BACKOFF_TIME_IN_MILLIS);
} catch (InterruptedException e) {
LOG.debug("Interrupted sleep", e);
}
}
if (!processedSuccessfully) {
LOG.error("Couldn't process record " + record + ". Skipping the record.");
}
}
}
|
java
|
private void processRecordsWithRetries(List<Record> records) {
for (Record record : records) {
boolean processedSuccessfully = false;
for (int i = 0; i < NUM_RETRIES; i++) {
try {
//
// Logic to process record goes here.
//
processSingleRecord(record);
processedSuccessfully = true;
break;
} catch (Throwable t) {
LOG.warn("Caught throwable while processing record " + record, t);
}
// backoff if we encounter an exception.
try {
Thread.sleep(BACKOFF_TIME_IN_MILLIS);
} catch (InterruptedException e) {
LOG.debug("Interrupted sleep", e);
}
}
if (!processedSuccessfully) {
LOG.error("Couldn't process record " + record + ". Skipping the record.");
}
}
}
|
[
"private",
"void",
"processRecordsWithRetries",
"(",
"List",
"<",
"Record",
">",
"records",
")",
"{",
"for",
"(",
"Record",
"record",
":",
"records",
")",
"{",
"boolean",
"processedSuccessfully",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"NUM_RETRIES",
";",
"i",
"++",
")",
"{",
"try",
"{",
"//",
"// Logic to process record goes here.",
"//",
"processSingleRecord",
"(",
"record",
")",
";",
"processedSuccessfully",
"=",
"true",
";",
"break",
";",
"}",
"catch",
"(",
"Throwable",
"t",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"Caught throwable while processing record \"",
"+",
"record",
",",
"t",
")",
";",
"}",
"// backoff if we encounter an exception.",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"BACKOFF_TIME_IN_MILLIS",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Interrupted sleep\"",
",",
"e",
")",
";",
"}",
"}",
"if",
"(",
"!",
"processedSuccessfully",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Couldn't process record \"",
"+",
"record",
"+",
"\". Skipping the record.\"",
")",
";",
"}",
"}",
"}"
] |
Process records performing retries as needed. Skip "poison pill" records.
@param records Data records to be processed.
|
[
"Process",
"records",
"performing",
"retries",
"as",
"needed",
".",
"Skip",
"poison",
"pill",
"records",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java#L81-L109
|
20,015
|
aws/aws-sdk-java
|
src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java
|
AmazonKinesisApplicationSampleRecordProcessor.processSingleRecord
|
private void processSingleRecord(Record record) {
// TODO Add your own record processing logic here
String data = null;
try {
// For this app, we interpret the payload as UTF-8 chars.
data = decoder.decode(record.getData()).toString();
// Assume this record came from AmazonKinesisSample and log its age.
long recordCreateTime = new Long(data.substring("testData-".length()));
long ageOfRecordInMillis = System.currentTimeMillis() - recordCreateTime;
LOG.info(record.getSequenceNumber() + ", " + record.getPartitionKey() + ", " + data + ", Created "
+ ageOfRecordInMillis + " milliseconds ago.");
} catch (NumberFormatException e) {
LOG.info("Record does not match sample record format. Ignoring record with data; " + data);
} catch (CharacterCodingException e) {
LOG.error("Malformed data: " + data, e);
}
}
|
java
|
private void processSingleRecord(Record record) {
// TODO Add your own record processing logic here
String data = null;
try {
// For this app, we interpret the payload as UTF-8 chars.
data = decoder.decode(record.getData()).toString();
// Assume this record came from AmazonKinesisSample and log its age.
long recordCreateTime = new Long(data.substring("testData-".length()));
long ageOfRecordInMillis = System.currentTimeMillis() - recordCreateTime;
LOG.info(record.getSequenceNumber() + ", " + record.getPartitionKey() + ", " + data + ", Created "
+ ageOfRecordInMillis + " milliseconds ago.");
} catch (NumberFormatException e) {
LOG.info("Record does not match sample record format. Ignoring record with data; " + data);
} catch (CharacterCodingException e) {
LOG.error("Malformed data: " + data, e);
}
}
|
[
"private",
"void",
"processSingleRecord",
"(",
"Record",
"record",
")",
"{",
"// TODO Add your own record processing logic here",
"String",
"data",
"=",
"null",
";",
"try",
"{",
"// For this app, we interpret the payload as UTF-8 chars.",
"data",
"=",
"decoder",
".",
"decode",
"(",
"record",
".",
"getData",
"(",
")",
")",
".",
"toString",
"(",
")",
";",
"// Assume this record came from AmazonKinesisSample and log its age.",
"long",
"recordCreateTime",
"=",
"new",
"Long",
"(",
"data",
".",
"substring",
"(",
"\"testData-\"",
".",
"length",
"(",
")",
")",
")",
";",
"long",
"ageOfRecordInMillis",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"recordCreateTime",
";",
"LOG",
".",
"info",
"(",
"record",
".",
"getSequenceNumber",
"(",
")",
"+",
"\", \"",
"+",
"record",
".",
"getPartitionKey",
"(",
")",
"+",
"\", \"",
"+",
"data",
"+",
"\", Created \"",
"+",
"ageOfRecordInMillis",
"+",
"\" milliseconds ago.\"",
")",
";",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Record does not match sample record format. Ignoring record with data; \"",
"+",
"data",
")",
";",
"}",
"catch",
"(",
"CharacterCodingException",
"e",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Malformed data: \"",
"+",
"data",
",",
"e",
")",
";",
"}",
"}"
] |
Process a single record.
@param record The record to be processed.
|
[
"Process",
"a",
"single",
"record",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java#L116-L134
|
20,016
|
aws/aws-sdk-java
|
src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java
|
AmazonKinesisApplicationSampleRecordProcessor.checkpoint
|
private void checkpoint(IRecordProcessorCheckpointer checkpointer) {
LOG.info("Checkpointing shard " + kinesisShardId);
for (int i = 0; i < NUM_RETRIES; i++) {
try {
checkpointer.checkpoint();
break;
} catch (ShutdownException se) {
// Ignore checkpoint if the processor instance has been shutdown (fail over).
LOG.info("Caught shutdown exception, skipping checkpoint.", se);
break;
} catch (ThrottlingException e) {
// Backoff and re-attempt checkpoint upon transient failures
if (i >= (NUM_RETRIES - 1)) {
LOG.error("Checkpoint failed after " + (i + 1) + "attempts.", e);
break;
} else {
LOG.info("Transient issue when checkpointing - attempt " + (i + 1) + " of "
+ NUM_RETRIES, e);
}
} catch (InvalidStateException e) {
// This indicates an issue with the DynamoDB table (check for table, provisioned IOPS).
LOG.error("Cannot save checkpoint to the DynamoDB table used by the Amazon Kinesis Client Library.", e);
break;
}
try {
Thread.sleep(BACKOFF_TIME_IN_MILLIS);
} catch (InterruptedException e) {
LOG.debug("Interrupted sleep", e);
}
}
}
|
java
|
private void checkpoint(IRecordProcessorCheckpointer checkpointer) {
LOG.info("Checkpointing shard " + kinesisShardId);
for (int i = 0; i < NUM_RETRIES; i++) {
try {
checkpointer.checkpoint();
break;
} catch (ShutdownException se) {
// Ignore checkpoint if the processor instance has been shutdown (fail over).
LOG.info("Caught shutdown exception, skipping checkpoint.", se);
break;
} catch (ThrottlingException e) {
// Backoff and re-attempt checkpoint upon transient failures
if (i >= (NUM_RETRIES - 1)) {
LOG.error("Checkpoint failed after " + (i + 1) + "attempts.", e);
break;
} else {
LOG.info("Transient issue when checkpointing - attempt " + (i + 1) + " of "
+ NUM_RETRIES, e);
}
} catch (InvalidStateException e) {
// This indicates an issue with the DynamoDB table (check for table, provisioned IOPS).
LOG.error("Cannot save checkpoint to the DynamoDB table used by the Amazon Kinesis Client Library.", e);
break;
}
try {
Thread.sleep(BACKOFF_TIME_IN_MILLIS);
} catch (InterruptedException e) {
LOG.debug("Interrupted sleep", e);
}
}
}
|
[
"private",
"void",
"checkpoint",
"(",
"IRecordProcessorCheckpointer",
"checkpointer",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Checkpointing shard \"",
"+",
"kinesisShardId",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"NUM_RETRIES",
";",
"i",
"++",
")",
"{",
"try",
"{",
"checkpointer",
".",
"checkpoint",
"(",
")",
";",
"break",
";",
"}",
"catch",
"(",
"ShutdownException",
"se",
")",
"{",
"// Ignore checkpoint if the processor instance has been shutdown (fail over).",
"LOG",
".",
"info",
"(",
"\"Caught shutdown exception, skipping checkpoint.\"",
",",
"se",
")",
";",
"break",
";",
"}",
"catch",
"(",
"ThrottlingException",
"e",
")",
"{",
"// Backoff and re-attempt checkpoint upon transient failures",
"if",
"(",
"i",
">=",
"(",
"NUM_RETRIES",
"-",
"1",
")",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Checkpoint failed after \"",
"+",
"(",
"i",
"+",
"1",
")",
"+",
"\"attempts.\"",
",",
"e",
")",
";",
"break",
";",
"}",
"else",
"{",
"LOG",
".",
"info",
"(",
"\"Transient issue when checkpointing - attempt \"",
"+",
"(",
"i",
"+",
"1",
")",
"+",
"\" of \"",
"+",
"NUM_RETRIES",
",",
"e",
")",
";",
"}",
"}",
"catch",
"(",
"InvalidStateException",
"e",
")",
"{",
"// This indicates an issue with the DynamoDB table (check for table, provisioned IOPS).",
"LOG",
".",
"error",
"(",
"\"Cannot save checkpoint to the DynamoDB table used by the Amazon Kinesis Client Library.\"",
",",
"e",
")",
";",
"break",
";",
"}",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"BACKOFF_TIME_IN_MILLIS",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Interrupted sleep\"",
",",
"e",
")",
";",
"}",
"}",
"}"
] |
Checkpoint with retries.
@param checkpointer
|
[
"Checkpoint",
"with",
"retries",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesis/AmazonKinesisApplicationSampleRecordProcessor.java#L151-L181
|
20,017
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadImpl.java
|
UploadImpl.waitForUploadResult
|
public UploadResult waitForUploadResult()
throws AmazonClientException, AmazonServiceException, InterruptedException {
try {
UploadResult result = null;
while (!monitor.isDone() || result == null) {
Future<?> f = monitor.getFuture();
result = (UploadResult)f.get();
}
return result;
} catch (ExecutionException e) {
rethrowExecutionException(e);
return null;
}
}
|
java
|
public UploadResult waitForUploadResult()
throws AmazonClientException, AmazonServiceException, InterruptedException {
try {
UploadResult result = null;
while (!monitor.isDone() || result == null) {
Future<?> f = monitor.getFuture();
result = (UploadResult)f.get();
}
return result;
} catch (ExecutionException e) {
rethrowExecutionException(e);
return null;
}
}
|
[
"public",
"UploadResult",
"waitForUploadResult",
"(",
")",
"throws",
"AmazonClientException",
",",
"AmazonServiceException",
",",
"InterruptedException",
"{",
"try",
"{",
"UploadResult",
"result",
"=",
"null",
";",
"while",
"(",
"!",
"monitor",
".",
"isDone",
"(",
")",
"||",
"result",
"==",
"null",
")",
"{",
"Future",
"<",
"?",
">",
"f",
"=",
"monitor",
".",
"getFuture",
"(",
")",
";",
"result",
"=",
"(",
"UploadResult",
")",
"f",
".",
"get",
"(",
")",
";",
"}",
"return",
"result",
";",
"}",
"catch",
"(",
"ExecutionException",
"e",
")",
"{",
"rethrowExecutionException",
"(",
"e",
")",
";",
"return",
"null",
";",
"}",
"}"
] |
Waits for this upload to complete and returns the result of this upload.
This is a blocking call. Be prepared to handle errors when calling this
method. Any errors that occurred during the asynchronous transfer will be
re-thrown through this method.
@return The result of this transfer.
@throws AmazonClientException
If any errors were encountered in the client while making the
request or handling the response.
@throws AmazonServiceException
If any errors occurred in Amazon S3 while processing the
request.
@throws InterruptedException
If this thread is interrupted while waiting for the upload to
complete.
|
[
"Waits",
"for",
"this",
"upload",
"to",
"complete",
"and",
"returns",
"the",
"result",
"of",
"this",
"upload",
".",
"This",
"is",
"a",
"blocking",
"call",
".",
"Be",
"prepared",
"to",
"handle",
"errors",
"when",
"calling",
"this",
"method",
".",
"Any",
"errors",
"that",
"occurred",
"during",
"the",
"asynchronous",
"transfer",
"will",
"be",
"re",
"-",
"thrown",
"through",
"this",
"method",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadImpl.java#L56-L69
|
20,018
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadImpl.java
|
UploadImpl.pause
|
private PauseResult<PersistableUpload> pause(
final boolean forceCancelTransfers) throws AmazonClientException {
UploadMonitor uploadMonitor = (UploadMonitor) monitor;
return uploadMonitor.pause(forceCancelTransfers);
}
|
java
|
private PauseResult<PersistableUpload> pause(
final boolean forceCancelTransfers) throws AmazonClientException {
UploadMonitor uploadMonitor = (UploadMonitor) monitor;
return uploadMonitor.pause(forceCancelTransfers);
}
|
[
"private",
"PauseResult",
"<",
"PersistableUpload",
">",
"pause",
"(",
"final",
"boolean",
"forceCancelTransfers",
")",
"throws",
"AmazonClientException",
"{",
"UploadMonitor",
"uploadMonitor",
"=",
"(",
"UploadMonitor",
")",
"monitor",
";",
"return",
"uploadMonitor",
".",
"pause",
"(",
"forceCancelTransfers",
")",
";",
"}"
] |
Tries to pause and return the information required to resume the upload
operation.
|
[
"Tries",
"to",
"pause",
"and",
"return",
"the",
"information",
"required",
"to",
"resume",
"the",
"upload",
"operation",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/UploadImpl.java#L89-L93
|
20,019
|
aws/aws-sdk-java
|
aws-java-sdk-eks/src/main/java/com/amazonaws/services/eks/waiters/AmazonEKSWaiters.java
|
AmazonEKSWaiters.clusterActive
|
public Waiter<DescribeClusterRequest> clusterActive() {
return new WaiterBuilder<DescribeClusterRequest, DescribeClusterResult>().withSdkFunction(new DescribeClusterFunction(client))
.withAcceptors(new ClusterActive.IsDELETINGMatcher(), new ClusterActive.IsFAILEDMatcher(), new ClusterActive.IsACTIVEMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<DescribeClusterRequest> clusterActive() {
return new WaiterBuilder<DescribeClusterRequest, DescribeClusterResult>().withSdkFunction(new DescribeClusterFunction(client))
.withAcceptors(new ClusterActive.IsDELETINGMatcher(), new ClusterActive.IsFAILEDMatcher(), new ClusterActive.IsACTIVEMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"DescribeClusterRequest",
">",
"clusterActive",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"DescribeClusterRequest",
",",
"DescribeClusterResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"DescribeClusterFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ClusterActive",
".",
"IsDELETINGMatcher",
"(",
")",
",",
"new",
"ClusterActive",
".",
"IsFAILEDMatcher",
"(",
")",
",",
"new",
"ClusterActive",
".",
"IsACTIVEMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"40",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"30",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ClusterActive 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",
"ClusterActive",
"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-eks/src/main/java/com/amazonaws/services/eks/waiters/AmazonEKSWaiters.java#L66-L72
|
20,020
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionLoadRequest.java
|
TransactionLoadRequest.addLoad
|
public TransactionLoadRequest addLoad(Object key) {
objectsToLoad.add(key);
objectLoadExpressions.add(null);
return this;
}
|
java
|
public TransactionLoadRequest addLoad(Object key) {
objectsToLoad.add(key);
objectLoadExpressions.add(null);
return this;
}
|
[
"public",
"TransactionLoadRequest",
"addLoad",
"(",
"Object",
"key",
")",
"{",
"objectsToLoad",
".",
"add",
"(",
"key",
")",
";",
"objectLoadExpressions",
".",
"add",
"(",
"null",
")",
";",
"return",
"this",
";",
"}"
] |
Adds specified key to list of objects to load. All item attributes will be loaded.
|
[
"Adds",
"specified",
"key",
"to",
"list",
"of",
"objects",
"to",
"load",
".",
"All",
"item",
"attributes",
"will",
"be",
"loaded",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionLoadRequest.java#L46-L50
|
20,021
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionLoadRequest.java
|
TransactionLoadRequest.addLoad
|
public TransactionLoadRequest addLoad(Object key, DynamoDBTransactionLoadExpression transactLoadExpression) {
objectsToLoad.add(key);
objectLoadExpressions.add(transactLoadExpression);
return this;
}
|
java
|
public TransactionLoadRequest addLoad(Object key, DynamoDBTransactionLoadExpression transactLoadExpression) {
objectsToLoad.add(key);
objectLoadExpressions.add(transactLoadExpression);
return this;
}
|
[
"public",
"TransactionLoadRequest",
"addLoad",
"(",
"Object",
"key",
",",
"DynamoDBTransactionLoadExpression",
"transactLoadExpression",
")",
"{",
"objectsToLoad",
".",
"add",
"(",
"key",
")",
";",
"objectLoadExpressions",
".",
"add",
"(",
"transactLoadExpression",
")",
";",
"return",
"this",
";",
"}"
] |
Adds specified key to list of objects to load. Item attributes will be loaded as specified by transactLoadExpression.
|
[
"Adds",
"specified",
"key",
"to",
"list",
"of",
"objects",
"to",
"load",
".",
"Item",
"attributes",
"will",
"be",
"loaded",
"as",
"specified",
"by",
"transactLoadExpression",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionLoadRequest.java#L55-L59
|
20,022
|
aws/aws-sdk-java
|
aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/waiters/AmazonRoute53Waiters.java
|
AmazonRoute53Waiters.resourceRecordSetsChanged
|
public Waiter<GetChangeRequest> resourceRecordSetsChanged() {
return new WaiterBuilder<GetChangeRequest, GetChangeResult>().withSdkFunction(new GetChangeFunction(client))
.withAcceptors(new ResourceRecordSetsChanged.IsINSYNCMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
java
|
public Waiter<GetChangeRequest> resourceRecordSetsChanged() {
return new WaiterBuilder<GetChangeRequest, GetChangeResult>().withSdkFunction(new GetChangeFunction(client))
.withAcceptors(new ResourceRecordSetsChanged.IsINSYNCMatcher())
.withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(30)))
.withExecutorService(executorService).build();
}
|
[
"public",
"Waiter",
"<",
"GetChangeRequest",
">",
"resourceRecordSetsChanged",
"(",
")",
"{",
"return",
"new",
"WaiterBuilder",
"<",
"GetChangeRequest",
",",
"GetChangeResult",
">",
"(",
")",
".",
"withSdkFunction",
"(",
"new",
"GetChangeFunction",
"(",
"client",
")",
")",
".",
"withAcceptors",
"(",
"new",
"ResourceRecordSetsChanged",
".",
"IsINSYNCMatcher",
"(",
")",
")",
".",
"withDefaultPollingStrategy",
"(",
"new",
"PollingStrategy",
"(",
"new",
"MaxAttemptsRetryStrategy",
"(",
"60",
")",
",",
"new",
"FixedDelayStrategy",
"(",
"30",
")",
")",
")",
".",
"withExecutorService",
"(",
"executorService",
")",
".",
"build",
"(",
")",
";",
"}"
] |
Builds a ResourceRecordSetsChanged 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",
"ResourceRecordSetsChanged",
"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-route53/src/main/java/com/amazonaws/services/route53/waiters/AmazonRoute53Waiters.java#L51-L57
|
20,023
|
aws/aws-sdk-java
|
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListGroupVersionsResult.java
|
ListGroupVersionsResult.setVersions
|
public void setVersions(java.util.Collection<VersionInformation> versions) {
if (versions == null) {
this.versions = null;
return;
}
this.versions = new java.util.ArrayList<VersionInformation>(versions);
}
|
java
|
public void setVersions(java.util.Collection<VersionInformation> versions) {
if (versions == null) {
this.versions = null;
return;
}
this.versions = new java.util.ArrayList<VersionInformation>(versions);
}
|
[
"public",
"void",
"setVersions",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"VersionInformation",
">",
"versions",
")",
"{",
"if",
"(",
"versions",
"==",
"null",
")",
"{",
"this",
".",
"versions",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"versions",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"VersionInformation",
">",
"(",
"versions",
")",
";",
"}"
] |
Information about a version.
@param versions
Information about a version.
|
[
"Information",
"about",
"a",
"version",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListGroupVersionsResult.java#L82-L89
|
20,024
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/model/intermediate/VariableModel.java
|
VariableModel.getVariableSetterType
|
public String getVariableSetterType() {
final String prefix = List.class.getName();
if (variableType.startsWith(prefix)) {
return Collection.class.getName() + variableType.substring(prefix.length());
} else {
return variableType;
}
}
|
java
|
public String getVariableSetterType() {
final String prefix = List.class.getName();
if (variableType.startsWith(prefix)) {
return Collection.class.getName() + variableType.substring(prefix.length());
} else {
return variableType;
}
}
|
[
"public",
"String",
"getVariableSetterType",
"(",
")",
"{",
"final",
"String",
"prefix",
"=",
"List",
".",
"class",
".",
"getName",
"(",
")",
";",
"if",
"(",
"variableType",
".",
"startsWith",
"(",
"prefix",
")",
")",
"{",
"return",
"Collection",
".",
"class",
".",
"getName",
"(",
")",
"+",
"variableType",
".",
"substring",
"(",
"prefix",
".",
"length",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"variableType",
";",
"}",
"}"
] |
Returns the Java type used for the input parameter of a setter method.
|
[
"Returns",
"the",
"Java",
"type",
"used",
"for",
"the",
"input",
"parameter",
"of",
"a",
"setter",
"method",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/model/intermediate/VariableModel.java#L95-L102
|
20,025
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java
|
MetricCollectorSupport.startSingleton
|
static synchronized boolean startSingleton(CloudWatchMetricConfig config) {
if (singleton != null) {
return false;
}
log.info("Initializing " + MetricCollectorSupport.class.getSimpleName());
return createAndStartCollector(config);
}
|
java
|
static synchronized boolean startSingleton(CloudWatchMetricConfig config) {
if (singleton != null) {
return false;
}
log.info("Initializing " + MetricCollectorSupport.class.getSimpleName());
return createAndStartCollector(config);
}
|
[
"static",
"synchronized",
"boolean",
"startSingleton",
"(",
"CloudWatchMetricConfig",
"config",
")",
"{",
"if",
"(",
"singleton",
"!=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"log",
".",
"info",
"(",
"\"Initializing \"",
"+",
"MetricCollectorSupport",
".",
"class",
".",
"getSimpleName",
"(",
")",
")",
";",
"return",
"createAndStartCollector",
"(",
"config",
")",
";",
"}"
] |
Starts a new CloudWatch collector if it's not already started.
@return true if it is successfully started by this call; false if the
collector is already running or if there is failure in trying to start
the collector for the first time.
|
[
"Starts",
"a",
"new",
"CloudWatch",
"collector",
"if",
"it",
"s",
"not",
"already",
"started",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java#L53-L59
|
20,026
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java
|
MetricCollectorSupport.restartSingleton
|
static synchronized boolean restartSingleton(CloudWatchMetricConfig config) {
if (singleton == null) {
throw new IllegalStateException(MetricCollectorSupport.class.getSimpleName()
+ " has neven been initialized");
}
log.info("Re-initializing " + MetricCollectorSupport.class.getSimpleName());
singleton.stop();
// singleton is set to null at this point via the stop method
return createAndStartCollector(config);
}
|
java
|
static synchronized boolean restartSingleton(CloudWatchMetricConfig config) {
if (singleton == null) {
throw new IllegalStateException(MetricCollectorSupport.class.getSimpleName()
+ " has neven been initialized");
}
log.info("Re-initializing " + MetricCollectorSupport.class.getSimpleName());
singleton.stop();
// singleton is set to null at this point via the stop method
return createAndStartCollector(config);
}
|
[
"static",
"synchronized",
"boolean",
"restartSingleton",
"(",
"CloudWatchMetricConfig",
"config",
")",
"{",
"if",
"(",
"singleton",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"MetricCollectorSupport",
".",
"class",
".",
"getSimpleName",
"(",
")",
"+",
"\" has neven been initialized\"",
")",
";",
"}",
"log",
".",
"info",
"(",
"\"Re-initializing \"",
"+",
"MetricCollectorSupport",
".",
"class",
".",
"getSimpleName",
"(",
")",
")",
";",
"singleton",
".",
"stop",
"(",
")",
";",
"// singleton is set to null at this point via the stop method",
"return",
"createAndStartCollector",
"(",
"config",
")",
";",
"}"
] |
Retarts with a new CloudWatch collector.
|
[
"Retarts",
"with",
"a",
"new",
"CloudWatch",
"collector",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java#L62-L71
|
20,027
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java
|
MetricCollectorSupport.createAndStartCollector
|
private static boolean createAndStartCollector(CloudWatchMetricConfig config) {
MetricCollectorSupport collector = new MetricCollectorSupport(config);
if (collector.start()) {
singleton = collector;
return true;
}
return false;
}
|
java
|
private static boolean createAndStartCollector(CloudWatchMetricConfig config) {
MetricCollectorSupport collector = new MetricCollectorSupport(config);
if (collector.start()) {
singleton = collector;
return true;
}
return false;
}
|
[
"private",
"static",
"boolean",
"createAndStartCollector",
"(",
"CloudWatchMetricConfig",
"config",
")",
"{",
"MetricCollectorSupport",
"collector",
"=",
"new",
"MetricCollectorSupport",
"(",
"config",
")",
";",
"if",
"(",
"collector",
".",
"start",
"(",
")",
")",
"{",
"singleton",
"=",
"collector",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] |
Returns true if the collector is successfully created and started;
false otherwise.
|
[
"Returns",
"true",
"if",
"the",
"collector",
"is",
"successfully",
"created",
"and",
"started",
";",
"false",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java#L77-L84
|
20,028
|
aws/aws-sdk-java
|
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java
|
MetricCollectorSupport.stop
|
@Override
public boolean stop() {
synchronized(MetricCollectorSupport.class) {
if (uploaderThread != null) {
uploaderThread.cancel();
uploaderThread.interrupt();
uploaderThread = null;
if (singleton == this) { // defensive check
singleton = null;
}
return true;
}
}
return false;
}
|
java
|
@Override
public boolean stop() {
synchronized(MetricCollectorSupport.class) {
if (uploaderThread != null) {
uploaderThread.cancel();
uploaderThread.interrupt();
uploaderThread = null;
if (singleton == this) { // defensive check
singleton = null;
}
return true;
}
}
return false;
}
|
[
"@",
"Override",
"public",
"boolean",
"stop",
"(",
")",
"{",
"synchronized",
"(",
"MetricCollectorSupport",
".",
"class",
")",
"{",
"if",
"(",
"uploaderThread",
"!=",
"null",
")",
"{",
"uploaderThread",
".",
"cancel",
"(",
")",
";",
"uploaderThread",
".",
"interrupt",
"(",
")",
";",
"uploaderThread",
"=",
"null",
";",
"if",
"(",
"singleton",
"==",
"this",
")",
"{",
"// defensive check",
"singleton",
"=",
"null",
";",
"}",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] |
Stops this collector immediately, dropping all pending metrics in memory.
|
[
"Stops",
"this",
"collector",
"immediately",
"dropping",
"all",
"pending",
"metrics",
"in",
"memory",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/MetricCollectorSupport.java#L119-L133
|
20,029
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java
|
QueryStringSigner.sign
|
public void sign(SignableRequest<?> request, AWSCredentials credentials)
throws SdkClientException {
sign(request, SignatureVersion.V2, SigningAlgorithm.HmacSHA256, credentials);
}
|
java
|
public void sign(SignableRequest<?> request, AWSCredentials credentials)
throws SdkClientException {
sign(request, SignatureVersion.V2, SigningAlgorithm.HmacSHA256, credentials);
}
|
[
"public",
"void",
"sign",
"(",
"SignableRequest",
"<",
"?",
">",
"request",
",",
"AWSCredentials",
"credentials",
")",
"throws",
"SdkClientException",
"{",
"sign",
"(",
"request",
",",
"SignatureVersion",
".",
"V2",
",",
"SigningAlgorithm",
".",
"HmacSHA256",
",",
"credentials",
")",
";",
"}"
] |
This signer will add "Signature" parameter to the request. Default
signature version is "2" and default signing algorithm is "HmacSHA256".
AWSAccessKeyId SignatureVersion SignatureMethod Timestamp Signature
@param request
request to be signed.
@param credentials
The credentials used to use to sign the request.
|
[
"This",
"signer",
"will",
"add",
"Signature",
"parameter",
"to",
"the",
"request",
".",
"Default",
"signature",
"version",
"is",
"2",
"and",
"default",
"signing",
"algorithm",
"is",
"HmacSHA256",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java#L48-L51
|
20,030
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java
|
QueryStringSigner.calculateStringToSignV1
|
private String calculateStringToSignV1(Map<String, List<String>> parameters) {
StringBuilder data = new StringBuilder();
SortedMap<String, List<String>> sorted =
new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
sorted.putAll(parameters);
for (Map.Entry<String, List<String>> entry : sorted.entrySet()) {
for (String value : entry.getValue()) {
data.append(entry.getKey())
.append(value);
}
}
return data.toString();
}
|
java
|
private String calculateStringToSignV1(Map<String, List<String>> parameters) {
StringBuilder data = new StringBuilder();
SortedMap<String, List<String>> sorted =
new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
sorted.putAll(parameters);
for (Map.Entry<String, List<String>> entry : sorted.entrySet()) {
for (String value : entry.getValue()) {
data.append(entry.getKey())
.append(value);
}
}
return data.toString();
}
|
[
"private",
"String",
"calculateStringToSignV1",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"parameters",
")",
"{",
"StringBuilder",
"data",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"SortedMap",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"sorted",
"=",
"new",
"TreeMap",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"(",
"String",
".",
"CASE_INSENSITIVE_ORDER",
")",
";",
"sorted",
".",
"putAll",
"(",
"parameters",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"entry",
":",
"sorted",
".",
"entrySet",
"(",
")",
")",
"{",
"for",
"(",
"String",
"value",
":",
"entry",
".",
"getValue",
"(",
")",
")",
"{",
"data",
".",
"append",
"(",
"entry",
".",
"getKey",
"(",
")",
")",
".",
"append",
"(",
"value",
")",
";",
"}",
"}",
"return",
"data",
".",
"toString",
"(",
")",
";",
"}"
] |
Calculates string to sign for signature version 1.
@param parameters
request parameters
@return String to sign
|
[
"Calculates",
"string",
"to",
"sign",
"for",
"signature",
"version",
"1",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java#L109-L123
|
20,031
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java
|
QueryStringSigner.calculateStringToSignV2
|
private String calculateStringToSignV2(SignableRequest<?> request) throws SdkClientException {
URI endpoint = request.getEndpoint();
StringBuilder data = new StringBuilder();
data.append("POST")
.append("\n")
.append(getCanonicalizedEndpoint(endpoint))
.append("\n")
.append(getCanonicalizedResourcePath(request))
.append("\n")
.append(getCanonicalizedQueryString(request.getParameters()));
return data.toString();
}
|
java
|
private String calculateStringToSignV2(SignableRequest<?> request) throws SdkClientException {
URI endpoint = request.getEndpoint();
StringBuilder data = new StringBuilder();
data.append("POST")
.append("\n")
.append(getCanonicalizedEndpoint(endpoint))
.append("\n")
.append(getCanonicalizedResourcePath(request))
.append("\n")
.append(getCanonicalizedQueryString(request.getParameters()));
return data.toString();
}
|
[
"private",
"String",
"calculateStringToSignV2",
"(",
"SignableRequest",
"<",
"?",
">",
"request",
")",
"throws",
"SdkClientException",
"{",
"URI",
"endpoint",
"=",
"request",
".",
"getEndpoint",
"(",
")",
";",
"StringBuilder",
"data",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"data",
".",
"append",
"(",
"\"POST\"",
")",
".",
"append",
"(",
"\"\\n\"",
")",
".",
"append",
"(",
"getCanonicalizedEndpoint",
"(",
"endpoint",
")",
")",
".",
"append",
"(",
"\"\\n\"",
")",
".",
"append",
"(",
"getCanonicalizedResourcePath",
"(",
"request",
")",
")",
".",
"append",
"(",
"\"\\n\"",
")",
".",
"append",
"(",
"getCanonicalizedQueryString",
"(",
"request",
".",
"getParameters",
"(",
")",
")",
")",
";",
"return",
"data",
".",
"toString",
"(",
")",
";",
"}"
] |
Calculate string to sign for signature version 2.
@param request
The request being signed.
@return String to sign
@throws SdkClientException
If the string to sign cannot be calculated.
|
[
"Calculate",
"string",
"to",
"sign",
"for",
"signature",
"version",
"2",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java#L136-L148
|
20,032
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java
|
QueryStringSigner.getFormattedTimestamp
|
private String getFormattedTimestamp(int offset) {
SimpleDateFormat df = new SimpleDateFormat(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
if (overriddenDate != null) {
return df.format(overriddenDate);
} else {
return df.format(getSignatureDate(offset));
}
}
|
java
|
private String getFormattedTimestamp(int offset) {
SimpleDateFormat df = new SimpleDateFormat(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
if (overriddenDate != null) {
return df.format(overriddenDate);
} else {
return df.format(getSignatureDate(offset));
}
}
|
[
"private",
"String",
"getFormattedTimestamp",
"(",
"int",
"offset",
")",
"{",
"SimpleDateFormat",
"df",
"=",
"new",
"SimpleDateFormat",
"(",
"\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"",
")",
";",
"df",
".",
"setTimeZone",
"(",
"TimeZone",
".",
"getTimeZone",
"(",
"\"UTC\"",
")",
")",
";",
"if",
"(",
"overriddenDate",
"!=",
"null",
")",
"{",
"return",
"df",
".",
"format",
"(",
"overriddenDate",
")",
";",
"}",
"else",
"{",
"return",
"df",
".",
"format",
"(",
"getSignatureDate",
"(",
"offset",
")",
")",
";",
"}",
"}"
] |
Formats date as ISO 8601 timestamp
|
[
"Formats",
"date",
"as",
"ISO",
"8601",
"timestamp"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java#L183-L193
|
20,033
|
aws/aws-sdk-java
|
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/ListBrokersResult.java
|
ListBrokersResult.setBrokerSummaries
|
public void setBrokerSummaries(java.util.Collection<BrokerSummary> brokerSummaries) {
if (brokerSummaries == null) {
this.brokerSummaries = null;
return;
}
this.brokerSummaries = new java.util.ArrayList<BrokerSummary>(brokerSummaries);
}
|
java
|
public void setBrokerSummaries(java.util.Collection<BrokerSummary> brokerSummaries) {
if (brokerSummaries == null) {
this.brokerSummaries = null;
return;
}
this.brokerSummaries = new java.util.ArrayList<BrokerSummary>(brokerSummaries);
}
|
[
"public",
"void",
"setBrokerSummaries",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"BrokerSummary",
">",
"brokerSummaries",
")",
"{",
"if",
"(",
"brokerSummaries",
"==",
"null",
")",
"{",
"this",
".",
"brokerSummaries",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"brokerSummaries",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"BrokerSummary",
">",
"(",
"brokerSummaries",
")",
";",
"}"
] |
A list of information about all brokers.
@param brokerSummaries
A list of information about all brokers.
|
[
"A",
"list",
"of",
"information",
"about",
"all",
"brokers",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/ListBrokersResult.java#L51-L58
|
20,034
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/ContentCryptoScheme.java
|
ContentCryptoScheme.newCipherLite
|
protected CipherLite newCipherLite(Cipher cipher, SecretKey cek, int cipherMode) {
return new CipherLite(cipher, this, cek, cipherMode);
}
|
java
|
protected CipherLite newCipherLite(Cipher cipher, SecretKey cek, int cipherMode) {
return new CipherLite(cipher, this, cek, cipherMode);
}
|
[
"protected",
"CipherLite",
"newCipherLite",
"(",
"Cipher",
"cipher",
",",
"SecretKey",
"cek",
",",
"int",
"cipherMode",
")",
"{",
"return",
"new",
"CipherLite",
"(",
"cipher",
",",
"this",
",",
"cek",
",",
"cipherMode",
")",
";",
"}"
] |
This is a factory method intended to be overridden by sublcasses to
return the appropriate instance of cipher lite.
|
[
"This",
"is",
"a",
"factory",
"method",
"intended",
"to",
"be",
"overridden",
"by",
"sublcasses",
"to",
"return",
"the",
"appropriate",
"instance",
"of",
"cipher",
"lite",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/ContentCryptoScheme.java#L233-L235
|
20,035
|
aws/aws-sdk-java
|
aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/AbstractAWSCloudHSMAsync.java
|
AbstractAWSCloudHSMAsync.describeHsmAsync
|
@Override
public java.util.concurrent.Future<DescribeHsmResult> describeHsmAsync(
com.amazonaws.handlers.AsyncHandler<DescribeHsmRequest, DescribeHsmResult> asyncHandler) {
return describeHsmAsync(new DescribeHsmRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeHsmResult> describeHsmAsync(
com.amazonaws.handlers.AsyncHandler<DescribeHsmRequest, DescribeHsmResult> asyncHandler) {
return describeHsmAsync(new DescribeHsmRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeHsmResult",
">",
"describeHsmAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeHsmRequest",
",",
"DescribeHsmResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeHsmAsync",
"(",
"new",
"DescribeHsmRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeHsm operation with an AsyncHandler.
@see #describeHsmAsync(DescribeHsmRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeHsm",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/AbstractAWSCloudHSMAsync.java#L163-L168
|
20,036
|
aws/aws-sdk-java
|
jmespath-java/src/main/java/com/amazonaws/jmespath/CamelCaseUtils.java
|
CamelCaseUtils.toCamelCase
|
public static String toCamelCase(String str) {
if (str == null || str.isEmpty()) {
return str;
}
StringBuilder stringBuilder = new StringBuilder();
boolean foundFirstLowercase = false;
for (char cur : str.toCharArray()) {
if (Character.isUpperCase(cur) && !foundFirstLowercase) {
stringBuilder.append(Character.toLowerCase(cur));
} else {
foundFirstLowercase = true;
stringBuilder.append(cur);
}
}
return stringBuilder.toString();
}
|
java
|
public static String toCamelCase(String str) {
if (str == null || str.isEmpty()) {
return str;
}
StringBuilder stringBuilder = new StringBuilder();
boolean foundFirstLowercase = false;
for (char cur : str.toCharArray()) {
if (Character.isUpperCase(cur) && !foundFirstLowercase) {
stringBuilder.append(Character.toLowerCase(cur));
} else {
foundFirstLowercase = true;
stringBuilder.append(cur);
}
}
return stringBuilder.toString();
}
|
[
"public",
"static",
"String",
"toCamelCase",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"==",
"null",
"||",
"str",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"str",
";",
"}",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"foundFirstLowercase",
"=",
"false",
";",
"for",
"(",
"char",
"cur",
":",
"str",
".",
"toCharArray",
"(",
")",
")",
"{",
"if",
"(",
"Character",
".",
"isUpperCase",
"(",
"cur",
")",
"&&",
"!",
"foundFirstLowercase",
")",
"{",
"stringBuilder",
".",
"append",
"(",
"Character",
".",
"toLowerCase",
"(",
"cur",
")",
")",
";",
"}",
"else",
"{",
"foundFirstLowercase",
"=",
"true",
";",
"stringBuilder",
".",
"append",
"(",
"cur",
")",
";",
"}",
"}",
"return",
"stringBuilder",
".",
"toString",
"(",
")",
";",
"}"
] |
This matches the algorithm that Jackson uses to convert getter names to JSON field names. Any names starting with a
lowercase character are left as is, any names starting with one or more uppercase characters have all consecutive
uppercase characters converted to lowercase. See tests for examples.
@see <a href="https://github.com/FasterXML/jackson-databind/blob/4debd67e053a254b5f42294426340fc91a312f64/src/main/java/com/fasterxml/jackson/databind/util/BeanUtil.java#L233">BeanUtil.java</a>
|
[
"This",
"matches",
"the",
"algorithm",
"that",
"Jackson",
"uses",
"to",
"convert",
"getter",
"names",
"to",
"JSON",
"field",
"names",
".",
"Any",
"names",
"starting",
"with",
"a",
"lowercase",
"character",
"are",
"left",
"as",
"is",
"any",
"names",
"starting",
"with",
"one",
"or",
"more",
"uppercase",
"characters",
"have",
"all",
"consecutive",
"uppercase",
"characters",
"converted",
"to",
"lowercase",
".",
"See",
"tests",
"for",
"examples",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/CamelCaseUtils.java#L31-L46
|
20,037
|
aws/aws-sdk-java
|
aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/AbstractAmazonCloudSearchAsync.java
|
AbstractAmazonCloudSearchAsync.describeDomainsAsync
|
@Override
public java.util.concurrent.Future<DescribeDomainsResult> describeDomainsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDomainsRequest, DescribeDomainsResult> asyncHandler) {
return describeDomainsAsync(new DescribeDomainsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeDomainsResult> describeDomainsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeDomainsRequest, DescribeDomainsResult> asyncHandler) {
return describeDomainsAsync(new DescribeDomainsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeDomainsResult",
">",
"describeDomainsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeDomainsRequest",
",",
"DescribeDomainsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeDomainsAsync",
"(",
"new",
"DescribeDomainsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeDomains operation with an AsyncHandler.
@see #describeDomainsAsync(DescribeDomainsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeDomains",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/AbstractAmazonCloudSearchAsync.java#L228-L233
|
20,038
|
aws/aws-sdk-java
|
aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/AbstractAmazonCloudSearchAsync.java
|
AbstractAmazonCloudSearchAsync.listDomainNamesAsync
|
@Override
public java.util.concurrent.Future<ListDomainNamesResult> listDomainNamesAsync(
com.amazonaws.handlers.AsyncHandler<ListDomainNamesRequest, ListDomainNamesResult> asyncHandler) {
return listDomainNamesAsync(new ListDomainNamesRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<ListDomainNamesResult> listDomainNamesAsync(
com.amazonaws.handlers.AsyncHandler<ListDomainNamesRequest, ListDomainNamesResult> asyncHandler) {
return listDomainNamesAsync(new ListDomainNamesRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"ListDomainNamesResult",
">",
"listDomainNamesAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"ListDomainNamesRequest",
",",
"ListDomainNamesResult",
">",
"asyncHandler",
")",
"{",
"return",
"listDomainNamesAsync",
"(",
"new",
"ListDomainNamesRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the ListDomainNames operation with an AsyncHandler.
@see #listDomainNamesAsync(ListDomainNamesRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ListDomainNames",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/AbstractAmazonCloudSearchAsync.java#L342-L347
|
20,039
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/CollectionUtils.java
|
CollectionUtils.mergeLists
|
public static <T> List<T> mergeLists(List<T> list1, List<T> list2) {
List<T> merged = new LinkedList<T>();
if (list1 != null) {
merged.addAll(list1);
}
if (list2 != null) {
merged.addAll(list2);
}
return merged;
}
|
java
|
public static <T> List<T> mergeLists(List<T> list1, List<T> list2) {
List<T> merged = new LinkedList<T>();
if (list1 != null) {
merged.addAll(list1);
}
if (list2 != null) {
merged.addAll(list2);
}
return merged;
}
|
[
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"mergeLists",
"(",
"List",
"<",
"T",
">",
"list1",
",",
"List",
"<",
"T",
">",
"list2",
")",
"{",
"List",
"<",
"T",
">",
"merged",
"=",
"new",
"LinkedList",
"<",
"T",
">",
"(",
")",
";",
"if",
"(",
"list1",
"!=",
"null",
")",
"{",
"merged",
".",
"addAll",
"(",
"list1",
")",
";",
"}",
"if",
"(",
"list2",
"!=",
"null",
")",
"{",
"merged",
".",
"addAll",
"(",
"list2",
")",
";",
"}",
"return",
"merged",
";",
"}"
] |
Returns a new list containing the second list appended to the first list.
|
[
"Returns",
"a",
"new",
"list",
"containing",
"the",
"second",
"list",
"appended",
"to",
"the",
"first",
"list",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/CollectionUtils.java#L30-L39
|
20,040
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/util/CollectionUtils.java
|
CollectionUtils.join
|
public static String join(Collection<String> toJoin, String separator) {
if (isNullOrEmpty(toJoin)) {
return "";
}
StringBuilder joinedString = new StringBuilder();
int currentIndex = 0;
for (String s : toJoin) {
if(s != null) {
joinedString.append(s);
}
if (currentIndex++ != toJoin.size() - 1) {
joinedString.append(separator);
}
}
return joinedString.toString();
}
|
java
|
public static String join(Collection<String> toJoin, String separator) {
if (isNullOrEmpty(toJoin)) {
return "";
}
StringBuilder joinedString = new StringBuilder();
int currentIndex = 0;
for (String s : toJoin) {
if(s != null) {
joinedString.append(s);
}
if (currentIndex++ != toJoin.size() - 1) {
joinedString.append(separator);
}
}
return joinedString.toString();
}
|
[
"public",
"static",
"String",
"join",
"(",
"Collection",
"<",
"String",
">",
"toJoin",
",",
"String",
"separator",
")",
"{",
"if",
"(",
"isNullOrEmpty",
"(",
"toJoin",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuilder",
"joinedString",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"currentIndex",
"=",
"0",
";",
"for",
"(",
"String",
"s",
":",
"toJoin",
")",
"{",
"if",
"(",
"s",
"!=",
"null",
")",
"{",
"joinedString",
".",
"append",
"(",
"s",
")",
";",
"}",
"if",
"(",
"currentIndex",
"++",
"!=",
"toJoin",
".",
"size",
"(",
")",
"-",
"1",
")",
"{",
"joinedString",
".",
"append",
"(",
"separator",
")",
";",
"}",
"}",
"return",
"joinedString",
".",
"toString",
"(",
")",
";",
"}"
] |
Joins a collection of strings with the given separator into a single string.
@param toJoin Collection containing items to join.
@param separator String to join items with.
@return Empty string if collection is null or empty. Otherwise joins all strings in the collection with the separator.
|
[
"Joins",
"a",
"collection",
"of",
"strings",
"with",
"the",
"given",
"separator",
"into",
"a",
"single",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/CollectionUtils.java#L48-L64
|
20,041
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/ExamplesCustomizer.java
|
ExamplesCustomizer.applyCustomizationsToShapeJson
|
private JsonNode applyCustomizationsToShapeJson(String shapeName, Shape shape, JsonNode valueNode) {
// Don't bother going any further if we're not dealing with an array or
// object JSON node; there's not much we can do to "massage" this value
if (valueNode == null || !valueNode.isContainerNode()) {
return valueNode;
}
// Apply modifications first
valueNode = applyModificationsToShapeJson(shapeName, valueNode);
ShapeSubstitution shapeSub = null;
if (customizationConfig.getShapeSubstitutions() != null) {
shapeSub = customizationConfig.getShapeSubstitutions().get(shapeName);
}
if (shapeSub != null) {
String substituteShapeName = shapeSub.getEmitAsShape();
Shape substituteShape = serviceModel.getShape(substituteShapeName);
JsonNode substituteValue = valueNode;
if (shapeSub.getEmitFromMember() != null) {
substituteValue = valueNode.get(shapeSub.getEmitFromMember());
if (substituteValue == null) {
System.err.println(String.format("Warning: Substituting shape '%s' for its"
+ " member '%s' as shape '%s' produced null value. Original"
+ " value: %s", shapeName, shapeSub.getEmitFromMember(),
substituteShapeName, valueNode.toString()));
}
}
System.out.println(String.format("Substituting shape %s with %s. %s -> %s", shapeName,
substituteShapeName, valueNode.toString(), Objects.toString(substituteValue)));
return applyCustomizationsToShapeJson(substituteShapeName, substituteShape, substituteValue);
} else {
switch (shape.getType()) {
// Apply customizations to each member
case "map":
case "structure": {
if (shape.getMembers() == null) {
return valueNode;
}
ObjectNode obj = MAPPER.createObjectNode();
for (Map.Entry<String, Member> e : shape.getMembers().entrySet()) {
Member member = e.getValue();
String memberName = e.getKey();
String memberShapeName = member.getShape();
Shape memberShape = serviceModel.getShape(memberShapeName);
JsonNode memberValue = valueNode.get(memberName);
// Only set if it's not null, otherwise the generated
// sample code could potentially have lots of
// unnecessary 'withProperty(null)' calls.
if (memberValue != null) {
obj.set(memberName, applyCustomizationsToShapeJson(memberShapeName,
memberShape, memberValue));
}
}
return obj;
}
// Apply customizations to each element
case "list": {
ArrayNode list = MAPPER.createArrayNode();
String memberShapeName = shape.getListMember().getShape();
Shape memberShape = serviceModel.getShape(memberShapeName);
for (JsonNode e : valueNode) {
// apply any customizations to the list elements
list.add(applyCustomizationsToShapeJson(memberShapeName, memberShape, e));
}
return list;
}
default:
throw new RuntimeException("Unknown shape type: " + shape.getType());
}
}
}
|
java
|
private JsonNode applyCustomizationsToShapeJson(String shapeName, Shape shape, JsonNode valueNode) {
// Don't bother going any further if we're not dealing with an array or
// object JSON node; there's not much we can do to "massage" this value
if (valueNode == null || !valueNode.isContainerNode()) {
return valueNode;
}
// Apply modifications first
valueNode = applyModificationsToShapeJson(shapeName, valueNode);
ShapeSubstitution shapeSub = null;
if (customizationConfig.getShapeSubstitutions() != null) {
shapeSub = customizationConfig.getShapeSubstitutions().get(shapeName);
}
if (shapeSub != null) {
String substituteShapeName = shapeSub.getEmitAsShape();
Shape substituteShape = serviceModel.getShape(substituteShapeName);
JsonNode substituteValue = valueNode;
if (shapeSub.getEmitFromMember() != null) {
substituteValue = valueNode.get(shapeSub.getEmitFromMember());
if (substituteValue == null) {
System.err.println(String.format("Warning: Substituting shape '%s' for its"
+ " member '%s' as shape '%s' produced null value. Original"
+ " value: %s", shapeName, shapeSub.getEmitFromMember(),
substituteShapeName, valueNode.toString()));
}
}
System.out.println(String.format("Substituting shape %s with %s. %s -> %s", shapeName,
substituteShapeName, valueNode.toString(), Objects.toString(substituteValue)));
return applyCustomizationsToShapeJson(substituteShapeName, substituteShape, substituteValue);
} else {
switch (shape.getType()) {
// Apply customizations to each member
case "map":
case "structure": {
if (shape.getMembers() == null) {
return valueNode;
}
ObjectNode obj = MAPPER.createObjectNode();
for (Map.Entry<String, Member> e : shape.getMembers().entrySet()) {
Member member = e.getValue();
String memberName = e.getKey();
String memberShapeName = member.getShape();
Shape memberShape = serviceModel.getShape(memberShapeName);
JsonNode memberValue = valueNode.get(memberName);
// Only set if it's not null, otherwise the generated
// sample code could potentially have lots of
// unnecessary 'withProperty(null)' calls.
if (memberValue != null) {
obj.set(memberName, applyCustomizationsToShapeJson(memberShapeName,
memberShape, memberValue));
}
}
return obj;
}
// Apply customizations to each element
case "list": {
ArrayNode list = MAPPER.createArrayNode();
String memberShapeName = shape.getListMember().getShape();
Shape memberShape = serviceModel.getShape(memberShapeName);
for (JsonNode e : valueNode) {
// apply any customizations to the list elements
list.add(applyCustomizationsToShapeJson(memberShapeName, memberShape, e));
}
return list;
}
default:
throw new RuntimeException("Unknown shape type: " + shape.getType());
}
}
}
|
[
"private",
"JsonNode",
"applyCustomizationsToShapeJson",
"(",
"String",
"shapeName",
",",
"Shape",
"shape",
",",
"JsonNode",
"valueNode",
")",
"{",
"// Don't bother going any further if we're not dealing with an array or",
"// object JSON node; there's not much we can do to \"massage\" this value",
"if",
"(",
"valueNode",
"==",
"null",
"||",
"!",
"valueNode",
".",
"isContainerNode",
"(",
")",
")",
"{",
"return",
"valueNode",
";",
"}",
"// Apply modifications first",
"valueNode",
"=",
"applyModificationsToShapeJson",
"(",
"shapeName",
",",
"valueNode",
")",
";",
"ShapeSubstitution",
"shapeSub",
"=",
"null",
";",
"if",
"(",
"customizationConfig",
".",
"getShapeSubstitutions",
"(",
")",
"!=",
"null",
")",
"{",
"shapeSub",
"=",
"customizationConfig",
".",
"getShapeSubstitutions",
"(",
")",
".",
"get",
"(",
"shapeName",
")",
";",
"}",
"if",
"(",
"shapeSub",
"!=",
"null",
")",
"{",
"String",
"substituteShapeName",
"=",
"shapeSub",
".",
"getEmitAsShape",
"(",
")",
";",
"Shape",
"substituteShape",
"=",
"serviceModel",
".",
"getShape",
"(",
"substituteShapeName",
")",
";",
"JsonNode",
"substituteValue",
"=",
"valueNode",
";",
"if",
"(",
"shapeSub",
".",
"getEmitFromMember",
"(",
")",
"!=",
"null",
")",
"{",
"substituteValue",
"=",
"valueNode",
".",
"get",
"(",
"shapeSub",
".",
"getEmitFromMember",
"(",
")",
")",
";",
"if",
"(",
"substituteValue",
"==",
"null",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"String",
".",
"format",
"(",
"\"Warning: Substituting shape '%s' for its\"",
"+",
"\" member '%s' as shape '%s' produced null value. Original\"",
"+",
"\" value: %s\"",
",",
"shapeName",
",",
"shapeSub",
".",
"getEmitFromMember",
"(",
")",
",",
"substituteShapeName",
",",
"valueNode",
".",
"toString",
"(",
")",
")",
")",
";",
"}",
"}",
"System",
".",
"out",
".",
"println",
"(",
"String",
".",
"format",
"(",
"\"Substituting shape %s with %s. %s -> %s\"",
",",
"shapeName",
",",
"substituteShapeName",
",",
"valueNode",
".",
"toString",
"(",
")",
",",
"Objects",
".",
"toString",
"(",
"substituteValue",
")",
")",
")",
";",
"return",
"applyCustomizationsToShapeJson",
"(",
"substituteShapeName",
",",
"substituteShape",
",",
"substituteValue",
")",
";",
"}",
"else",
"{",
"switch",
"(",
"shape",
".",
"getType",
"(",
")",
")",
"{",
"// Apply customizations to each member",
"case",
"\"map\"",
":",
"case",
"\"structure\"",
":",
"{",
"if",
"(",
"shape",
".",
"getMembers",
"(",
")",
"==",
"null",
")",
"{",
"return",
"valueNode",
";",
"}",
"ObjectNode",
"obj",
"=",
"MAPPER",
".",
"createObjectNode",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Member",
">",
"e",
":",
"shape",
".",
"getMembers",
"(",
")",
".",
"entrySet",
"(",
")",
")",
"{",
"Member",
"member",
"=",
"e",
".",
"getValue",
"(",
")",
";",
"String",
"memberName",
"=",
"e",
".",
"getKey",
"(",
")",
";",
"String",
"memberShapeName",
"=",
"member",
".",
"getShape",
"(",
")",
";",
"Shape",
"memberShape",
"=",
"serviceModel",
".",
"getShape",
"(",
"memberShapeName",
")",
";",
"JsonNode",
"memberValue",
"=",
"valueNode",
".",
"get",
"(",
"memberName",
")",
";",
"// Only set if it's not null, otherwise the generated",
"// sample code could potentially have lots of",
"// unnecessary 'withProperty(null)' calls.",
"if",
"(",
"memberValue",
"!=",
"null",
")",
"{",
"obj",
".",
"set",
"(",
"memberName",
",",
"applyCustomizationsToShapeJson",
"(",
"memberShapeName",
",",
"memberShape",
",",
"memberValue",
")",
")",
";",
"}",
"}",
"return",
"obj",
";",
"}",
"// Apply customizations to each element",
"case",
"\"list\"",
":",
"{",
"ArrayNode",
"list",
"=",
"MAPPER",
".",
"createArrayNode",
"(",
")",
";",
"String",
"memberShapeName",
"=",
"shape",
".",
"getListMember",
"(",
")",
".",
"getShape",
"(",
")",
";",
"Shape",
"memberShape",
"=",
"serviceModel",
".",
"getShape",
"(",
"memberShapeName",
")",
";",
"for",
"(",
"JsonNode",
"e",
":",
"valueNode",
")",
"{",
"// apply any customizations to the list elements",
"list",
".",
"add",
"(",
"applyCustomizationsToShapeJson",
"(",
"memberShapeName",
",",
"memberShape",
",",
"e",
")",
")",
";",
"}",
"return",
"list",
";",
"}",
"default",
":",
"throw",
"new",
"RuntimeException",
"(",
"\"Unknown shape type: \"",
"+",
"shape",
".",
"getType",
"(",
")",
")",
";",
"}",
"}",
"}"
] |
Recursively apply any declared customizations to this JSON value
according to the given shape and the customizations declared for the
shape.
@param shapeName The name of the shape.
@param shape The shape of the JSON value.
@param valueNode The JSON value to customize.
@return The customized JSON value.
|
[
"Recursively",
"apply",
"any",
"declared",
"customizations",
"to",
"this",
"JSON",
"value",
"according",
"to",
"the",
"given",
"shape",
"and",
"the",
"customizations",
"declared",
"for",
"the",
"shape",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/ExamplesCustomizer.java#L110-L190
|
20,042
|
aws/aws-sdk-java
|
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/ExamplesCustomizer.java
|
ExamplesCustomizer.applyShapeModifier
|
private JsonNode applyShapeModifier(JsonNode node, ShapeModifier modifier) {
if (node == null || modifier == null) {
return node;
}
if (modifier.getExclude() == null && modifier.getModify() == null) {
return node;
}
if (!node.isObject()) return node;
final ObjectNode obj = (ObjectNode) node;
ObjectNode modified = MAPPER.createObjectNode();
// Filter any excluded members
final List<String> excludes = modifier.getExclude() != null ? modifier.getExclude() : Collections.emptyList();
obj.fieldNames().forEachRemaining(m -> {
if (!excludes.contains(m)) {
modified.set(m, obj.get(m));
}
});
// Apply property renames
final List<Map<String, ShapeModifier_ModifyModel>> modify = modifier.getModify() != null ? modifier.getModify() : Collections.emptyList();
modify.forEach(memberMods ->
memberMods.entrySet().forEach(memberMod -> {
String memberName = memberMod.getKey();
ShapeModifier_ModifyModel modelModify = memberMod.getValue();
if (modelModify.getEmitPropertyName() != null) {
String newName = modelModify.getEmitPropertyName();
modified.set(newName, modified.get(memberName));
modified.remove(memberName);
memberName = newName;
}
})
);
return modified;
}
|
java
|
private JsonNode applyShapeModifier(JsonNode node, ShapeModifier modifier) {
if (node == null || modifier == null) {
return node;
}
if (modifier.getExclude() == null && modifier.getModify() == null) {
return node;
}
if (!node.isObject()) return node;
final ObjectNode obj = (ObjectNode) node;
ObjectNode modified = MAPPER.createObjectNode();
// Filter any excluded members
final List<String> excludes = modifier.getExclude() != null ? modifier.getExclude() : Collections.emptyList();
obj.fieldNames().forEachRemaining(m -> {
if (!excludes.contains(m)) {
modified.set(m, obj.get(m));
}
});
// Apply property renames
final List<Map<String, ShapeModifier_ModifyModel>> modify = modifier.getModify() != null ? modifier.getModify() : Collections.emptyList();
modify.forEach(memberMods ->
memberMods.entrySet().forEach(memberMod -> {
String memberName = memberMod.getKey();
ShapeModifier_ModifyModel modelModify = memberMod.getValue();
if (modelModify.getEmitPropertyName() != null) {
String newName = modelModify.getEmitPropertyName();
modified.set(newName, modified.get(memberName));
modified.remove(memberName);
memberName = newName;
}
})
);
return modified;
}
|
[
"private",
"JsonNode",
"applyShapeModifier",
"(",
"JsonNode",
"node",
",",
"ShapeModifier",
"modifier",
")",
"{",
"if",
"(",
"node",
"==",
"null",
"||",
"modifier",
"==",
"null",
")",
"{",
"return",
"node",
";",
"}",
"if",
"(",
"modifier",
".",
"getExclude",
"(",
")",
"==",
"null",
"&&",
"modifier",
".",
"getModify",
"(",
")",
"==",
"null",
")",
"{",
"return",
"node",
";",
"}",
"if",
"(",
"!",
"node",
".",
"isObject",
"(",
")",
")",
"return",
"node",
";",
"final",
"ObjectNode",
"obj",
"=",
"(",
"ObjectNode",
")",
"node",
";",
"ObjectNode",
"modified",
"=",
"MAPPER",
".",
"createObjectNode",
"(",
")",
";",
"// Filter any excluded members",
"final",
"List",
"<",
"String",
">",
"excludes",
"=",
"modifier",
".",
"getExclude",
"(",
")",
"!=",
"null",
"?",
"modifier",
".",
"getExclude",
"(",
")",
":",
"Collections",
".",
"emptyList",
"(",
")",
";",
"obj",
".",
"fieldNames",
"(",
")",
".",
"forEachRemaining",
"(",
"m",
"->",
"{",
"if",
"(",
"!",
"excludes",
".",
"contains",
"(",
"m",
")",
")",
"{",
"modified",
".",
"set",
"(",
"m",
",",
"obj",
".",
"get",
"(",
"m",
")",
")",
";",
"}",
"}",
")",
";",
"// Apply property renames",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"ShapeModifier_ModifyModel",
">",
">",
"modify",
"=",
"modifier",
".",
"getModify",
"(",
")",
"!=",
"null",
"?",
"modifier",
".",
"getModify",
"(",
")",
":",
"Collections",
".",
"emptyList",
"(",
")",
";",
"modify",
".",
"forEach",
"(",
"memberMods",
"->",
"memberMods",
".",
"entrySet",
"(",
")",
".",
"forEach",
"(",
"memberMod",
"->",
"{",
"String",
"memberName",
"=",
"memberMod",
".",
"getKey",
"(",
")",
";",
"ShapeModifier_ModifyModel",
"modelModify",
"=",
"memberMod",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"modelModify",
".",
"getEmitPropertyName",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"newName",
"=",
"modelModify",
".",
"getEmitPropertyName",
"(",
")",
";",
"modified",
".",
"set",
"(",
"newName",
",",
"modified",
".",
"get",
"(",
"memberName",
")",
")",
";",
"modified",
".",
"remove",
"(",
"memberName",
")",
";",
"memberName",
"=",
"newName",
";",
"}",
"}",
")",
")",
";",
"return",
"modified",
";",
"}"
] |
Apply any shape modifiers to the JSON value. This only takes care of
'exclude' and 'emitPropertyName'.
@param node The JSON node.
@param modifier The shape modifier.
@return The modified node.
|
[
"Apply",
"any",
"shape",
"modifiers",
"to",
"the",
"JSON",
"value",
".",
"This",
"only",
"takes",
"care",
"of",
"exclude",
"and",
"emitPropertyName",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/ExamplesCustomizer.java#L212-L249
|
20,043
|
aws/aws-sdk-java
|
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSSessionCredentials.java
|
STSSessionCredentials.getImmutableCredentials
|
public synchronized AWSSessionCredentials getImmutableCredentials() {
Credentials creds = getSessionCredentials();
return new BasicSessionCredentials(creds.getAccessKeyId(), creds.getSecretAccessKey(), creds.getSessionToken());
}
|
java
|
public synchronized AWSSessionCredentials getImmutableCredentials() {
Credentials creds = getSessionCredentials();
return new BasicSessionCredentials(creds.getAccessKeyId(), creds.getSecretAccessKey(), creds.getSessionToken());
}
|
[
"public",
"synchronized",
"AWSSessionCredentials",
"getImmutableCredentials",
"(",
")",
"{",
"Credentials",
"creds",
"=",
"getSessionCredentials",
"(",
")",
";",
"return",
"new",
"BasicSessionCredentials",
"(",
"creds",
".",
"getAccessKeyId",
"(",
")",
",",
"creds",
".",
"getSecretAccessKey",
"(",
")",
",",
"creds",
".",
"getSessionToken",
"(",
")",
")",
";",
"}"
] |
Returns immutable session credentials for this session, beginning a new one if necessary.
|
[
"Returns",
"immutable",
"session",
"credentials",
"for",
"this",
"session",
"beginning",
"a",
"new",
"one",
"if",
"necessary",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSSessionCredentials.java#L138-L141
|
20,044
|
aws/aws-sdk-java
|
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSSessionCredentials.java
|
STSSessionCredentials.refreshCredentials
|
@Override
public synchronized void refreshCredentials() {
GetSessionTokenResult sessionTokenResult = securityTokenService
.getSessionToken(new GetSessionTokenRequest().withDurationSeconds(sessionDurationSeconds));
sessionCredentials = sessionTokenResult.getCredentials();
}
|
java
|
@Override
public synchronized void refreshCredentials() {
GetSessionTokenResult sessionTokenResult = securityTokenService
.getSessionToken(new GetSessionTokenRequest().withDurationSeconds(sessionDurationSeconds));
sessionCredentials = sessionTokenResult.getCredentials();
}
|
[
"@",
"Override",
"public",
"synchronized",
"void",
"refreshCredentials",
"(",
")",
"{",
"GetSessionTokenResult",
"sessionTokenResult",
"=",
"securityTokenService",
".",
"getSessionToken",
"(",
"new",
"GetSessionTokenRequest",
"(",
")",
".",
"withDurationSeconds",
"(",
"sessionDurationSeconds",
")",
")",
";",
"sessionCredentials",
"=",
"sessionTokenResult",
".",
"getCredentials",
"(",
")",
";",
"}"
] |
Refreshes the session credentials from STS.
|
[
"Refreshes",
"the",
"session",
"credentials",
"from",
"STS",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSSessionCredentials.java#L146-L151
|
20,045
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.batchLoad
|
public List<T> batchLoad(Iterable<T> itemsToGet) {
final Map<String,List<Object>> results = mapper.batchLoad(itemsToGet);
if (results.isEmpty()) {
return Collections.<T>emptyList();
}
return (List<T>)results.get(mapper.getTableName(model.targetType(), config));
}
|
java
|
public List<T> batchLoad(Iterable<T> itemsToGet) {
final Map<String,List<Object>> results = mapper.batchLoad(itemsToGet);
if (results.isEmpty()) {
return Collections.<T>emptyList();
}
return (List<T>)results.get(mapper.getTableName(model.targetType(), config));
}
|
[
"public",
"List",
"<",
"T",
">",
"batchLoad",
"(",
"Iterable",
"<",
"T",
">",
"itemsToGet",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"results",
"=",
"mapper",
".",
"batchLoad",
"(",
"itemsToGet",
")",
";",
"if",
"(",
"results",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"<",
"T",
">",
"emptyList",
"(",
")",
";",
"}",
"return",
"(",
"List",
"<",
"T",
">",
")",
"results",
".",
"get",
"(",
"mapper",
".",
"getTableName",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"config",
")",
")",
";",
"}"
] |
Retrieves multiple items from the table using their primary keys.
@param itemsToGet The items to get.
@return The list of objects.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#batchLoad
|
[
"Retrieves",
"multiple",
"items",
"from",
"the",
"table",
"using",
"their",
"primary",
"keys",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L199-L205
|
20,046
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.batchSave
|
public List<DynamoDBMapper.FailedBatch> batchSave(Iterable<T> objectsToSave) {
return mapper.batchWrite(objectsToSave, (Iterable<T>)Collections.<T>emptyList());
}
|
java
|
public List<DynamoDBMapper.FailedBatch> batchSave(Iterable<T> objectsToSave) {
return mapper.batchWrite(objectsToSave, (Iterable<T>)Collections.<T>emptyList());
}
|
[
"public",
"List",
"<",
"DynamoDBMapper",
".",
"FailedBatch",
">",
"batchSave",
"(",
"Iterable",
"<",
"T",
">",
"objectsToSave",
")",
"{",
"return",
"mapper",
".",
"batchWrite",
"(",
"objectsToSave",
",",
"(",
"Iterable",
"<",
"T",
">",
")",
"Collections",
".",
"<",
"T",
">",
"emptyList",
"(",
")",
")",
";",
"}"
] |
Saves the objects given using one or more calls to the batchWriteItem API.
@param objectsToSave The objects to save.
@return The list of failed batches.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#batchSave
|
[
"Saves",
"the",
"objects",
"given",
"using",
"one",
"or",
"more",
"calls",
"to",
"the",
"batchWriteItem",
"API",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L213-L215
|
20,047
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.batchDelete
|
public List<DynamoDBMapper.FailedBatch> batchDelete(Iterable<T> objectsToDelete) {
return mapper.batchWrite((Iterable<T>)Collections.<T>emptyList(), objectsToDelete);
}
|
java
|
public List<DynamoDBMapper.FailedBatch> batchDelete(Iterable<T> objectsToDelete) {
return mapper.batchWrite((Iterable<T>)Collections.<T>emptyList(), objectsToDelete);
}
|
[
"public",
"List",
"<",
"DynamoDBMapper",
".",
"FailedBatch",
">",
"batchDelete",
"(",
"Iterable",
"<",
"T",
">",
"objectsToDelete",
")",
"{",
"return",
"mapper",
".",
"batchWrite",
"(",
"(",
"Iterable",
"<",
"T",
">",
")",
"Collections",
".",
"<",
"T",
">",
"emptyList",
"(",
")",
",",
"objectsToDelete",
")",
";",
"}"
] |
Deletes the objects given using one or more calls to the batchWtiteItem API.
@param objectsToDelete The objects to delete.
@return The list of failed batches.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#batchDelete
|
[
"Deletes",
"the",
"objects",
"given",
"using",
"one",
"or",
"more",
"calls",
"to",
"the",
"batchWtiteItem",
"API",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L223-L225
|
20,048
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.batchWrite
|
public List<DynamoDBMapper.FailedBatch> batchWrite(Iterable<T> objectsToWrite, Iterable<T> objectsToDelete) {
return mapper.batchWrite(objectsToWrite, objectsToDelete);
}
|
java
|
public List<DynamoDBMapper.FailedBatch> batchWrite(Iterable<T> objectsToWrite, Iterable<T> objectsToDelete) {
return mapper.batchWrite(objectsToWrite, objectsToDelete);
}
|
[
"public",
"List",
"<",
"DynamoDBMapper",
".",
"FailedBatch",
">",
"batchWrite",
"(",
"Iterable",
"<",
"T",
">",
"objectsToWrite",
",",
"Iterable",
"<",
"T",
">",
"objectsToDelete",
")",
"{",
"return",
"mapper",
".",
"batchWrite",
"(",
"objectsToWrite",
",",
"objectsToDelete",
")",
";",
"}"
] |
Saves and deletes the objects given using one or more calls to the
batchWriteItem API.
@param objectsToWrite The objects to write.
@param objectsToDelete The objects to delete.
@return The list of failed batches.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#batchWrite
|
[
"Saves",
"and",
"deletes",
"the",
"objects",
"given",
"using",
"one",
"or",
"more",
"calls",
"to",
"the",
"batchWriteItem",
"API",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L235-L237
|
20,049
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.load
|
public T load(H hashKey) {
return mapper.<T>load(model.targetType(), hashKey);
}
|
java
|
public T load(H hashKey) {
return mapper.<T>load(model.targetType(), hashKey);
}
|
[
"public",
"T",
"load",
"(",
"H",
"hashKey",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"load",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"hashKey",
")",
";",
"}"
] |
Loads an object with the hash key given.
@param hashKey The hash key value.
@return The object.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load
|
[
"Loads",
"an",
"object",
"with",
"the",
"hash",
"key",
"given",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L277-L279
|
20,050
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.load
|
public T load(H hashKey, R rangeKey) {
return mapper.<T>load(model.targetType(), hashKey, rangeKey);
}
|
java
|
public T load(H hashKey, R rangeKey) {
return mapper.<T>load(model.targetType(), hashKey, rangeKey);
}
|
[
"public",
"T",
"load",
"(",
"H",
"hashKey",
",",
"R",
"rangeKey",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"load",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"hashKey",
",",
"rangeKey",
")",
";",
"}"
] |
Loads an object with the hash and range key.
@param hashKey The hash key value.
@param rangeKey The range key value.
@return The object.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load
|
[
"Loads",
"an",
"object",
"with",
"the",
"hash",
"and",
"range",
"key",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L288-L290
|
20,051
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.save
|
public void save(T object, DynamoDBSaveExpression saveExpression) {
mapper.<T>save(object, saveExpression);
}
|
java
|
public void save(T object, DynamoDBSaveExpression saveExpression) {
mapper.<T>save(object, saveExpression);
}
|
[
"public",
"void",
"save",
"(",
"T",
"object",
",",
"DynamoDBSaveExpression",
"saveExpression",
")",
"{",
"mapper",
".",
"<",
"T",
">",
"save",
"(",
"object",
",",
"saveExpression",
")",
";",
"}"
] |
Saves the object given into DynamoDB using the specified saveExpression.
@param object The object to save.
@param saveExpression The save expression.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#save
|
[
"Saves",
"the",
"object",
"given",
"into",
"DynamoDB",
"using",
"the",
"specified",
"saveExpression",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L307-L309
|
20,052
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.saveIfNotExists
|
public void saveIfNotExists(T object) throws ConditionalCheckFailedException {
final DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
saveExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(false));
}
mapper.<T>save(object, saveExpression);
}
|
java
|
public void saveIfNotExists(T object) throws ConditionalCheckFailedException {
final DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
saveExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(false));
}
mapper.<T>save(object, saveExpression);
}
|
[
"public",
"void",
"saveIfNotExists",
"(",
"T",
"object",
")",
"throws",
"ConditionalCheckFailedException",
"{",
"final",
"DynamoDBSaveExpression",
"saveExpression",
"=",
"new",
"DynamoDBSaveExpression",
"(",
")",
";",
"for",
"(",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"Object",
">",
"key",
":",
"model",
".",
"keys",
"(",
")",
")",
"{",
"saveExpression",
".",
"withExpectedEntry",
"(",
"key",
".",
"name",
"(",
")",
",",
"new",
"ExpectedAttributeValue",
"(",
")",
".",
"withExists",
"(",
"false",
")",
")",
";",
"}",
"mapper",
".",
"<",
"T",
">",
"save",
"(",
"object",
",",
"saveExpression",
")",
";",
"}"
] |
Saves the object given into DynamoDB with the condition that the hash
and if applicable, the range key, does not already exist.
@param object The object to create.
@throws ConditionalCheckFailedException If the object exists.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#save
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBSaveExpression
@see com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue
|
[
"Saves",
"the",
"object",
"given",
"into",
"DynamoDB",
"with",
"the",
"condition",
"that",
"the",
"hash",
"and",
"if",
"applicable",
"the",
"range",
"key",
"does",
"not",
"already",
"exist",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L320-L327
|
20,053
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.saveIfExists
|
public void saveIfExists(T object) throws ConditionalCheckFailedException {
final DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
saveExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(true).withValue(key.convert(key.get(object))));
}
mapper.<T>save(object, saveExpression);
}
|
java
|
public void saveIfExists(T object) throws ConditionalCheckFailedException {
final DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
saveExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(true).withValue(key.convert(key.get(object))));
}
mapper.<T>save(object, saveExpression);
}
|
[
"public",
"void",
"saveIfExists",
"(",
"T",
"object",
")",
"throws",
"ConditionalCheckFailedException",
"{",
"final",
"DynamoDBSaveExpression",
"saveExpression",
"=",
"new",
"DynamoDBSaveExpression",
"(",
")",
";",
"for",
"(",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"Object",
">",
"key",
":",
"model",
".",
"keys",
"(",
")",
")",
"{",
"saveExpression",
".",
"withExpectedEntry",
"(",
"key",
".",
"name",
"(",
")",
",",
"new",
"ExpectedAttributeValue",
"(",
")",
".",
"withExists",
"(",
"true",
")",
".",
"withValue",
"(",
"key",
".",
"convert",
"(",
"key",
".",
"get",
"(",
"object",
")",
")",
")",
")",
";",
"}",
"mapper",
".",
"<",
"T",
">",
"save",
"(",
"object",
",",
"saveExpression",
")",
";",
"}"
] |
Saves the object given into DynamoDB with the condition that the hash
and, if applicable, the range key, already exist.
@param object The object to update.
@throws ConditionalCheckFailedException If the object does not exist.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#save
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBSaveExpression
@see com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue
|
[
"Saves",
"the",
"object",
"given",
"into",
"DynamoDB",
"with",
"the",
"condition",
"that",
"the",
"hash",
"and",
"if",
"applicable",
"the",
"range",
"key",
"already",
"exist",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L338-L345
|
20,054
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.deleteIfExists
|
public void deleteIfExists(T object) throws ConditionalCheckFailedException {
final DynamoDBDeleteExpression deleteExpression = new DynamoDBDeleteExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
deleteExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(true).withValue(key.convert(key.get(object))));
}
mapper.delete(object, deleteExpression);
}
|
java
|
public void deleteIfExists(T object) throws ConditionalCheckFailedException {
final DynamoDBDeleteExpression deleteExpression = new DynamoDBDeleteExpression();
for (final DynamoDBMapperFieldModel<T,Object> key : model.keys()) {
deleteExpression.withExpectedEntry(key.name(), new ExpectedAttributeValue()
.withExists(true).withValue(key.convert(key.get(object))));
}
mapper.delete(object, deleteExpression);
}
|
[
"public",
"void",
"deleteIfExists",
"(",
"T",
"object",
")",
"throws",
"ConditionalCheckFailedException",
"{",
"final",
"DynamoDBDeleteExpression",
"deleteExpression",
"=",
"new",
"DynamoDBDeleteExpression",
"(",
")",
";",
"for",
"(",
"final",
"DynamoDBMapperFieldModel",
"<",
"T",
",",
"Object",
">",
"key",
":",
"model",
".",
"keys",
"(",
")",
")",
"{",
"deleteExpression",
".",
"withExpectedEntry",
"(",
"key",
".",
"name",
"(",
")",
",",
"new",
"ExpectedAttributeValue",
"(",
")",
".",
"withExists",
"(",
"true",
")",
".",
"withValue",
"(",
"key",
".",
"convert",
"(",
"key",
".",
"get",
"(",
"object",
")",
")",
")",
")",
";",
"}",
"mapper",
".",
"delete",
"(",
"object",
",",
"deleteExpression",
")",
";",
"}"
] |
Deletes the given object from its DynamoDB table with the condition that
the hash and, if applicable, the range key, already exist.
@param object The object to delete.
@throws ConditionalCheckFailedException If the object does not exist.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#delete
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBDeleteExpression
@see com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue
|
[
"Deletes",
"the",
"given",
"object",
"from",
"its",
"DynamoDB",
"table",
"with",
"the",
"condition",
"that",
"the",
"hash",
"and",
"if",
"applicable",
"the",
"range",
"key",
"already",
"exist",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L376-L383
|
20,055
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.count
|
public int count(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>count(model.targetType(), queryExpression);
}
|
java
|
public int count(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>count(model.targetType(), queryExpression);
}
|
[
"public",
"int",
"count",
"(",
"DynamoDBQueryExpression",
"<",
"T",
">",
"queryExpression",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"count",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"queryExpression",
")",
";",
"}"
] |
Evaluates the specified query expression and returns the count of matching
items, without returning any of the actual item data
@param queryExpression The query expression.
@return The count.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#count
|
[
"Evaluates",
"the",
"specified",
"query",
"expression",
"and",
"returns",
"the",
"count",
"of",
"matching",
"items",
"without",
"returning",
"any",
"of",
"the",
"actual",
"item",
"data"
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L392-L394
|
20,056
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.query
|
public PaginatedQueryList<T> query(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>query(model.targetType(), queryExpression);
}
|
java
|
public PaginatedQueryList<T> query(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>query(model.targetType(), queryExpression);
}
|
[
"public",
"PaginatedQueryList",
"<",
"T",
">",
"query",
"(",
"DynamoDBQueryExpression",
"<",
"T",
">",
"queryExpression",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"query",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"queryExpression",
")",
";",
"}"
] |
Queries an Amazon DynamoDB table and returns the matching results as an
unmodifiable list of instantiated objects.
@param queryExpression The query expression.
@return The query results.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query
|
[
"Queries",
"an",
"Amazon",
"DynamoDB",
"table",
"and",
"returns",
"the",
"matching",
"results",
"as",
"an",
"unmodifiable",
"list",
"of",
"instantiated",
"objects",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L403-L405
|
20,057
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.queryPage
|
public QueryResultPage<T> queryPage(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>queryPage(model.targetType(), queryExpression);
}
|
java
|
public QueryResultPage<T> queryPage(DynamoDBQueryExpression<T> queryExpression) {
return mapper.<T>queryPage(model.targetType(), queryExpression);
}
|
[
"public",
"QueryResultPage",
"<",
"T",
">",
"queryPage",
"(",
"DynamoDBQueryExpression",
"<",
"T",
">",
"queryExpression",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"queryPage",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"queryExpression",
")",
";",
"}"
] |
Queries an Amazon DynamoDB table and returns a single page of matching
results.
@param queryExpression The query expression.
@return The query results.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query
|
[
"Queries",
"an",
"Amazon",
"DynamoDB",
"table",
"and",
"returns",
"a",
"single",
"page",
"of",
"matching",
"results",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L414-L416
|
20,058
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.scan
|
public PaginatedScanList<T> scan(DynamoDBScanExpression scanExpression) {
return mapper.<T>scan(model.targetType(), scanExpression);
}
|
java
|
public PaginatedScanList<T> scan(DynamoDBScanExpression scanExpression) {
return mapper.<T>scan(model.targetType(), scanExpression);
}
|
[
"public",
"PaginatedScanList",
"<",
"T",
">",
"scan",
"(",
"DynamoDBScanExpression",
"scanExpression",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"scan",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"scanExpression",
")",
";",
"}"
] |
Scans through an Amazon DynamoDB table and returns the matching results
as an unmodifiable list of instantiated objects.
@param scanExpression The scan expression.
@return The scan results.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scan
|
[
"Scans",
"through",
"an",
"Amazon",
"DynamoDB",
"table",
"and",
"returns",
"the",
"matching",
"results",
"as",
"an",
"unmodifiable",
"list",
"of",
"instantiated",
"objects",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L436-L438
|
20,059
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.scanPage
|
public ScanResultPage<T> scanPage(DynamoDBScanExpression scanExpression) {
return mapper.<T>scanPage(model.targetType(), scanExpression);
}
|
java
|
public ScanResultPage<T> scanPage(DynamoDBScanExpression scanExpression) {
return mapper.<T>scanPage(model.targetType(), scanExpression);
}
|
[
"public",
"ScanResultPage",
"<",
"T",
">",
"scanPage",
"(",
"DynamoDBScanExpression",
"scanExpression",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"scanPage",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"scanExpression",
")",
";",
"}"
] |
Scans through an Amazon DynamoDB table and returns a single page of
matching results.
@param scanExpression The scan expression.
@return The scan results.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scanPage
|
[
"Scans",
"through",
"an",
"Amazon",
"DynamoDB",
"table",
"and",
"returns",
"a",
"single",
"page",
"of",
"matching",
"results",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L447-L449
|
20,060
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.parallelScan
|
public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) {
return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments);
}
|
java
|
public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) {
return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments);
}
|
[
"public",
"PaginatedParallelScanList",
"<",
"T",
">",
"parallelScan",
"(",
"DynamoDBScanExpression",
"scanExpression",
",",
"int",
"totalSegments",
")",
"{",
"return",
"mapper",
".",
"<",
"T",
">",
"parallelScan",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"scanExpression",
",",
"totalSegments",
")",
";",
"}"
] |
Scans through an Amazon DynamoDB table on logically partitioned segments
in parallel and returns the matching results in one unmodifiable list of
instantiated objects.
@param scanExpression The scan expression.
@param totalSegments The total segments.
@return The scan results.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#parallelScan
|
[
"Scans",
"through",
"an",
"Amazon",
"DynamoDB",
"table",
"on",
"logically",
"partitioned",
"segments",
"in",
"parallel",
"and",
"returns",
"the",
"matching",
"results",
"in",
"one",
"unmodifiable",
"list",
"of",
"instantiated",
"objects",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L460-L462
|
20,061
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.describeTable
|
public TableDescription describeTable() {
return db.describeTable(
mapper.getTableName(model.targetType(), config)
).getTable();
}
|
java
|
public TableDescription describeTable() {
return db.describeTable(
mapper.getTableName(model.targetType(), config)
).getTable();
}
|
[
"public",
"TableDescription",
"describeTable",
"(",
")",
"{",
"return",
"db",
".",
"describeTable",
"(",
"mapper",
".",
"getTableName",
"(",
"model",
".",
"targetType",
"(",
")",
",",
"config",
")",
")",
".",
"getTable",
"(",
")",
";",
"}"
] |
Returns information about the table, including the current status of the
table, when it was created, the primary key schema, and any indexes on
the table.
@return The describe table results.
@see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#describeTable
|
[
"Returns",
"information",
"about",
"the",
"table",
"including",
"the",
"current",
"status",
"of",
"the",
"table",
"when",
"it",
"was",
"created",
"the",
"primary",
"key",
"schema",
"and",
"any",
"indexes",
"on",
"the",
"table",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L471-L475
|
20,062
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
|
DynamoDBTableMapper.createTable
|
public TableDescription createTable(ProvisionedThroughput throughput) {
final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType());
request.setProvisionedThroughput(throughput);
if (request.getGlobalSecondaryIndexes() != null) {
for (final GlobalSecondaryIndex gsi : request.getGlobalSecondaryIndexes()) {
gsi.setProvisionedThroughput(throughput);
}
}
return db.createTable(request).getTableDescription();
}
|
java
|
public TableDescription createTable(ProvisionedThroughput throughput) {
final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType());
request.setProvisionedThroughput(throughput);
if (request.getGlobalSecondaryIndexes() != null) {
for (final GlobalSecondaryIndex gsi : request.getGlobalSecondaryIndexes()) {
gsi.setProvisionedThroughput(throughput);
}
}
return db.createTable(request).getTableDescription();
}
|
[
"public",
"TableDescription",
"createTable",
"(",
"ProvisionedThroughput",
"throughput",
")",
"{",
"final",
"CreateTableRequest",
"request",
"=",
"mapper",
".",
"generateCreateTableRequest",
"(",
"model",
".",
"targetType",
"(",
")",
")",
";",
"request",
".",
"setProvisionedThroughput",
"(",
"throughput",
")",
";",
"if",
"(",
"request",
".",
"getGlobalSecondaryIndexes",
"(",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"GlobalSecondaryIndex",
"gsi",
":",
"request",
".",
"getGlobalSecondaryIndexes",
"(",
")",
")",
"{",
"gsi",
".",
"setProvisionedThroughput",
"(",
"throughput",
")",
";",
"}",
"}",
"return",
"db",
".",
"createTable",
"(",
"request",
")",
".",
"getTableDescription",
"(",
")",
";",
"}"
] |
Creates the table with the specified throughput; also populates the same
throughput for all global secondary indexes.
@param throughput The provisioned throughput.
@return The table decription.
@see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#createTable
@see com.amazonaws.services.dynamodbv2.model.CreateTableRequest
|
[
"Creates",
"the",
"table",
"with",
"the",
"specified",
"throughput",
";",
"also",
"populates",
"the",
"same",
"throughput",
"for",
"all",
"global",
"secondary",
"indexes",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L485-L494
|
20,063
|
aws/aws-sdk-java
|
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsResponse.java
|
EventsResponse.withResults
|
public EventsResponse withResults(java.util.Map<String, ItemResponse> results) {
setResults(results);
return this;
}
|
java
|
public EventsResponse withResults(java.util.Map<String, ItemResponse> results) {
setResults(results);
return this;
}
|
[
"public",
"EventsResponse",
"withResults",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"ItemResponse",
">",
"results",
")",
"{",
"setResults",
"(",
"results",
")",
";",
"return",
"this",
";",
"}"
] |
A map that contains a multipart response for each endpoint. Each item in this object uses the endpoint ID as the
key, and the item response as the value.
If no item response exists, the value can also be one of the following: 202 (if the request was processed
successfully) or 400 (if the payload was invalid, or required fields were missing).
@param results
A map that contains a multipart response for each endpoint. Each item in this object uses the endpoint ID
as the key, and the item response as the value.
If no item response exists, the value can also be one of the following: 202 (if the request was processed
successfully) or 400 (if the payload was invalid, or required fields were missing).
@return Returns a reference to this object so that method calls can be chained together.
|
[
"A",
"map",
"that",
"contains",
"a",
"multipart",
"response",
"for",
"each",
"endpoint",
".",
"Each",
"item",
"in",
"this",
"object",
"uses",
"the",
"endpoint",
"ID",
"as",
"the",
"key",
"and",
"the",
"item",
"response",
"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/EventsResponse.java#L91-L94
|
20,064
|
aws/aws-sdk-java
|
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java
|
Utils.confirmSubscription
|
static ConfirmSubscriptionResult confirmSubscription(HttpClient httpClient, String subscribeUrl) {
try {
HttpGet request = new HttpGet(subscribeUrl);
HttpResponse response = httpClient.execute(request);
if (ApacheUtils.isRequestSuccessful(response)) {
return new StaxResponseHandler<ConfirmSubscriptionResult>(ConfirmSubscriptionResultStaxUnmarshaller.getInstance())
.handle(ApacheUtils.createResponse(null, request, response, null)).getResult();
} else {
throw new HttpException("Could not confirm subscription", response);
}
} catch (Exception e) {
throw new SdkClientException(e);
}
}
|
java
|
static ConfirmSubscriptionResult confirmSubscription(HttpClient httpClient, String subscribeUrl) {
try {
HttpGet request = new HttpGet(subscribeUrl);
HttpResponse response = httpClient.execute(request);
if (ApacheUtils.isRequestSuccessful(response)) {
return new StaxResponseHandler<ConfirmSubscriptionResult>(ConfirmSubscriptionResultStaxUnmarshaller.getInstance())
.handle(ApacheUtils.createResponse(null, request, response, null)).getResult();
} else {
throw new HttpException("Could not confirm subscription", response);
}
} catch (Exception e) {
throw new SdkClientException(e);
}
}
|
[
"static",
"ConfirmSubscriptionResult",
"confirmSubscription",
"(",
"HttpClient",
"httpClient",
",",
"String",
"subscribeUrl",
")",
"{",
"try",
"{",
"HttpGet",
"request",
"=",
"new",
"HttpGet",
"(",
"subscribeUrl",
")",
";",
"HttpResponse",
"response",
"=",
"httpClient",
".",
"execute",
"(",
"request",
")",
";",
"if",
"(",
"ApacheUtils",
".",
"isRequestSuccessful",
"(",
"response",
")",
")",
"{",
"return",
"new",
"StaxResponseHandler",
"<",
"ConfirmSubscriptionResult",
">",
"(",
"ConfirmSubscriptionResultStaxUnmarshaller",
".",
"getInstance",
"(",
")",
")",
".",
"handle",
"(",
"ApacheUtils",
".",
"createResponse",
"(",
"null",
",",
"request",
",",
"response",
",",
"null",
")",
")",
".",
"getResult",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"HttpException",
"(",
"\"Could not confirm subscription\"",
",",
"response",
")",
";",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"e",
")",
";",
"}",
"}"
] |
Confirms a subscription by visiting the provided URL.
@param httpClient Client to use to visit URL.
@param subscribeUrl Confirmation URL.
@return Result of subscription confirmation.
|
[
"Confirms",
"a",
"subscription",
"by",
"visiting",
"the",
"provided",
"URL",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java#L54-L67
|
20,065
|
aws/aws-sdk-java
|
aws-java-sdk-efs/src/main/java/com/amazonaws/services/elasticfilesystem/AmazonElasticFileSystemAsyncClient.java
|
AmazonElasticFileSystemAsyncClient.describeFileSystemsAsync
|
@Override
public java.util.concurrent.Future<DescribeFileSystemsResult> describeFileSystemsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeFileSystemsRequest, DescribeFileSystemsResult> asyncHandler) {
return describeFileSystemsAsync(new DescribeFileSystemsRequest(), asyncHandler);
}
|
java
|
@Override
public java.util.concurrent.Future<DescribeFileSystemsResult> describeFileSystemsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeFileSystemsRequest, DescribeFileSystemsResult> asyncHandler) {
return describeFileSystemsAsync(new DescribeFileSystemsRequest(), asyncHandler);
}
|
[
"@",
"Override",
"public",
"java",
".",
"util",
".",
"concurrent",
".",
"Future",
"<",
"DescribeFileSystemsResult",
">",
"describeFileSystemsAsync",
"(",
"com",
".",
"amazonaws",
".",
"handlers",
".",
"AsyncHandler",
"<",
"DescribeFileSystemsRequest",
",",
"DescribeFileSystemsResult",
">",
"asyncHandler",
")",
"{",
"return",
"describeFileSystemsAsync",
"(",
"new",
"DescribeFileSystemsRequest",
"(",
")",
",",
"asyncHandler",
")",
";",
"}"
] |
Simplified method form for invoking the DescribeFileSystems operation with an AsyncHandler.
@see #describeFileSystemsAsync(DescribeFileSystemsRequest, com.amazonaws.handlers.AsyncHandler)
|
[
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"DescribeFileSystems",
"operation",
"with",
"an",
"AsyncHandler",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-efs/src/main/java/com/amazonaws/services/elasticfilesystem/AmazonElasticFileSystemAsyncClient.java#L498-L503
|
20,066
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
|
Item.isNull
|
public boolean isNull(String attrName) {
return attributes.containsKey(attrName)
&& attributes.get(attrName) == null;
}
|
java
|
public boolean isNull(String attrName) {
return attributes.containsKey(attrName)
&& attributes.get(attrName) == null;
}
|
[
"public",
"boolean",
"isNull",
"(",
"String",
"attrName",
")",
"{",
"return",
"attributes",
".",
"containsKey",
"(",
"attrName",
")",
"&&",
"attributes",
".",
"get",
"(",
"attrName",
")",
"==",
"null",
";",
"}"
] |
Returns true if the specified attribute exists with a null value; false
otherwise.
|
[
"Returns",
"true",
"if",
"the",
"specified",
"attribute",
"exists",
"with",
"a",
"null",
"value",
";",
"false",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L75-L78
|
20,067
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
|
Item.getString
|
public String getString(String attrName) {
Object val = attributes.get(attrName);
return valToString(val);
}
|
java
|
public String getString(String attrName) {
Object val = attributes.get(attrName);
return valToString(val);
}
|
[
"public",
"String",
"getString",
"(",
"String",
"attrName",
")",
"{",
"Object",
"val",
"=",
"attributes",
".",
"get",
"(",
"attrName",
")",
";",
"return",
"valToString",
"(",
"val",
")",
";",
"}"
] |
Returns the value of the specified attribute in the current item as a
string; or null if the attribute either doesn't exist or the attribute
value is null.
@see #isNull(String) #isNull(String) to check if the attribute value is
null.
@see #isPresent(String) #isPresent(String) to check if the attribute
value is present.
|
[
"Returns",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"in",
"the",
"current",
"item",
"as",
"a",
"string",
";",
"or",
"null",
"if",
"the",
"attribute",
"either",
"doesn",
"t",
"exist",
"or",
"the",
"attribute",
"value",
"is",
"null",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L98-L101
|
20,068
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
|
Item.withString
|
public Item withString(String attrName, String val) {
checkInvalidAttribute(attrName, val);
attributes.put(attrName, val);
return this;
}
|
java
|
public Item withString(String attrName, String val) {
checkInvalidAttribute(attrName, val);
attributes.put(attrName, val);
return this;
}
|
[
"public",
"Item",
"withString",
"(",
"String",
"attrName",
",",
"String",
"val",
")",
"{",
"checkInvalidAttribute",
"(",
"attrName",
",",
"val",
")",
";",
"attributes",
".",
"put",
"(",
"attrName",
",",
"val",
")",
";",
"return",
"this",
";",
"}"
] |
Sets the value of the specified attribute in the current item to the
given string value.
|
[
"Sets",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"in",
"the",
"current",
"item",
"to",
"the",
"given",
"string",
"value",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L107-L111
|
20,069
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
|
Item.getBinary
|
public byte[] getBinary(String attrName) {
Object val = attributes.get(attrName);
return toByteArray(val);
}
|
java
|
public byte[] getBinary(String attrName) {
Object val = attributes.get(attrName);
return toByteArray(val);
}
|
[
"public",
"byte",
"[",
"]",
"getBinary",
"(",
"String",
"attrName",
")",
"{",
"Object",
"val",
"=",
"attributes",
".",
"get",
"(",
"attrName",
")",
";",
"return",
"toByteArray",
"(",
"val",
")",
";",
"}"
] |
Returns the value of the specified attribute in the current item as a
byte array; or null if the attribute either doesn't exist or the
attribute value is null.
@throws UnsupportedOperationException
If the attribute value involves a byte buffer which is not
backed by an accessible array
@throws IncompatibleTypeException
if the attribute value cannot be converted into a byte array
@see #isNull(String) #isNull(String) to check if the attribute value is
null.
@see #isPresent(String) #isPresent(String) to check if the attribute
value is present.
|
[
"Returns",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"in",
"the",
"current",
"item",
"as",
"a",
"byte",
"array",
";",
"or",
"null",
"if",
"the",
"attribute",
"either",
"doesn",
"t",
"exist",
"or",
"the",
"attribute",
"value",
"is",
"null",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L354-L357
|
20,070
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java
|
Item.toByteArray
|
private byte[] toByteArray(Object val) {
if (val == null)
return null;
if (val instanceof byte[])
return (byte[]) val;
if (val instanceof ByteBuffer) {
// Defensive code but execution should never get here. The internal
// representation of binary should always be
// byte[], not ByteBuffer. This allows Item to be converted into
// a JSON string via Jackson without causing trouble.
return copyAllBytesFrom((ByteBuffer)val);
}
throw new IncompatibleTypeException(val.getClass()
+ " cannot be converted into a byte array");
}
|
java
|
private byte[] toByteArray(Object val) {
if (val == null)
return null;
if (val instanceof byte[])
return (byte[]) val;
if (val instanceof ByteBuffer) {
// Defensive code but execution should never get here. The internal
// representation of binary should always be
// byte[], not ByteBuffer. This allows Item to be converted into
// a JSON string via Jackson without causing trouble.
return copyAllBytesFrom((ByteBuffer)val);
}
throw new IncompatibleTypeException(val.getClass()
+ " cannot be converted into a byte array");
}
|
[
"private",
"byte",
"[",
"]",
"toByteArray",
"(",
"Object",
"val",
")",
"{",
"if",
"(",
"val",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"val",
"instanceof",
"byte",
"[",
"]",
")",
"return",
"(",
"byte",
"[",
"]",
")",
"val",
";",
"if",
"(",
"val",
"instanceof",
"ByteBuffer",
")",
"{",
"// Defensive code but execution should never get here. The internal",
"// representation of binary should always be",
"// byte[], not ByteBuffer. This allows Item to be converted into",
"// a JSON string via Jackson without causing trouble.",
"return",
"copyAllBytesFrom",
"(",
"(",
"ByteBuffer",
")",
"val",
")",
";",
"}",
"throw",
"new",
"IncompatibleTypeException",
"(",
"val",
".",
"getClass",
"(",
")",
"+",
"\" cannot be converted into a byte array\"",
")",
";",
"}"
] |
This method is assumed to be only called from a getter method, but NOT
from a setter method.
|
[
"This",
"method",
"is",
"assumed",
"to",
"be",
"only",
"called",
"from",
"a",
"getter",
"method",
"but",
"NOT",
"from",
"a",
"setter",
"method",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L381-L395
|
20,071
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.configureRegion
|
@Deprecated
public final void configureRegion(Regions region) {
checkMutability();
if (region == null)
throw new IllegalArgumentException("No region provided");
this.setRegion(Region.getRegion(region));
}
|
java
|
@Deprecated
public final void configureRegion(Regions region) {
checkMutability();
if (region == null)
throw new IllegalArgumentException("No region provided");
this.setRegion(Region.getRegion(region));
}
|
[
"@",
"Deprecated",
"public",
"final",
"void",
"configureRegion",
"(",
"Regions",
"region",
")",
"{",
"checkMutability",
"(",
")",
";",
"if",
"(",
"region",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"No region provided\"",
")",
";",
"this",
".",
"setRegion",
"(",
"Region",
".",
"getRegion",
"(",
"region",
")",
")",
";",
"}"
] |
Convenient method for setting region.
@param region region to set to; must not be null.
@see #setRegion(Region)
@deprecated use {@link AwsClientBuilder#setRegion(String)}
|
[
"Convenient",
"method",
"for",
"setting",
"region",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L512-L518
|
20,072
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.removeRequestHandler
|
@Deprecated
public void removeRequestHandler(RequestHandler requestHandler) {
checkMutability();
requestHandler2s.remove(RequestHandler2.adapt(requestHandler));
}
|
java
|
@Deprecated
public void removeRequestHandler(RequestHandler requestHandler) {
checkMutability();
requestHandler2s.remove(RequestHandler2.adapt(requestHandler));
}
|
[
"@",
"Deprecated",
"public",
"void",
"removeRequestHandler",
"(",
"RequestHandler",
"requestHandler",
")",
"{",
"checkMutability",
"(",
")",
";",
"requestHandler2s",
".",
"remove",
"(",
"RequestHandler2",
".",
"adapt",
"(",
"requestHandler",
")",
")",
";",
"}"
] |
Removes a request handler from the list of registered handlers that are run
as part of a request's lifecycle.
@param requestHandler
The handler to remove from the current list of request
handlers.
@deprecated use {@link AwsClientBuilder#withRequestHandlers(RequestHandler2...)}
|
[
"Removes",
"a",
"request",
"handler",
"from",
"the",
"list",
"of",
"registered",
"handlers",
"that",
"are",
"run",
"as",
"part",
"of",
"a",
"request",
"s",
"lifecycle",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L572-L576
|
20,073
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.isRequestMetricsEnabled
|
protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) {
RequestMetricCollector c = req.getRequestMetricCollector(); // request level collector
if (c != null && c.isEnabled()) {
return true;
}
return isRMCEnabledAtClientOrSdkLevel();
}
|
java
|
protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) {
RequestMetricCollector c = req.getRequestMetricCollector(); // request level collector
if (c != null && c.isEnabled()) {
return true;
}
return isRMCEnabledAtClientOrSdkLevel();
}
|
[
"protected",
"final",
"boolean",
"isRequestMetricsEnabled",
"(",
"AmazonWebServiceRequest",
"req",
")",
"{",
"RequestMetricCollector",
"c",
"=",
"req",
".",
"getRequestMetricCollector",
"(",
")",
";",
"// request level collector",
"if",
"(",
"c",
"!=",
"null",
"&&",
"c",
".",
"isEnabled",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"isRMCEnabledAtClientOrSdkLevel",
"(",
")",
";",
"}"
] |
Returns true if request metric collection is applicable to the given
request; false otherwise.
|
[
"Returns",
"true",
"if",
"request",
"metric",
"collection",
"is",
"applicable",
"to",
"the",
"given",
"request",
";",
"false",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L647-L653
|
20,074
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.requestMetricCollector
|
protected RequestMetricCollector requestMetricCollector() {
RequestMetricCollector mc = client.getRequestMetricCollector();
return mc == null ? AwsSdkMetrics.getRequestMetricCollector() : mc;
}
|
java
|
protected RequestMetricCollector requestMetricCollector() {
RequestMetricCollector mc = client.getRequestMetricCollector();
return mc == null ? AwsSdkMetrics.getRequestMetricCollector() : mc;
}
|
[
"protected",
"RequestMetricCollector",
"requestMetricCollector",
"(",
")",
"{",
"RequestMetricCollector",
"mc",
"=",
"client",
".",
"getRequestMetricCollector",
"(",
")",
";",
"return",
"mc",
"==",
"null",
"?",
"AwsSdkMetrics",
".",
"getRequestMetricCollector",
"(",
")",
":",
"mc",
";",
"}"
] |
Returns the client specific request metric collector if there is one; or
the one at the AWS SDK level otherwise.
|
[
"Returns",
"the",
"client",
"specific",
"request",
"metric",
"collector",
"if",
"there",
"is",
"one",
";",
"or",
"the",
"one",
"at",
"the",
"AWS",
"SDK",
"level",
"otherwise",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L726-L729
|
20,075
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.beforeClientExecution
|
protected final <T extends AmazonWebServiceRequest> T beforeClientExecution(T request) {
T local = request;
for (RequestHandler2 handler : requestHandler2s) {
local = (T) handler.beforeExecution(local);
}
return local;
}
|
java
|
protected final <T extends AmazonWebServiceRequest> T beforeClientExecution(T request) {
T local = request;
for (RequestHandler2 handler : requestHandler2s) {
local = (T) handler.beforeExecution(local);
}
return local;
}
|
[
"protected",
"final",
"<",
"T",
"extends",
"AmazonWebServiceRequest",
">",
"T",
"beforeClientExecution",
"(",
"T",
"request",
")",
"{",
"T",
"local",
"=",
"request",
";",
"for",
"(",
"RequestHandler2",
"handler",
":",
"requestHandler2s",
")",
"{",
"local",
"=",
"(",
"T",
")",
"handler",
".",
"beforeExecution",
"(",
"local",
")",
";",
"}",
"return",
"local",
";",
"}"
] |
Notify request handlers that we are about to start execution.
|
[
"Notify",
"request",
"handlers",
"that",
"we",
"are",
"about",
"to",
"start",
"execution",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L753-L759
|
20,076
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.setSignerRegionOverride
|
public final void setSignerRegionOverride(String signerRegionOverride) {
checkMutability();
Signer signer = computeSignerByURI(endpoint, signerRegionOverride, true);
synchronized(this) {
this.signerRegionOverride = signerRegionOverride;
this.signerProvider = createSignerProvider(signer);
this.signingRegion = signerRegionOverride;
}
}
|
java
|
public final void setSignerRegionOverride(String signerRegionOverride) {
checkMutability();
Signer signer = computeSignerByURI(endpoint, signerRegionOverride, true);
synchronized(this) {
this.signerRegionOverride = signerRegionOverride;
this.signerProvider = createSignerProvider(signer);
this.signingRegion = signerRegionOverride;
}
}
|
[
"public",
"final",
"void",
"setSignerRegionOverride",
"(",
"String",
"signerRegionOverride",
")",
"{",
"checkMutability",
"(",
")",
";",
"Signer",
"signer",
"=",
"computeSignerByURI",
"(",
"endpoint",
",",
"signerRegionOverride",
",",
"true",
")",
";",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"signerRegionOverride",
"=",
"signerRegionOverride",
";",
"this",
".",
"signerProvider",
"=",
"createSignerProvider",
"(",
"signer",
")",
";",
"this",
".",
"signingRegion",
"=",
"signerRegionOverride",
";",
"}",
"}"
] |
An internal method used to explicitly override the internal signer region
computed by the default implementation. This method is not expected to be
normally called except for AWS internal development purposes.
|
[
"An",
"internal",
"method",
"used",
"to",
"explicitly",
"override",
"the",
"internal",
"signer",
"region",
"computed",
"by",
"the",
"default",
"implementation",
".",
"This",
"method",
"is",
"not",
"expected",
"to",
"be",
"normally",
"called",
"except",
"for",
"AWS",
"internal",
"development",
"purposes",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L947-L955
|
20,077
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
|
AmazonWebServiceClient.withRegion
|
@Deprecated
public <T extends AmazonWebServiceClient> T withRegion(Regions region) {
configureRegion(region);
@SuppressWarnings("unchecked") T t= (T)this;
return t;
}
|
java
|
@Deprecated
public <T extends AmazonWebServiceClient> T withRegion(Regions region) {
configureRegion(region);
@SuppressWarnings("unchecked") T t= (T)this;
return t;
}
|
[
"@",
"Deprecated",
"public",
"<",
"T",
"extends",
"AmazonWebServiceClient",
">",
"T",
"withRegion",
"(",
"Regions",
"region",
")",
"{",
"configureRegion",
"(",
"region",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"T",
"t",
"=",
"(",
"T",
")",
"this",
";",
"return",
"t",
";",
"}"
] |
Convenient fluent method for setting region.
@param region region to set to; must not be null.
@see #withRegion(Region)
@deprecated use {@link AwsClientBuilder#withRegion(Regions)} for example:
{@code AmazonSNSClientBuilder.standard().withRegion(region).build();}
|
[
"Convenient",
"fluent",
"method",
"for",
"setting",
"region",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L984-L989
|
20,078
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java
|
ProfilesConfigFileWriter.modifyOrInsertProfiles
|
public static void modifyOrInsertProfiles(File destination, Profile... profiles) {
final Map<String, Profile> modifications = new LinkedHashMap<String, Profile>();
for (Profile profile : profiles) {
modifications.put(profile.getProfileName(), profile);
}
modifyProfiles(destination, modifications);
}
|
java
|
public static void modifyOrInsertProfiles(File destination, Profile... profiles) {
final Map<String, Profile> modifications = new LinkedHashMap<String, Profile>();
for (Profile profile : profiles) {
modifications.put(profile.getProfileName(), profile);
}
modifyProfiles(destination, modifications);
}
|
[
"public",
"static",
"void",
"modifyOrInsertProfiles",
"(",
"File",
"destination",
",",
"Profile",
"...",
"profiles",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Profile",
">",
"modifications",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"Profile",
">",
"(",
")",
";",
"for",
"(",
"Profile",
"profile",
":",
"profiles",
")",
"{",
"modifications",
".",
"put",
"(",
"profile",
".",
"getProfileName",
"(",
")",
",",
"profile",
")",
";",
"}",
"modifyProfiles",
"(",
"destination",
",",
"modifications",
")",
";",
"}"
] |
Modify or insert new profiles into an existing credentials file by
in-place modification. Only the properties of the affected profiles will
be modified; all the unaffected profiles and comment lines will remain
the same. This method does not support renaming a profile.
@param destination
The destination file to modify
@param profiles
All the credential profiles to be written.
|
[
"Modify",
"or",
"insert",
"new",
"profiles",
"into",
"an",
"existing",
"credentials",
"file",
"by",
"in",
"-",
"place",
"modification",
".",
"Only",
"the",
"properties",
"of",
"the",
"affected",
"profiles",
"will",
"be",
"modified",
";",
"all",
"the",
"unaffected",
"profiles",
"and",
"comment",
"lines",
"will",
"remain",
"the",
"same",
".",
"This",
"method",
"does",
"not",
"support",
"renaming",
"a",
"profile",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java#L105-L112
|
20,079
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java
|
ProfilesConfigFileWriter.modifyOneProfile
|
public static void modifyOneProfile(File destination, String profileName, Profile newProfile) {
final Map<String, Profile> modifications = Collections.singletonMap(profileName, newProfile);
modifyProfiles(destination, modifications);
}
|
java
|
public static void modifyOneProfile(File destination, String profileName, Profile newProfile) {
final Map<String, Profile> modifications = Collections.singletonMap(profileName, newProfile);
modifyProfiles(destination, modifications);
}
|
[
"public",
"static",
"void",
"modifyOneProfile",
"(",
"File",
"destination",
",",
"String",
"profileName",
",",
"Profile",
"newProfile",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Profile",
">",
"modifications",
"=",
"Collections",
".",
"singletonMap",
"(",
"profileName",
",",
"newProfile",
")",
";",
"modifyProfiles",
"(",
"destination",
",",
"modifications",
")",
";",
"}"
] |
Modify one profile in the existing credentials file by in-place
modification. This method will rename the existing profile if the
specified Profile has a different name.
@param destination
The destination file to modify
@param profileName
The name of the existing profile to be modified
@param newProfile
The new Profile object.
|
[
"Modify",
"one",
"profile",
"in",
"the",
"existing",
"credentials",
"file",
"by",
"in",
"-",
"place",
"modification",
".",
"This",
"method",
"will",
"rename",
"the",
"existing",
"profile",
"if",
"the",
"specified",
"Profile",
"has",
"a",
"different",
"name",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java#L126-L130
|
20,080
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java
|
ProfilesConfigFileWriter.deleteProfiles
|
public static void deleteProfiles(File destination, String... profileNames) {
final Map<String, Profile> modifications = new LinkedHashMap<String, Profile>();
for (String profileName : profileNames) {
modifications.put(profileName, null); // null value indicates a deletion
}
modifyProfiles(destination, modifications);
}
|
java
|
public static void deleteProfiles(File destination, String... profileNames) {
final Map<String, Profile> modifications = new LinkedHashMap<String, Profile>();
for (String profileName : profileNames) {
modifications.put(profileName, null); // null value indicates a deletion
}
modifyProfiles(destination, modifications);
}
|
[
"public",
"static",
"void",
"deleteProfiles",
"(",
"File",
"destination",
",",
"String",
"...",
"profileNames",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Profile",
">",
"modifications",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"Profile",
">",
"(",
")",
";",
"for",
"(",
"String",
"profileName",
":",
"profileNames",
")",
"{",
"modifications",
".",
"put",
"(",
"profileName",
",",
"null",
")",
";",
"// null value indicates a deletion",
"}",
"modifyProfiles",
"(",
"destination",
",",
"modifications",
")",
";",
"}"
] |
Remove one or more profiles from the existing credentials file by
in-place modification.
@param destination
The destination file to modify
@param profileNames
The names of all the profiles to be deleted.
|
[
"Remove",
"one",
"or",
"more",
"profiles",
"from",
"the",
"existing",
"credentials",
"file",
"by",
"in",
"-",
"place",
"modification",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java#L141-L148
|
20,081
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java
|
ProfilesConfigFileWriter.modifyProfiles
|
static void modifyProfiles(File destination, Map<String, Profile> modifications) {
final boolean inPlaceModify = destination.exists();
File stashLocation = null;
// Stash the original file, before we apply the changes
if (inPlaceModify) {
boolean stashed = false;
try {
// We can't use File.createTempFile, since it will always create
// that file no matter what, and File.reNameTo does not allow
// the destination to be an existing file
stashLocation = new File(destination.getParentFile(),
destination.getName() + ".bak."
+ UUID.randomUUID().toString());
stashed = destination.renameTo(stashLocation);
if (LOG.isDebugEnabled()) {
LOG.debug(String
.format("The original credentials file is stashed to loaction (%s).",
stashLocation.getAbsolutePath()));
}
} finally {
if (!stashed) {
throw new SdkClientException(
"Failed to stash the existing credentials file " +
"before applying the changes.");
}
}
}
OutputStreamWriter writer = null;
try {
writer = new OutputStreamWriter(new FileOutputStream(destination), StringUtils.UTF8);
ProfilesConfigFileWriterHelper writerHelper = new ProfilesConfigFileWriterHelper(writer, modifications);
if (inPlaceModify) {
Scanner existingContent = new Scanner(stashLocation, StringUtils.UTF8.name());
writerHelper.writeWithExistingContent(existingContent);
} else {
writerHelper.writeWithoutExistingContent();
}
// Make sure the output is valid and can be loaded by the loader
new ProfilesConfigFile(destination);
if ( inPlaceModify && !stashLocation.delete() ) {
if (LOG.isDebugEnabled()) {
LOG.debug(String
.format("Successfully modified the credentials file. But failed to " +
"delete the stashed copy of the original file (%s).",
stashLocation.getAbsolutePath()));
}
}
} catch (Exception e) {
// Restore the stashed file
if (inPlaceModify) {
boolean restored = false;
try {
// We don't really care about what destination.delete()
// returns, since the file might not have been created when
// the error occurred.
if ( !destination.delete() ) {
LOG.debug("Unable to remove the credentials file "
+ "before restoring the original one.");
}
restored = stashLocation.renameTo(destination);
} finally {
if (!restored) {
throw new SdkClientException(
"Unable to restore the original credentials file. " +
"File content stashed in " + stashLocation.getAbsolutePath());
}
}
}
throw new SdkClientException(
"Unable to modify the credentials file. " +
"(The original file has been restored.)",
e);
} finally {
try {
if (writer != null) writer.close();
} catch (IOException e) {}
}
}
|
java
|
static void modifyProfiles(File destination, Map<String, Profile> modifications) {
final boolean inPlaceModify = destination.exists();
File stashLocation = null;
// Stash the original file, before we apply the changes
if (inPlaceModify) {
boolean stashed = false;
try {
// We can't use File.createTempFile, since it will always create
// that file no matter what, and File.reNameTo does not allow
// the destination to be an existing file
stashLocation = new File(destination.getParentFile(),
destination.getName() + ".bak."
+ UUID.randomUUID().toString());
stashed = destination.renameTo(stashLocation);
if (LOG.isDebugEnabled()) {
LOG.debug(String
.format("The original credentials file is stashed to loaction (%s).",
stashLocation.getAbsolutePath()));
}
} finally {
if (!stashed) {
throw new SdkClientException(
"Failed to stash the existing credentials file " +
"before applying the changes.");
}
}
}
OutputStreamWriter writer = null;
try {
writer = new OutputStreamWriter(new FileOutputStream(destination), StringUtils.UTF8);
ProfilesConfigFileWriterHelper writerHelper = new ProfilesConfigFileWriterHelper(writer, modifications);
if (inPlaceModify) {
Scanner existingContent = new Scanner(stashLocation, StringUtils.UTF8.name());
writerHelper.writeWithExistingContent(existingContent);
} else {
writerHelper.writeWithoutExistingContent();
}
// Make sure the output is valid and can be loaded by the loader
new ProfilesConfigFile(destination);
if ( inPlaceModify && !stashLocation.delete() ) {
if (LOG.isDebugEnabled()) {
LOG.debug(String
.format("Successfully modified the credentials file. But failed to " +
"delete the stashed copy of the original file (%s).",
stashLocation.getAbsolutePath()));
}
}
} catch (Exception e) {
// Restore the stashed file
if (inPlaceModify) {
boolean restored = false;
try {
// We don't really care about what destination.delete()
// returns, since the file might not have been created when
// the error occurred.
if ( !destination.delete() ) {
LOG.debug("Unable to remove the credentials file "
+ "before restoring the original one.");
}
restored = stashLocation.renameTo(destination);
} finally {
if (!restored) {
throw new SdkClientException(
"Unable to restore the original credentials file. " +
"File content stashed in " + stashLocation.getAbsolutePath());
}
}
}
throw new SdkClientException(
"Unable to modify the credentials file. " +
"(The original file has been restored.)",
e);
} finally {
try {
if (writer != null) writer.close();
} catch (IOException e) {}
}
}
|
[
"static",
"void",
"modifyProfiles",
"(",
"File",
"destination",
",",
"Map",
"<",
"String",
",",
"Profile",
">",
"modifications",
")",
"{",
"final",
"boolean",
"inPlaceModify",
"=",
"destination",
".",
"exists",
"(",
")",
";",
"File",
"stashLocation",
"=",
"null",
";",
"// Stash the original file, before we apply the changes",
"if",
"(",
"inPlaceModify",
")",
"{",
"boolean",
"stashed",
"=",
"false",
";",
"try",
"{",
"// We can't use File.createTempFile, since it will always create",
"// that file no matter what, and File.reNameTo does not allow",
"// the destination to be an existing file",
"stashLocation",
"=",
"new",
"File",
"(",
"destination",
".",
"getParentFile",
"(",
")",
",",
"destination",
".",
"getName",
"(",
")",
"+",
"\".bak.\"",
"+",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"stashed",
"=",
"destination",
".",
"renameTo",
"(",
"stashLocation",
")",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOG",
".",
"debug",
"(",
"String",
".",
"format",
"(",
"\"The original credentials file is stashed to loaction (%s).\"",
",",
"stashLocation",
".",
"getAbsolutePath",
"(",
")",
")",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"!",
"stashed",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Failed to stash the existing credentials file \"",
"+",
"\"before applying the changes.\"",
")",
";",
"}",
"}",
"}",
"OutputStreamWriter",
"writer",
"=",
"null",
";",
"try",
"{",
"writer",
"=",
"new",
"OutputStreamWriter",
"(",
"new",
"FileOutputStream",
"(",
"destination",
")",
",",
"StringUtils",
".",
"UTF8",
")",
";",
"ProfilesConfigFileWriterHelper",
"writerHelper",
"=",
"new",
"ProfilesConfigFileWriterHelper",
"(",
"writer",
",",
"modifications",
")",
";",
"if",
"(",
"inPlaceModify",
")",
"{",
"Scanner",
"existingContent",
"=",
"new",
"Scanner",
"(",
"stashLocation",
",",
"StringUtils",
".",
"UTF8",
".",
"name",
"(",
")",
")",
";",
"writerHelper",
".",
"writeWithExistingContent",
"(",
"existingContent",
")",
";",
"}",
"else",
"{",
"writerHelper",
".",
"writeWithoutExistingContent",
"(",
")",
";",
"}",
"// Make sure the output is valid and can be loaded by the loader",
"new",
"ProfilesConfigFile",
"(",
"destination",
")",
";",
"if",
"(",
"inPlaceModify",
"&&",
"!",
"stashLocation",
".",
"delete",
"(",
")",
")",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOG",
".",
"debug",
"(",
"String",
".",
"format",
"(",
"\"Successfully modified the credentials file. But failed to \"",
"+",
"\"delete the stashed copy of the original file (%s).\"",
",",
"stashLocation",
".",
"getAbsolutePath",
"(",
")",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"// Restore the stashed file",
"if",
"(",
"inPlaceModify",
")",
"{",
"boolean",
"restored",
"=",
"false",
";",
"try",
"{",
"// We don't really care about what destination.delete()",
"// returns, since the file might not have been created when",
"// the error occurred.",
"if",
"(",
"!",
"destination",
".",
"delete",
"(",
")",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Unable to remove the credentials file \"",
"+",
"\"before restoring the original one.\"",
")",
";",
"}",
"restored",
"=",
"stashLocation",
".",
"renameTo",
"(",
"destination",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"restored",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Unable to restore the original credentials file. \"",
"+",
"\"File content stashed in \"",
"+",
"stashLocation",
".",
"getAbsolutePath",
"(",
")",
")",
";",
"}",
"}",
"}",
"throw",
"new",
"SdkClientException",
"(",
"\"Unable to modify the credentials file. \"",
"+",
"\"(The original file has been restored.)\"",
",",
"e",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"if",
"(",
"writer",
"!=",
"null",
")",
"writer",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}"
] |
A package-private method that supports all kinds of profile modification,
including renaming or deleting one or more profiles.
@param modifications
Use null key value to indicate a profile that is to be
deleted.
|
[
"A",
"package",
"-",
"private",
"method",
"that",
"supports",
"all",
"kinds",
"of",
"profile",
"modification",
"including",
"renaming",
"or",
"deleting",
"one",
"or",
"more",
"profiles",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java#L158-L247
|
20,082
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/DeleteMarkerReplication.java
|
DeleteMarkerReplication.withStatus
|
public DeleteMarkerReplication withStatus(DeleteMarkerReplicationStatus status) {
setStatus(status == null ? null : status.toString());
return this;
}
|
java
|
public DeleteMarkerReplication withStatus(DeleteMarkerReplicationStatus status) {
setStatus(status == null ? null : status.toString());
return this;
}
|
[
"public",
"DeleteMarkerReplication",
"withStatus",
"(",
"DeleteMarkerReplicationStatus",
"status",
")",
"{",
"setStatus",
"(",
"status",
"==",
"null",
"?",
"null",
":",
"status",
".",
"toString",
"(",
")",
")",
";",
"return",
"this",
";",
"}"
] |
Sets the replication status for delete markers. Delete markers are not replicated if status is Disabled.
@param status New replication status.
@return This object for method chaining.
|
[
"Sets",
"the",
"replication",
"status",
"for",
"delete",
"markers",
".",
"Delete",
"markers",
"are",
"not",
"replicated",
"if",
"status",
"is",
"Disabled",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/DeleteMarkerReplication.java#L57-L60
|
20,083
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/Condition.java
|
Condition.and
|
public AndCondition and(Condition that) {
return new AndCondition(this, that.atomic() ? that : _(that));
}
|
java
|
public AndCondition and(Condition that) {
return new AndCondition(this, that.atomic() ? that : _(that));
}
|
[
"public",
"AndCondition",
"and",
"(",
"Condition",
"that",
")",
"{",
"return",
"new",
"AndCondition",
"(",
"this",
",",
"that",
".",
"atomic",
"(",
")",
"?",
"that",
":",
"_",
"(",
"that",
")",
")",
";",
"}"
] |
Returns a new condition based on the conjunction of the current condition
and the given condition.
@param that given condition.
|
[
"Returns",
"a",
"new",
"condition",
"based",
"on",
"the",
"conjunction",
"of",
"the",
"current",
"condition",
"and",
"the",
"given",
"condition",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/Condition.java#L39-L41
|
20,084
|
aws/aws-sdk-java
|
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/Condition.java
|
Condition.or
|
public OrCondition or(Condition that) {
return new OrCondition(this, that.atomic() ? that : _(that));
}
|
java
|
public OrCondition or(Condition that) {
return new OrCondition(this, that.atomic() ? that : _(that));
}
|
[
"public",
"OrCondition",
"or",
"(",
"Condition",
"that",
")",
"{",
"return",
"new",
"OrCondition",
"(",
"this",
",",
"that",
".",
"atomic",
"(",
")",
"?",
"that",
":",
"_",
"(",
"that",
")",
")",
";",
"}"
] |
Returns a new condition based on the disjunction of the current condition
and the given condition.
@param that given condition.
|
[
"Returns",
"a",
"new",
"condition",
"based",
"on",
"the",
"disjunction",
"of",
"the",
"current",
"condition",
"and",
"the",
"given",
"condition",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/Condition.java#L49-L51
|
20,085
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/protocol/json/internal/JsonProtocolMarshaller.java
|
JsonProtocolMarshaller.marshallBinaryPayload
|
private void marshallBinaryPayload(Object val) {
if (val instanceof ByteBuffer) {
request.setContent(BinaryUtils.toStream((ByteBuffer) val));
} else if (val instanceof InputStream) {
request.setContent((InputStream) val);
}
}
|
java
|
private void marshallBinaryPayload(Object val) {
if (val instanceof ByteBuffer) {
request.setContent(BinaryUtils.toStream((ByteBuffer) val));
} else if (val instanceof InputStream) {
request.setContent((InputStream) val);
}
}
|
[
"private",
"void",
"marshallBinaryPayload",
"(",
"Object",
"val",
")",
"{",
"if",
"(",
"val",
"instanceof",
"ByteBuffer",
")",
"{",
"request",
".",
"setContent",
"(",
"BinaryUtils",
".",
"toStream",
"(",
"(",
"ByteBuffer",
")",
"val",
")",
")",
";",
"}",
"else",
"if",
"(",
"val",
"instanceof",
"InputStream",
")",
"{",
"request",
".",
"setContent",
"(",
"(",
"InputStream",
")",
"val",
")",
";",
"}",
"}"
] |
Binary data should be placed as is, directly into the content.
|
[
"Binary",
"data",
"should",
"be",
"placed",
"as",
"is",
"directly",
"into",
"the",
"content",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/protocol/json/internal/JsonProtocolMarshaller.java#L173-L179
|
20,086
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java
|
AbstractAWSSigner.signAndBase64Encode
|
protected String signAndBase64Encode(String data, String key,
SigningAlgorithm algorithm) throws SdkClientException {
return signAndBase64Encode(data.getBytes(UTF8), key, algorithm);
}
|
java
|
protected String signAndBase64Encode(String data, String key,
SigningAlgorithm algorithm) throws SdkClientException {
return signAndBase64Encode(data.getBytes(UTF8), key, algorithm);
}
|
[
"protected",
"String",
"signAndBase64Encode",
"(",
"String",
"data",
",",
"String",
"key",
",",
"SigningAlgorithm",
"algorithm",
")",
"throws",
"SdkClientException",
"{",
"return",
"signAndBase64Encode",
"(",
"data",
".",
"getBytes",
"(",
"UTF8",
")",
",",
"key",
",",
"algorithm",
")",
";",
"}"
] |
Computes an RFC 2104-compliant HMAC signature and returns the result as a
Base64 encoded string.
|
[
"Computes",
"an",
"RFC",
"2104",
"-",
"compliant",
"HMAC",
"signature",
"and",
"returns",
"the",
"result",
"as",
"a",
"Base64",
"encoded",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java#L80-L83
|
20,087
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java
|
AbstractAWSSigner.signAndBase64Encode
|
protected String signAndBase64Encode(byte[] data, String key,
SigningAlgorithm algorithm) throws SdkClientException {
try {
byte[] signature = sign(data, key.getBytes(UTF8), algorithm);
return Base64.encodeAsString(signature);
} catch (Exception e) {
throw new SdkClientException(
"Unable to calculate a request signature: "
+ e.getMessage(), e);
}
}
|
java
|
protected String signAndBase64Encode(byte[] data, String key,
SigningAlgorithm algorithm) throws SdkClientException {
try {
byte[] signature = sign(data, key.getBytes(UTF8), algorithm);
return Base64.encodeAsString(signature);
} catch (Exception e) {
throw new SdkClientException(
"Unable to calculate a request signature: "
+ e.getMessage(), e);
}
}
|
[
"protected",
"String",
"signAndBase64Encode",
"(",
"byte",
"[",
"]",
"data",
",",
"String",
"key",
",",
"SigningAlgorithm",
"algorithm",
")",
"throws",
"SdkClientException",
"{",
"try",
"{",
"byte",
"[",
"]",
"signature",
"=",
"sign",
"(",
"data",
",",
"key",
".",
"getBytes",
"(",
"UTF8",
")",
",",
"algorithm",
")",
";",
"return",
"Base64",
".",
"encodeAsString",
"(",
"signature",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Unable to calculate a request signature: \"",
"+",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
Computes an RFC 2104-compliant HMAC signature for an array of bytes and
returns the result as a Base64 encoded string.
|
[
"Computes",
"an",
"RFC",
"2104",
"-",
"compliant",
"HMAC",
"signature",
"for",
"an",
"array",
"of",
"bytes",
"and",
"returns",
"the",
"result",
"as",
"a",
"Base64",
"encoded",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java#L89-L99
|
20,088
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java
|
AbstractAWSSigner.hash
|
public byte[] hash(byte[] data) throws SdkClientException {
try {
MessageDigest md = getMessageDigestInstance();
md.update(data);
return md.digest();
} catch (Exception e) {
throw new SdkClientException(
"Unable to compute hash while signing request: "
+ e.getMessage(), e);
}
}
|
java
|
public byte[] hash(byte[] data) throws SdkClientException {
try {
MessageDigest md = getMessageDigestInstance();
md.update(data);
return md.digest();
} catch (Exception e) {
throw new SdkClientException(
"Unable to compute hash while signing request: "
+ e.getMessage(), e);
}
}
|
[
"public",
"byte",
"[",
"]",
"hash",
"(",
"byte",
"[",
"]",
"data",
")",
"throws",
"SdkClientException",
"{",
"try",
"{",
"MessageDigest",
"md",
"=",
"getMessageDigestInstance",
"(",
")",
";",
"md",
".",
"update",
"(",
"data",
")",
";",
"return",
"md",
".",
"digest",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Unable to compute hash while signing request: \"",
"+",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
Hashes the binary data using the SHA-256 algorithm.
@param data
The binary data to hash.
@return The hashed bytes from the specified data.
@throws SdkClientException
If the hash cannot be computed.
|
[
"Hashes",
"the",
"binary",
"data",
"using",
"the",
"SHA",
"-",
"256",
"algorithm",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java#L192-L202
|
20,089
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java
|
AbstractAWSSigner.getBinaryRequestPayload
|
protected byte[] getBinaryRequestPayload(SignableRequest<?> request) {
if (SdkHttpUtils.usePayloadForQueryParameters(request)) {
String encodedParameters = SdkHttpUtils.encodeParameters(request);
if (encodedParameters == null)
return new byte[0];
return encodedParameters.getBytes(UTF8);
}
return getBinaryRequestPayloadWithoutQueryParams(request);
}
|
java
|
protected byte[] getBinaryRequestPayload(SignableRequest<?> request) {
if (SdkHttpUtils.usePayloadForQueryParameters(request)) {
String encodedParameters = SdkHttpUtils.encodeParameters(request);
if (encodedParameters == null)
return new byte[0];
return encodedParameters.getBytes(UTF8);
}
return getBinaryRequestPayloadWithoutQueryParams(request);
}
|
[
"protected",
"byte",
"[",
"]",
"getBinaryRequestPayload",
"(",
"SignableRequest",
"<",
"?",
">",
"request",
")",
"{",
"if",
"(",
"SdkHttpUtils",
".",
"usePayloadForQueryParameters",
"(",
"request",
")",
")",
"{",
"String",
"encodedParameters",
"=",
"SdkHttpUtils",
".",
"encodeParameters",
"(",
"request",
")",
";",
"if",
"(",
"encodedParameters",
"==",
"null",
")",
"return",
"new",
"byte",
"[",
"0",
"]",
";",
"return",
"encodedParameters",
".",
"getBytes",
"(",
"UTF8",
")",
";",
"}",
"return",
"getBinaryRequestPayloadWithoutQueryParams",
"(",
"request",
")",
";",
"}"
] |
Returns the request's payload as binary data.
@param request
The request
@return The data from the request's payload, as binary data.
|
[
"Returns",
"the",
"request",
"s",
"payload",
"as",
"binary",
"data",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java#L271-L281
|
20,090
|
aws/aws-sdk-java
|
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java
|
AbstractAWSSigner.getTimeOffset
|
@Deprecated
protected int getTimeOffset(SignableRequest<?> request) {
final int globleOffset = SDKGlobalTime.getGlobalTimeOffset();
return globleOffset == 0 ? request.getTimeOffset() : globleOffset;
}
|
java
|
@Deprecated
protected int getTimeOffset(SignableRequest<?> request) {
final int globleOffset = SDKGlobalTime.getGlobalTimeOffset();
return globleOffset == 0 ? request.getTimeOffset() : globleOffset;
}
|
[
"@",
"Deprecated",
"protected",
"int",
"getTimeOffset",
"(",
"SignableRequest",
"<",
"?",
">",
"request",
")",
"{",
"final",
"int",
"globleOffset",
"=",
"SDKGlobalTime",
".",
"getGlobalTimeOffset",
"(",
")",
";",
"return",
"globleOffset",
"==",
"0",
"?",
"request",
".",
"getTimeOffset",
"(",
")",
":",
"globleOffset",
";",
"}"
] |
Returns the time offset in seconds.
|
[
"Returns",
"the",
"time",
"offset",
"in",
"seconds",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java#L461-L465
|
20,091
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.createConfigurationSet
|
@Override
public CreateConfigurationSetResult createConfigurationSet(CreateConfigurationSetRequest request) {
request = beforeClientExecution(request);
return executeCreateConfigurationSet(request);
}
|
java
|
@Override
public CreateConfigurationSetResult createConfigurationSet(CreateConfigurationSetRequest request) {
request = beforeClientExecution(request);
return executeCreateConfigurationSet(request);
}
|
[
"@",
"Override",
"public",
"CreateConfigurationSetResult",
"createConfigurationSet",
"(",
"CreateConfigurationSetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateConfigurationSet",
"(",
"request",
")",
";",
"}"
] |
Create a new configuration set. After you create the configuration set, you can add one or more event
destinations to it.
@param createConfigurationSetRequest
A request to create a new configuration set.
@return Result of the CreateConfigurationSet operation returned by the service.
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws LimitExceededException
LimitExceededException
@throws InternalServiceErrorException
InternalServiceErrorException
@throws AlreadyExistsException
AlreadyExistsException
@sample AmazonPinpointSMSVoice.CreateConfigurationSet
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/CreateConfigurationSet"
target="_top">AWS API Documentation</a>
|
[
"Create",
"a",
"new",
"configuration",
"set",
".",
"After",
"you",
"create",
"the",
"configuration",
"set",
"you",
"can",
"add",
"one",
"or",
"more",
"event",
"destinations",
"to",
"it",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L165-L169
|
20,092
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.createConfigurationSetEventDestination
|
@Override
public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeCreateConfigurationSetEventDestination(request);
}
|
java
|
@Override
public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeCreateConfigurationSetEventDestination(request);
}
|
[
"@",
"Override",
"public",
"CreateConfigurationSetEventDestinationResult",
"createConfigurationSetEventDestination",
"(",
"CreateConfigurationSetEventDestinationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeCreateConfigurationSetEventDestination",
"(",
"request",
")",
";",
"}"
] |
Create a new event destination in a configuration set.
@param createConfigurationSetEventDestinationRequest
Create a new event destination in a configuration set.
@return Result of the CreateConfigurationSetEventDestination operation returned by the service.
@throws BadRequestException
BadRequestException
@throws LimitExceededException
LimitExceededException
@throws InternalServiceErrorException
InternalServiceErrorException
@throws NotFoundException
NotFoundException
@throws TooManyRequestsException
TooManyRequestsException
@throws AlreadyExistsException
AlreadyExistsException
@sample AmazonPinpointSMSVoice.CreateConfigurationSetEventDestination
@see <a
href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/CreateConfigurationSetEventDestination"
target="_top">AWS API Documentation</a>
|
[
"Create",
"a",
"new",
"event",
"destination",
"in",
"a",
"configuration",
"set",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L230-L234
|
20,093
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.deleteConfigurationSet
|
@Override
public DeleteConfigurationSetResult deleteConfigurationSet(DeleteConfigurationSetRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfigurationSet(request);
}
|
java
|
@Override
public DeleteConfigurationSetResult deleteConfigurationSet(DeleteConfigurationSetRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfigurationSet(request);
}
|
[
"@",
"Override",
"public",
"DeleteConfigurationSetResult",
"deleteConfigurationSet",
"(",
"DeleteConfigurationSetRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteConfigurationSet",
"(",
"request",
")",
";",
"}"
] |
Deletes an existing configuration set.
@param deleteConfigurationSetRequest
@return Result of the DeleteConfigurationSet operation returned by the service.
@throws NotFoundException
NotFoundException
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws InternalServiceErrorException
InternalServiceErrorException
@sample AmazonPinpointSMSVoice.DeleteConfigurationSet
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSet"
target="_top">AWS API Documentation</a>
|
[
"Deletes",
"an",
"existing",
"configuration",
"set",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L291-L295
|
20,094
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.deleteConfigurationSetEventDestination
|
@Override
public DeleteConfigurationSetEventDestinationResult deleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfigurationSetEventDestination(request);
}
|
java
|
@Override
public DeleteConfigurationSetEventDestinationResult deleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfigurationSetEventDestination(request);
}
|
[
"@",
"Override",
"public",
"DeleteConfigurationSetEventDestinationResult",
"deleteConfigurationSetEventDestination",
"(",
"DeleteConfigurationSetEventDestinationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeDeleteConfigurationSetEventDestination",
"(",
"request",
")",
";",
"}"
] |
Deletes an event destination in a configuration set.
@param deleteConfigurationSetEventDestinationRequest
@return Result of the DeleteConfigurationSetEventDestination operation returned by the service.
@throws NotFoundException
NotFoundException
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws InternalServiceErrorException
InternalServiceErrorException
@sample AmazonPinpointSMSVoice.DeleteConfigurationSetEventDestination
@see <a
href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSetEventDestination"
target="_top">AWS API Documentation</a>
|
[
"Deletes",
"an",
"event",
"destination",
"in",
"a",
"configuration",
"set",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L351-L355
|
20,095
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.listConfigurationSets
|
@Override
public ListConfigurationSetsResult listConfigurationSets(ListConfigurationSetsRequest request) {
request = beforeClientExecution(request);
return executeListConfigurationSets(request);
}
|
java
|
@Override
public ListConfigurationSetsResult listConfigurationSets(ListConfigurationSetsRequest request) {
request = beforeClientExecution(request);
return executeListConfigurationSets(request);
}
|
[
"@",
"Override",
"public",
"ListConfigurationSetsResult",
"listConfigurationSets",
"(",
"ListConfigurationSetsRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeListConfigurationSets",
"(",
"request",
")",
";",
"}"
] |
List all of the configuration sets associated with your Amazon Pinpoint account in the current region.
@param listConfigurationSetsRequest
@return Result of the ListConfigurationSets operation returned by the service.
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws InternalServiceErrorException
InternalServiceErrorException
@sample AmazonPinpointSMSVoice.ListConfigurationSets
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/ListConfigurationSets"
target="_top">AWS API Documentation</a>
|
[
"List",
"all",
"of",
"the",
"configuration",
"sets",
"associated",
"with",
"your",
"Amazon",
"Pinpoint",
"account",
"in",
"the",
"current",
"region",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L473-L477
|
20,096
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.sendVoiceMessage
|
@Override
public SendVoiceMessageResult sendVoiceMessage(SendVoiceMessageRequest request) {
request = beforeClientExecution(request);
return executeSendVoiceMessage(request);
}
|
java
|
@Override
public SendVoiceMessageResult sendVoiceMessage(SendVoiceMessageRequest request) {
request = beforeClientExecution(request);
return executeSendVoiceMessage(request);
}
|
[
"@",
"Override",
"public",
"SendVoiceMessageResult",
"sendVoiceMessage",
"(",
"SendVoiceMessageRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeSendVoiceMessage",
"(",
"request",
")",
";",
"}"
] |
Create a new voice message and send it to a recipient's phone number.
@param sendVoiceMessageRequest
SendVoiceMessageRequest
@return Result of the SendVoiceMessage operation returned by the service.
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws InternalServiceErrorException
InternalServiceErrorException
@sample AmazonPinpointSMSVoice.SendVoiceMessage
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/SendVoiceMessage"
target="_top">AWS API Documentation</a>
|
[
"Create",
"a",
"new",
"voice",
"message",
"and",
"send",
"it",
"to",
"a",
"recipient",
"s",
"phone",
"number",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L531-L535
|
20,097
|
aws/aws-sdk-java
|
aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java
|
AmazonPinpointSMSVoiceClient.updateConfigurationSetEventDestination
|
@Override
public UpdateConfigurationSetEventDestinationResult updateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeUpdateConfigurationSetEventDestination(request);
}
|
java
|
@Override
public UpdateConfigurationSetEventDestinationResult updateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request) {
request = beforeClientExecution(request);
return executeUpdateConfigurationSetEventDestination(request);
}
|
[
"@",
"Override",
"public",
"UpdateConfigurationSetEventDestinationResult",
"updateConfigurationSetEventDestination",
"(",
"UpdateConfigurationSetEventDestinationRequest",
"request",
")",
"{",
"request",
"=",
"beforeClientExecution",
"(",
"request",
")",
";",
"return",
"executeUpdateConfigurationSetEventDestination",
"(",
"request",
")",
";",
"}"
] |
Update an event destination in a configuration set. An event destination is a location that you publish
information about your voice calls to. For example, you can log an event to an Amazon CloudWatch destination when
a call fails.
@param updateConfigurationSetEventDestinationRequest
UpdateConfigurationSetEventDestinationRequest
@return Result of the UpdateConfigurationSetEventDestination operation returned by the service.
@throws NotFoundException
NotFoundException
@throws TooManyRequestsException
TooManyRequestsException
@throws BadRequestException
BadRequestException
@throws InternalServiceErrorException
InternalServiceErrorException
@sample AmazonPinpointSMSVoice.UpdateConfigurationSetEventDestination
@see <a
href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/UpdateConfigurationSetEventDestination"
target="_top">AWS API Documentation</a>
|
[
"Update",
"an",
"event",
"destination",
"in",
"a",
"configuration",
"set",
".",
"An",
"event",
"destination",
"is",
"a",
"location",
"that",
"you",
"publish",
"information",
"about",
"your",
"voice",
"calls",
"to",
".",
"For",
"example",
"you",
"can",
"log",
"an",
"event",
"to",
"an",
"Amazon",
"CloudWatch",
"destination",
"when",
"a",
"call",
"fails",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpointsmsvoice/src/main/java/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.java#L593-L597
|
20,098
|
aws/aws-sdk-java
|
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/HlsGroupSettings.java
|
HlsGroupSettings.setCaptionLanguageMappings
|
public void setCaptionLanguageMappings(java.util.Collection<CaptionLanguageMapping> captionLanguageMappings) {
if (captionLanguageMappings == null) {
this.captionLanguageMappings = null;
return;
}
this.captionLanguageMappings = new java.util.ArrayList<CaptionLanguageMapping>(captionLanguageMappings);
}
|
java
|
public void setCaptionLanguageMappings(java.util.Collection<CaptionLanguageMapping> captionLanguageMappings) {
if (captionLanguageMappings == null) {
this.captionLanguageMappings = null;
return;
}
this.captionLanguageMappings = new java.util.ArrayList<CaptionLanguageMapping>(captionLanguageMappings);
}
|
[
"public",
"void",
"setCaptionLanguageMappings",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"CaptionLanguageMapping",
">",
"captionLanguageMappings",
")",
"{",
"if",
"(",
"captionLanguageMappings",
"==",
"null",
")",
"{",
"this",
".",
"captionLanguageMappings",
"=",
"null",
";",
"return",
";",
"}",
"this",
".",
"captionLanguageMappings",
"=",
"new",
"java",
".",
"util",
".",
"ArrayList",
"<",
"CaptionLanguageMapping",
">",
"(",
"captionLanguageMappings",
")",
";",
"}"
] |
Mapping of up to 4 caption channels to caption languages. Is only meaningful if captionLanguageSetting is set to
"insert".
@param captionLanguageMappings
Mapping of up to 4 caption channels to caption languages. Is only meaningful if captionLanguageSetting is
set to "insert".
|
[
"Mapping",
"of",
"up",
"to",
"4",
"caption",
"channels",
"to",
"caption",
"languages",
".",
"Is",
"only",
"meaningful",
"if",
"captionLanguageSetting",
"is",
"set",
"to",
"insert",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/HlsGroupSettings.java#L384-L391
|
20,099
|
aws/aws-sdk-java
|
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
|
AmazonS3URI.parseVersionId
|
private static String parseVersionId(String query) {
if (query != null) {
String[] params = VERSION_ID_PATTERN.split(query);
for (String param : params) {
if (param.startsWith("versionId=")) {
return decode(param.substring(10));
}
}
}
return null;
}
|
java
|
private static String parseVersionId(String query) {
if (query != null) {
String[] params = VERSION_ID_PATTERN.split(query);
for (String param : params) {
if (param.startsWith("versionId=")) {
return decode(param.substring(10));
}
}
}
return null;
}
|
[
"private",
"static",
"String",
"parseVersionId",
"(",
"String",
"query",
")",
"{",
"if",
"(",
"query",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"params",
"=",
"VERSION_ID_PATTERN",
".",
"split",
"(",
"query",
")",
";",
"for",
"(",
"String",
"param",
":",
"params",
")",
"{",
"if",
"(",
"param",
".",
"startsWith",
"(",
"\"versionId=\"",
")",
")",
"{",
"return",
"decode",
"(",
"param",
".",
"substring",
"(",
"10",
")",
")",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}"
] |
Attempts to parse a versionId parameter from the query
string.
@param query the query string to parse (possibly null)
@return the versionId (possibly null)
|
[
"Attempts",
"to",
"parse",
"a",
"versionId",
"parameter",
"from",
"the",
"query",
"string",
"."
] |
aa38502458969b2d13a1c3665a56aba600e4dbd0
|
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L188-L198
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.