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
132,600
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.downloadFile
public void downloadFile(String bucketName, String srcFilename, Path destFilePath) throws IOException { // [START storage_download_file] // The name of the bucket to access // String bucketName = "my-bucket"; // The name of the remote file to download // String srcFilename = "file.txt"; ...
java
public void downloadFile(String bucketName, String srcFilename, Path destFilePath) throws IOException { // [START storage_download_file] // The name of the bucket to access // String bucketName = "my-bucket"; // The name of the remote file to download // String srcFilename = "file.txt"; ...
[ "public", "void", "downloadFile", "(", "String", "bucketName", ",", "String", "srcFilename", ",", "Path", "destFilePath", ")", "throws", "IOException", "{", "// [START storage_download_file]", "// The name of the bucket to access", "// String bucketName = \"my-bucket\";", "// T...
Example of downloading a file.
[ "Example", "of", "downloading", "a", "file", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1054-L1075
132,601
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.downloadFileUsingRequesterPays
public void downloadFileUsingRequesterPays( String projectId, String bucketName, String srcFilename, Path destFilePath) throws IOException { // [START storage_download_file_requester_pays] // The project ID to bill // String projectId = "my-billable-project-id"; // The name of the bucket to...
java
public void downloadFileUsingRequesterPays( String projectId, String bucketName, String srcFilename, Path destFilePath) throws IOException { // [START storage_download_file_requester_pays] // The project ID to bill // String projectId = "my-billable-project-id"; // The name of the bucket to...
[ "public", "void", "downloadFileUsingRequesterPays", "(", "String", "projectId", ",", "String", "bucketName", ",", "String", "srcFilename", ",", "Path", "destFilePath", ")", "throws", "IOException", "{", "// [START storage_download_file_requester_pays]", "// The project ID to ...
Example of downloading a file using Requester pay.
[ "Example", "of", "downloading", "a", "file", "using", "Requester", "pay", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1078-L1103
132,602
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.setDefaultKmsKey
public Bucket setDefaultKmsKey(String bucketName, String kmsKeyName) throws StorageException { // [START storage_set_bucket_default_kms_key] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of the existing bucket to set a defau...
java
public Bucket setDefaultKmsKey(String bucketName, String kmsKeyName) throws StorageException { // [START storage_set_bucket_default_kms_key] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of the existing bucket to set a defau...
[ "public", "Bucket", "setDefaultKmsKey", "(", "String", "bucketName", ",", "String", "kmsKeyName", ")", "throws", "StorageException", "{", "// [START storage_set_bucket_default_kms_key]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ...
Example of setting a default KMS key on a bucket.
[ "Example", "of", "setting", "a", "default", "KMS", "key", "on", "a", "bucket", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1106-L1127
132,603
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.setRetentionPolicy
public Bucket setRetentionPolicy(String bucketName, Long retentionPeriod) throws StorageException { // [START storage_set_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" ...
java
public Bucket setRetentionPolicy(String bucketName, Long retentionPeriod) throws StorageException { // [START storage_set_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" ...
[ "public", "Bucket", "setRetentionPolicy", "(", "String", "bucketName", ",", "Long", "retentionPeriod", ")", "throws", "StorageException", "{", "// [START storage_set_retention_policy]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ...
Example of setting a retention policy on a bucket
[ "Example", "of", "setting", "a", "retention", "policy", "on", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1186-L1209
132,604
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.removeRetentionPolicy
public Bucket removeRetentionPolicy(String bucketName) throws StorageException, IllegalArgumentException { // [START storage_remove_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-...
java
public Bucket removeRetentionPolicy(String bucketName) throws StorageException, IllegalArgumentException { // [START storage_remove_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-...
[ "public", "Bucket", "removeRetentionPolicy", "(", "String", "bucketName", ")", "throws", "StorageException", ",", "IllegalArgumentException", "{", "// [START storage_remove_retention_policy]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOption...
Example of removing a retention policy on a bucket
[ "Example", "of", "removing", "a", "retention", "policy", "on", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1212-L1233
132,605
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.getRetentionPolicy
public Bucket getRetentionPolicy(String bucketName) throws StorageException { // [START storage_get_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = "my...
java
public Bucket getRetentionPolicy(String bucketName) throws StorageException { // [START storage_get_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = "my...
[ "public", "Bucket", "getRetentionPolicy", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_get_retention_policy]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstance", "(", ...
Example of how to get a bucket's retention policy
[ "Example", "of", "how", "to", "get", "a", "bucket", "s", "retention", "policy" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1236-L1256
132,606
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.lockRetentionPolicy
public Bucket lockRetentionPolicy(String bucketName) throws StorageException { // [START storage_lock_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = "...
java
public Bucket lockRetentionPolicy(String bucketName) throws StorageException { // [START storage_lock_retention_policy] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = "...
[ "public", "Bucket", "lockRetentionPolicy", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_lock_retention_policy]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstance", "(",...
Example of how to lock a bucket retention policy
[ "Example", "of", "how", "to", "lock", "a", "bucket", "retention", "policy" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1259-L1277
132,607
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.enableDefaultEventBasedHold
public Bucket enableDefaultEventBasedHold(String bucketName) throws StorageException { // [START storage_enable_default_event_based_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // Str...
java
public Bucket enableDefaultEventBasedHold(String bucketName) throws StorageException { // [START storage_enable_default_event_based_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // Str...
[ "public", "Bucket", "enableDefaultEventBasedHold", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_enable_default_event_based_hold]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaul...
Example of how to enable default event-based hold for a bucket
[ "Example", "of", "how", "to", "enable", "default", "event", "-", "based", "hold", "for", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1280-L1294
132,608
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.getDefaultEventBasedHold
public Bucket getDefaultEventBasedHold(String bucketName) throws StorageException { // [START storage_get_default_event_based_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bu...
java
public Bucket getDefaultEventBasedHold(String bucketName) throws StorageException { // [START storage_get_default_event_based_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bu...
[ "public", "Bucket", "getDefaultEventBasedHold", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_get_default_event_based_hold]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInsta...
Example of how to get default event-based hold for a bucket
[ "Example", "of", "how", "to", "get", "default", "event", "-", "based", "hold", "for", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1314-L1332
132,609
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.setTemporaryHold
public Blob setTemporaryHold(String bucketName, String blobName) throws StorageException { // [START storage_set_temporary_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucke...
java
public Blob setTemporaryHold(String bucketName, String blobName) throws StorageException { // [START storage_set_temporary_hold] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucke...
[ "public", "Blob", "setTemporaryHold", "(", "String", "bucketName", ",", "String", "blobName", ")", "throws", "StorageException", "{", "// [START storage_set_temporary_hold]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "ge...
Example of how to set a temporary hold for a blob
[ "Example", "of", "how", "to", "set", "a", "temporary", "hold", "for", "a", "blob" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1375-L1392
132,610
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.enableBucketPolicyOnly
public Bucket enableBucketPolicyOnly(String bucketName) throws StorageException { // [START storage_enable_bucket_policy_only] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketN...
java
public Bucket enableBucketPolicyOnly(String bucketName) throws StorageException { // [START storage_enable_bucket_policy_only] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketN...
[ "public", "Bucket", "enableBucketPolicyOnly", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_enable_bucket_policy_only]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstance",...
Example of how to enable Bucket Policy Only for a bucket
[ "Example", "of", "how", "to", "enable", "Bucket", "Policy", "Only", "for", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1415-L1432
132,611
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.getBucketPolicyOnly
public Bucket getBucketPolicyOnly(String bucketName) throws StorageException { // [START storage_get_bucket_policy_only] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = ...
java
public Bucket getBucketPolicyOnly(String bucketName) throws StorageException { // [START storage_get_bucket_policy_only] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-bucket" // String bucketName = ...
[ "public", "Bucket", "getBucketPolicyOnly", "(", "String", "bucketName", ")", "throws", "StorageException", "{", "// [START storage_get_bucket_policy_only]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstance", "("...
Example of how to get Bucket Policy Only metadata for a bucket
[ "Example", "of", "how", "to", "get", "Bucket", "Policy", "Only", "metadata", "for", "a", "bucket" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1455-L1477
132,612
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.generateV4GetObjectSignedUrl
public URL generateV4GetObjectSignedUrl(String bucketName, String objectName) throws StorageException { // [START storage_generate_signed_url_v4] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-buck...
java
public URL generateV4GetObjectSignedUrl(String bucketName, String objectName) throws StorageException { // [START storage_generate_signed_url_v4] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "my-buck...
[ "public", "URL", "generateV4GetObjectSignedUrl", "(", "String", "bucketName", ",", "String", "objectName", ")", "throws", "StorageException", "{", "// [START storage_generate_signed_url_v4]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "StorageOptio...
Example of how to generate a GET V4 Signed URL
[ "Example", "of", "how", "to", "generate", "a", "GET", "V4", "Signed", "URL" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1480-L1505
132,613
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java
StorageSnippets.generateV4GPutbjectSignedUrl
public URL generateV4GPutbjectSignedUrl(String bucketName, String objectName) throws StorageException { // [START storage_generate_upload_signed_url_v4] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "...
java
public URL generateV4GPutbjectSignedUrl(String bucketName, String objectName) throws StorageException { // [START storage_generate_upload_signed_url_v4] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // The name of a bucket, e.g. "...
[ "public", "URL", "generateV4GPutbjectSignedUrl", "(", "String", "bucketName", ",", "String", "objectName", ")", "throws", "StorageException", "{", "// [START storage_generate_upload_signed_url_v4]", "// Instantiate a Google Cloud Storage client", "Storage", "storage", "=", "Stora...
Example of how to generate a PUT V4 Signed URL
[ "Example", "of", "how", "to", "generate", "a", "PUT", "V4", "Signed", "URL" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java#L1508-L1545
132,614
googleapis/google-cloud-java
google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java
LanguageServiceClient.classifyText
public final ClassifyTextResponse classifyText(Document document) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build(); return classifyText(request); }
java
public final ClassifyTextResponse classifyText(Document document) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build(); return classifyText(request); }
[ "public", "final", "ClassifyTextResponse", "classifyText", "(", "Document", "document", ")", "{", "ClassifyTextRequest", "request", "=", "ClassifyTextRequest", ".", "newBuilder", "(", ")", ".", "setDocument", "(", "document", ")", ".", "build", "(", ")", ";", "r...
Classifies a document into categories. <p>Sample code: <pre><code> try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); ClassifyTextResponse response = languageServiceClient.classifyText(document); } </code></pre> @param document Inpu...
[ "Classifies", "a", "document", "into", "categories", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java#L470-L474
132,615
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreException.java
DatastoreException.translateAndThrow
static DatastoreException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DatastoreException(UNKNOWN_CODE, ex.getMessage(), null, ex.getCause()); }
java
static DatastoreException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DatastoreException(UNKNOWN_CODE, ex.getMessage(), null, ex.getCause()); }
[ "static", "DatastoreException", "translateAndThrow", "(", "RetryHelperException", "ex", ")", "{", "BaseServiceException", ".", "translate", "(", "ex", ")", ";", "throw", "new", "DatastoreException", "(", "UNKNOWN_CODE", ",", "ex", ".", "getMessage", "(", ")", ",",...
Translate RetryHelperException to the DatastoreException that caused the error. This method will always throw an exception. @throws DatastoreException when {@code ex} was caused by a {@code DatastoreException}
[ "Translate", "RetryHelperException", "to", "the", "DatastoreException", "that", "caused", "the", "error", ".", "This", "method", "will", "always", "throw", "an", "exception", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreException.java#L65-L68
132,616
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldMask.java
FieldMask.of
@Nonnull public static FieldMask of(String... fieldPaths) { List<FieldPath> paths = new ArrayList<>(); for (String fieldPath : fieldPaths) { paths.add(FieldPath.fromDotSeparatedString(fieldPath)); } return new FieldMask(paths); }
java
@Nonnull public static FieldMask of(String... fieldPaths) { List<FieldPath> paths = new ArrayList<>(); for (String fieldPath : fieldPaths) { paths.add(FieldPath.fromDotSeparatedString(fieldPath)); } return new FieldMask(paths); }
[ "@", "Nonnull", "public", "static", "FieldMask", "of", "(", "String", "...", "fieldPaths", ")", "{", "List", "<", "FieldPath", ">", "paths", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "String", "fieldPath", ":", "fieldPaths", ")", "{", "...
Creates a FieldMask from the provided field paths. @param fieldPaths A list of field paths. @return A {@code FieldMask} that describes a subset of fields.
[ "Creates", "a", "FieldMask", "from", "the", "provided", "field", "paths", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldMask.java#L48-L55
132,617
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
Field.of
public static Field of(String name, LegacySQLTypeName type, Field... subFields) { return newBuilder(name, type, subFields).build(); }
java
public static Field of(String name, LegacySQLTypeName type, Field... subFields) { return newBuilder(name, type, subFields).build(); }
[ "public", "static", "Field", "of", "(", "String", "name", ",", "LegacySQLTypeName", "type", ",", "Field", "...", "subFields", ")", "{", "return", "newBuilder", "(", "name", ",", "type", ",", "subFields", ")", ".", "build", "(", ")", ";", "}" ]
Returns a Field object with given name and type.
[ "Returns", "a", "Field", "object", "with", "given", "name", "and", "type", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java#L264-L266
132,618
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java
Field.newBuilder
public static Builder newBuilder(String name, LegacySQLTypeName type, Field... subFields) { return new Builder().setName(name).setType(type, subFields); }
java
public static Builder newBuilder(String name, LegacySQLTypeName type, Field... subFields) { return new Builder().setName(name).setType(type, subFields); }
[ "public", "static", "Builder", "newBuilder", "(", "String", "name", ",", "LegacySQLTypeName", "type", ",", "Field", "...", "subFields", ")", "{", "return", "new", "Builder", "(", ")", ".", "setName", "(", "name", ")", ".", "setType", "(", "type", ",", "s...
Returns a builder for a Field object with given name and type.
[ "Returns", "a", "builder", "for", "a", "Field", "object", "with", "given", "name", "and", "type", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Field.java#L274-L276
132,619
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java
HelloWorld.createTable
public void createTable() { // [START bigtable_hw_create_table_veneer] // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Creating table: " + tableId); CreateTableRequest createTableRequest = CreateTableRequest.of(tableId...
java
public void createTable() { // [START bigtable_hw_create_table_veneer] // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Creating table: " + tableId); CreateTableRequest createTableRequest = CreateTableRequest.of(tableId...
[ "public", "void", "createTable", "(", ")", "{", "// [START bigtable_hw_create_table_veneer]", "// Checks if table exists, creates table if does not exist.", "if", "(", "!", "adminClient", ".", "exists", "(", "tableId", ")", ")", "{", "System", ".", "out", ".", "println"...
Demonstrates how to create a table.
[ "Demonstrates", "how", "to", "create", "a", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java#L103-L114
132,620
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java
HelloWorld.writeToTable
public void writeToTable() { // [START bigtable_hw_write_rows_veneer] try { System.out.println("\nWriting some greetings to the table"); String[] greetings = {"Hello World!", "Hello Bigtable!", "Hello Java!"}; for (int i = 0; i < greetings.length; i++) { RowMutation rowMutation = ...
java
public void writeToTable() { // [START bigtable_hw_write_rows_veneer] try { System.out.println("\nWriting some greetings to the table"); String[] greetings = {"Hello World!", "Hello Bigtable!", "Hello Java!"}; for (int i = 0; i < greetings.length; i++) { RowMutation rowMutation = ...
[ "public", "void", "writeToTable", "(", ")", "{", "// [START bigtable_hw_write_rows_veneer]", "try", "{", "System", ".", "out", ".", "println", "(", "\"\\nWriting some greetings to the table\"", ")", ";", "String", "[", "]", "greetings", "=", "{", "\"Hello World!\"", ...
Demonstrates how to write some rows to a table.
[ "Demonstrates", "how", "to", "write", "some", "rows", "to", "a", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java#L117-L133
132,621
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java
HelloWorld.readSingleRow
public void readSingleRow() { // [START bigtable_hw_get_by_key_veneer] try { System.out.println("\nReading a single row by row key"); Row row = dataClient.readRow(tableId, ROW_KEY_PREFIX + 0); System.out.println("Row: " + row.getKey().toStringUtf8()); for (RowCell cell : row.getCells()) ...
java
public void readSingleRow() { // [START bigtable_hw_get_by_key_veneer] try { System.out.println("\nReading a single row by row key"); Row row = dataClient.readRow(tableId, ROW_KEY_PREFIX + 0); System.out.println("Row: " + row.getKey().toStringUtf8()); for (RowCell cell : row.getCells()) ...
[ "public", "void", "readSingleRow", "(", ")", "{", "// [START bigtable_hw_get_by_key_veneer]", "try", "{", "System", ".", "out", ".", "println", "(", "\"\\nReading a single row by row key\"", ")", ";", "Row", "row", "=", "dataClient", ".", "readRow", "(", "tableId", ...
Demonstrates how to read a single row from a table.
[ "Demonstrates", "how", "to", "read", "a", "single", "row", "from", "a", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java#L136-L151
132,622
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java
HelloWorld.readTable
public void readTable() { // [START bigtable_hw_scan_all_veneer] try { System.out.println("\nReading the entire table"); Query query = Query.create(tableId); ServerStream<Row> rowStream = dataClient.readRows(query); for (Row r : rowStream) { System.out.println("Row Key: " + r.get...
java
public void readTable() { // [START bigtable_hw_scan_all_veneer] try { System.out.println("\nReading the entire table"); Query query = Query.create(tableId); ServerStream<Row> rowStream = dataClient.readRows(query); for (Row r : rowStream) { System.out.println("Row Key: " + r.get...
[ "public", "void", "readTable", "(", ")", "{", "// [START bigtable_hw_scan_all_veneer]", "try", "{", "System", ".", "out", ".", "println", "(", "\"\\nReading the entire table\"", ")", ";", "Query", "query", "=", "Query", ".", "create", "(", "tableId", ")", ";", ...
Demonstrates how to read an entire table.
[ "Demonstrates", "how", "to", "read", "an", "entire", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/HelloWorld.java#L154-L172
132,623
googleapis/google-cloud-java
google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java
TenantServiceClient.updateTenant
public final Tenant updateTenant(Tenant tenant) { UpdateTenantRequest request = UpdateTenantRequest.newBuilder().setTenant(tenant).build(); return updateTenant(request); }
java
public final Tenant updateTenant(Tenant tenant) { UpdateTenantRequest request = UpdateTenantRequest.newBuilder().setTenant(tenant).build(); return updateTenant(request); }
[ "public", "final", "Tenant", "updateTenant", "(", "Tenant", "tenant", ")", "{", "UpdateTenantRequest", "request", "=", "UpdateTenantRequest", ".", "newBuilder", "(", ")", ".", "setTenant", "(", "tenant", ")", ".", "build", "(", ")", ";", "return", "updateTenan...
Updates specified tenant. <p>Sample code: <pre><code> try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) { Tenant tenant = Tenant.newBuilder().build(); Tenant response = tenantServiceClient.updateTenant(tenant); } </code></pre> @param tenant Required. <p>The tenant resource to replace the c...
[ "Updates", "specified", "tenant", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java#L379-L383
132,624
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/PageImpl.java
PageImpl.nextRequestOptions
public static <T> Map<T, Object> nextRequestOptions( T pageTokenOption, String cursor, Map<T, ?> optionMap) { ImmutableMap.Builder<T, Object> builder = ImmutableMap.builder(); if (cursor != null) { builder.put(pageTokenOption, cursor); } for (Map.Entry<T, ?> option : optionMap.entrySet()) { ...
java
public static <T> Map<T, Object> nextRequestOptions( T pageTokenOption, String cursor, Map<T, ?> optionMap) { ImmutableMap.Builder<T, Object> builder = ImmutableMap.builder(); if (cursor != null) { builder.put(pageTokenOption, cursor); } for (Map.Entry<T, ?> option : optionMap.entrySet()) { ...
[ "public", "static", "<", "T", ">", "Map", "<", "T", ",", "Object", ">", "nextRequestOptions", "(", "T", "pageTokenOption", ",", "String", "cursor", ",", "Map", "<", "T", ",", "?", ">", "optionMap", ")", "{", "ImmutableMap", ".", "Builder", "<", "T", ...
Utility method to construct the options map for the next page request. @param <T> the value type that the page holds. Instances of {@code T} should be {@code Serializable} @param pageTokenOption the key for the next page cursor option in the options map @param cursor the cursor for the next page @param optionMap the p...
[ "Utility", "method", "to", "construct", "the", "options", "map", "for", "the", "next", "page", "request", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/PageImpl.java#L143-L155
132,625
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/JobId.java
JobId.of
public static JobId of(String project, String job) { return newBuilder().setProject(checkNotNull(project)).setJob(checkNotNull(job)).build(); }
java
public static JobId of(String project, String job) { return newBuilder().setProject(checkNotNull(project)).setJob(checkNotNull(job)).build(); }
[ "public", "static", "JobId", "of", "(", "String", "project", ",", "String", "job", ")", "{", "return", "newBuilder", "(", ")", ".", "setProject", "(", "checkNotNull", "(", "project", ")", ")", ".", "setJob", "(", "checkNotNull", "(", "job", ")", ")", "...
Creates a job identity given project's and job's user-defined id.
[ "Creates", "a", "job", "identity", "given", "project", "s", "and", "job", "s", "user", "-", "defined", "id", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/JobId.java#L86-L88
132,626
googleapis/google-cloud-java
google-cloud-clients/google-cloud-os-login/src/main/java/com/google/cloud/oslogin/v1/OsLoginServiceClient.java
OsLoginServiceClient.importSshPublicKey
public final ImportSshPublicKeyResponse importSshPublicKey( UserName parent, SshPublicKey sshPublicKey) { ImportSshPublicKeyRequest request = ImportSshPublicKeyRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setSshPublicKey(sshPublicKey) ...
java
public final ImportSshPublicKeyResponse importSshPublicKey( UserName parent, SshPublicKey sshPublicKey) { ImportSshPublicKeyRequest request = ImportSshPublicKeyRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setSshPublicKey(sshPublicKey) ...
[ "public", "final", "ImportSshPublicKeyResponse", "importSshPublicKey", "(", "UserName", "parent", ",", "SshPublicKey", "sshPublicKey", ")", "{", "ImportSshPublicKeyRequest", "request", "=", "ImportSshPublicKeyRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", ...
Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile. <p>Sample code: <pre><code> try (OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.create()) { UserName parent = UserName.of("[USER]"); SshPu...
[ "Adds", "an", "SSH", "public", "key", "and", "returns", "the", "profile", "information", ".", "Default", "POSIX", "account", "information", "is", "set", "when", "no", "username", "and", "UID", "exist", "as", "part", "of", "the", "login", "profile", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-os-login/src/main/java/com/google/cloud/oslogin/v1/OsLoginServiceClient.java#L554-L563
132,627
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/SignatureInfo.java
SignatureInfo.constructUnsignedPayload
public String constructUnsignedPayload() { // TODO reverse order when V4 becomes default if (Storage.SignUrlOption.SignatureVersion.V4.equals(signatureVersion)) { return constructV4UnsignedPayload(); } return constructV2UnsignedPayload(); }
java
public String constructUnsignedPayload() { // TODO reverse order when V4 becomes default if (Storage.SignUrlOption.SignatureVersion.V4.equals(signatureVersion)) { return constructV4UnsignedPayload(); } return constructV2UnsignedPayload(); }
[ "public", "String", "constructUnsignedPayload", "(", ")", "{", "// TODO reverse order when V4 becomes default", "if", "(", "Storage", ".", "SignUrlOption", ".", "SignatureVersion", ".", "V4", ".", "equals", "(", "signatureVersion", ")", ")", "{", "return", "constructV...
Constructs payload to be signed. @return payload to sign @see <a href="https://cloud.google.com/storage/docs/access-control#Signed-URLs">Signed URLs</a>
[ "Constructs", "payload", "to", "be", "signed", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/SignatureInfo.java#L97-L103
132,628
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/TraceLoggingEnhancer.java
TraceLoggingEnhancer.setCurrentTraceId
public static void setCurrentTraceId(String id) { if (id == null) { traceId.remove(); } else { traceId.set(id); } }
java
public static void setCurrentTraceId(String id) { if (id == null) { traceId.remove(); } else { traceId.set(id); } }
[ "public", "static", "void", "setCurrentTraceId", "(", "String", "id", ")", "{", "if", "(", "id", "==", "null", ")", "{", "traceId", ".", "remove", "(", ")", ";", "}", "else", "{", "traceId", ".", "set", "(", "id", ")", ";", "}", "}" ]
Set the Trace ID associated with any logging done by the current thread. @param id The traceID, in the form projects/[PROJECT_ID]/traces/[TRACE_ID]
[ "Set", "the", "Trace", "ID", "associated", "with", "any", "logging", "done", "by", "the", "current", "thread", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/TraceLoggingEnhancer.java#L40-L46
132,629
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java
CopyJobConfiguration.newBuilder
public static Builder newBuilder(TableId destinationTable, TableId sourceTable) { return newBuilder(destinationTable, ImmutableList.of(checkNotNull(sourceTable))); }
java
public static Builder newBuilder(TableId destinationTable, TableId sourceTable) { return newBuilder(destinationTable, ImmutableList.of(checkNotNull(sourceTable))); }
[ "public", "static", "Builder", "newBuilder", "(", "TableId", "destinationTable", ",", "TableId", "sourceTable", ")", "{", "return", "newBuilder", "(", "destinationTable", ",", "ImmutableList", ".", "of", "(", "checkNotNull", "(", "sourceTable", ")", ")", ")", ";...
Creates a builder for a BigQuery Copy Job configuration given destination and source table.
[ "Creates", "a", "builder", "for", "a", "BigQuery", "Copy", "Job", "configuration", "given", "destination", "and", "source", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java#L255-L257
132,630
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java
CopyJobConfiguration.newBuilder
public static Builder newBuilder(TableId destinationTable, List<TableId> sourceTables) { return new Builder().setDestinationTable(destinationTable).setSourceTables(sourceTables); }
java
public static Builder newBuilder(TableId destinationTable, List<TableId> sourceTables) { return new Builder().setDestinationTable(destinationTable).setSourceTables(sourceTables); }
[ "public", "static", "Builder", "newBuilder", "(", "TableId", "destinationTable", ",", "List", "<", "TableId", ">", "sourceTables", ")", "{", "return", "new", "Builder", "(", ")", ".", "setDestinationTable", "(", "destinationTable", ")", ".", "setSourceTables", "...
Creates a builder for a BigQuery Copy Job configuration given destination and source tables.
[ "Creates", "a", "builder", "for", "a", "BigQuery", "Copy", "Job", "configuration", "given", "destination", "and", "source", "tables", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java#L262-L264
132,631
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java
CopyJobConfiguration.of
public static CopyJobConfiguration of(TableId destinationTable, TableId sourceTable) { return newBuilder(destinationTable, sourceTable).build(); }
java
public static CopyJobConfiguration of(TableId destinationTable, TableId sourceTable) { return newBuilder(destinationTable, sourceTable).build(); }
[ "public", "static", "CopyJobConfiguration", "of", "(", "TableId", "destinationTable", ",", "TableId", "sourceTable", ")", "{", "return", "newBuilder", "(", "destinationTable", ",", "sourceTable", ")", ".", "build", "(", ")", ";", "}" ]
Returns a BigQuery Copy Job configuration for the given destination and source table.
[ "Returns", "a", "BigQuery", "Copy", "Job", "configuration", "for", "the", "given", "destination", "and", "source", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java#L267-L269
132,632
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java
CopyJobConfiguration.of
public static CopyJobConfiguration of(TableId destinationTable, List<TableId> sourceTables) { return newBuilder(destinationTable, sourceTables).build(); }
java
public static CopyJobConfiguration of(TableId destinationTable, List<TableId> sourceTables) { return newBuilder(destinationTable, sourceTables).build(); }
[ "public", "static", "CopyJobConfiguration", "of", "(", "TableId", "destinationTable", ",", "List", "<", "TableId", ">", "sourceTables", ")", "{", "return", "newBuilder", "(", "destinationTable", ",", "sourceTables", ")", ".", "build", "(", ")", ";", "}" ]
Returns a BigQuery Copy Job configuration for the given destination and source tables.
[ "Returns", "a", "BigQuery", "Copy", "Job", "configuration", "for", "the", "given", "destination", "and", "source", "tables", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java#L272-L274
132,633
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java
CloudStorageRetryHandler.handleStorageException
public boolean handleStorageException(final StorageException exs) throws StorageException { // None of the retryable exceptions are reopenable, so it's OK to write the code this way. if (isRetryable(exs)) { handleRetryForStorageException(exs); return false; } if (isReopenable(exs)) { h...
java
public boolean handleStorageException(final StorageException exs) throws StorageException { // None of the retryable exceptions are reopenable, so it's OK to write the code this way. if (isRetryable(exs)) { handleRetryForStorageException(exs); return false; } if (isReopenable(exs)) { h...
[ "public", "boolean", "handleStorageException", "(", "final", "StorageException", "exs", ")", "throws", "StorageException", "{", "// None of the retryable exceptions are reopenable, so it's OK to write the code this way.", "if", "(", "isRetryable", "(", "exs", ")", ")", "{", "...
Checks whether we should retry, reopen, or give up. <p>In the latter case it throws an exception (this includes the scenario where we exhausted the retry count). <p>Otherwise, it sleeps for a bit and returns whether we should reopen. The sleep time is dependent on the retry number. @param exs caught StorageException...
[ "Checks", "whether", "we", "should", "retry", "reopen", "or", "give", "up", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java#L112-L123
132,634
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java
CloudStorageRetryHandler.handleRetryForStorageException
private void handleRetryForStorageException(final StorageException exs) throws StorageException { retries++; if (retries > maxRetries) { throw new StorageException( exs.getCode(), "All " + maxRetries + " retries failed. Waited a total of " + to...
java
private void handleRetryForStorageException(final StorageException exs) throws StorageException { retries++; if (retries > maxRetries) { throw new StorageException( exs.getCode(), "All " + maxRetries + " retries failed. Waited a total of " + to...
[ "private", "void", "handleRetryForStorageException", "(", "final", "StorageException", "exs", ")", "throws", "StorageException", "{", "retries", "++", ";", "if", "(", "retries", ">", "maxRetries", ")", "{", "throw", "new", "StorageException", "(", "exs", ".", "g...
Records a retry attempt for the given StorageException, sleeping for an amount of time dependent on the attempt number. Throws a StorageException if we've exhausted all retries. @param exs The StorageException error that prompted this retry attempt.
[ "Records", "a", "retry", "attempt", "for", "the", "given", "StorageException", "sleeping", "for", "an", "amount", "of", "time", "dependent", "on", "the", "attempt", "number", ".", "Throws", "a", "StorageException", "if", "we", "ve", "exhausted", "all", "retrie...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java#L131-L144
132,635
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java
CloudStorageRetryHandler.handleReopenForStorageException
private void handleReopenForStorageException(final StorageException exs) throws StorageException { reopens++; if (reopens > maxReopens) { throw new StorageException( exs.getCode(), "All " + maxReopens + " reopens failed. Waited a total of " + t...
java
private void handleReopenForStorageException(final StorageException exs) throws StorageException { reopens++; if (reopens > maxReopens) { throw new StorageException( exs.getCode(), "All " + maxReopens + " reopens failed. Waited a total of " + t...
[ "private", "void", "handleReopenForStorageException", "(", "final", "StorageException", "exs", ")", "throws", "StorageException", "{", "reopens", "++", ";", "if", "(", "reopens", ">", "maxReopens", ")", "{", "throw", "new", "StorageException", "(", "exs", ".", "...
Records a reopen attempt for the given StorageException, sleeping for an amount of time dependent on the attempt number. Throws a StorageException if we've exhausted all reopens. @param exs The StorageException error that prompted this reopen attempt.
[ "Records", "a", "reopen", "attempt", "for", "the", "given", "StorageException", "sleeping", "for", "an", "amount", "of", "time", "dependent", "on", "the", "attempt", "number", ".", "Throws", "a", "StorageException", "if", "we", "ve", "exhausted", "all", "reope...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageRetryHandler.java#L152-L165
132,636
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java
Timestamp.now
public static Timestamp now() { java.sql.Timestamp date = new java.sql.Timestamp(System.currentTimeMillis()); return of(date); }
java
public static Timestamp now() { java.sql.Timestamp date = new java.sql.Timestamp(System.currentTimeMillis()); return of(date); }
[ "public", "static", "Timestamp", "now", "(", ")", "{", "java", ".", "sql", ".", "Timestamp", "date", "=", "new", "java", ".", "sql", ".", "Timestamp", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "return", "of", "(", "date", ")", ";",...
Creates an instance with current time.
[ "Creates", "an", "instance", "with", "current", "time", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java#L111-L114
132,637
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/IncompleteKey.java
IncompleteKey.getParent
@Override public Key getParent() { List<PathElement> ancestors = getAncestors(); if (ancestors.isEmpty()) { return null; } PathElement parent = ancestors.get(ancestors.size() - 1); Key.Builder keyBuilder; if (parent.hasName()) { keyBuilder = Key.newBuilder(getProjectId(), parent.ge...
java
@Override public Key getParent() { List<PathElement> ancestors = getAncestors(); if (ancestors.isEmpty()) { return null; } PathElement parent = ancestors.get(ancestors.size() - 1); Key.Builder keyBuilder; if (parent.hasName()) { keyBuilder = Key.newBuilder(getProjectId(), parent.ge...
[ "@", "Override", "public", "Key", "getParent", "(", ")", "{", "List", "<", "PathElement", ">", "ancestors", "=", "getAncestors", "(", ")", ";", "if", "(", "ancestors", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "PathElement", "pare...
Returns the key's parent.
[ "Returns", "the", "key", "s", "parent", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/IncompleteKey.java#L73-L91
132,638
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java
StringEnumType.createAndRegister
public EnumT createAndRegister(String constant) { EnumT instance = constructor.apply(constant); knownValues.put(constant, instance); return instance; }
java
public EnumT createAndRegister(String constant) { EnumT instance = constructor.apply(constant); knownValues.put(constant, instance); return instance; }
[ "public", "EnumT", "createAndRegister", "(", "String", "constant", ")", "{", "EnumT", "instance", "=", "constructor", ".", "apply", "(", "constant", ")", ";", "knownValues", ".", "put", "(", "constant", ",", "instance", ")", ";", "return", "instance", ";", ...
Create a new constant and register it in the known values.
[ "Create", "a", "new", "constant", "and", "register", "it", "in", "the", "known", "values", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java#L43-L47
132,639
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java
StringEnumType.valueOfStrict
public EnumT valueOfStrict(String constant) { EnumT value = knownValues.get(constant); if (value != null) { return value; } else { throw new IllegalArgumentException( "Constant \"" + constant + "\" not found for enum \"" + clazz.getName() + "\""); } }
java
public EnumT valueOfStrict(String constant) { EnumT value = knownValues.get(constant); if (value != null) { return value; } else { throw new IllegalArgumentException( "Constant \"" + constant + "\" not found for enum \"" + clazz.getName() + "\""); } }
[ "public", "EnumT", "valueOfStrict", "(", "String", "constant", ")", "{", "EnumT", "value", "=", "knownValues", ".", "get", "(", "constant", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ";", "}", "else", "{", "throw", "new", ...
Get the enum object for the given String constant, and throw an exception if the constant is not recognized.
[ "Get", "the", "enum", "object", "for", "the", "given", "String", "constant", "and", "throw", "an", "exception", "if", "the", "constant", "is", "not", "recognized", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java#L53-L61
132,640
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java
StringEnumType.valueOf
public EnumT valueOf(String constant) { if (constant == null || constant.isEmpty()) { throw new IllegalArgumentException("Empty enum constants not allowed."); } EnumT value = knownValues.get(constant); if (value != null) { return value; } else { return constructor.apply(constant); ...
java
public EnumT valueOf(String constant) { if (constant == null || constant.isEmpty()) { throw new IllegalArgumentException("Empty enum constants not allowed."); } EnumT value = knownValues.get(constant); if (value != null) { return value; } else { return constructor.apply(constant); ...
[ "public", "EnumT", "valueOf", "(", "String", "constant", ")", "{", "if", "(", "constant", "==", "null", "||", "constant", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Empty enum constants not allowed.\"", ")", ";", "}...
Get the enum object for the given String constant, and allow unrecognized values.
[ "Get", "the", "enum", "object", "for", "the", "given", "String", "constant", "and", "allow", "unrecognized", "values", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java#L64-L74
132,641
googleapis/google-cloud-java
google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java
StringEnumType.values
public EnumT[] values() { Collection<EnumT> valueCollection = knownValues.values(); @SuppressWarnings("unchecked") final EnumT[] valueArray = (EnumT[]) Array.newInstance(clazz, valueCollection.size()); int i = 0; for (EnumT enumV : valueCollection) { valueArray[i] = enumV; i++; } ...
java
public EnumT[] values() { Collection<EnumT> valueCollection = knownValues.values(); @SuppressWarnings("unchecked") final EnumT[] valueArray = (EnumT[]) Array.newInstance(clazz, valueCollection.size()); int i = 0; for (EnumT enumV : valueCollection) { valueArray[i] = enumV; i++; } ...
[ "public", "EnumT", "[", "]", "values", "(", ")", "{", "Collection", "<", "EnumT", ">", "valueCollection", "=", "knownValues", ".", "values", "(", ")", ";", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "final", "EnumT", "[", "]", "valueArray", "=", ...
Return the known values of this enum type.
[ "Return", "the", "known", "values", "of", "this", "enum", "type", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/StringEnumType.java#L77-L89
132,642
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.formatProductName
@Deprecated public static final String formatProductName(String project, String location, String product) { return PRODUCT_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product); }
java
@Deprecated public static final String formatProductName(String project, String location, String product) { return PRODUCT_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatProductName", "(", "String", "project", ",", "String", "location", ",", "String", "product", ")", "{", "return", "PRODUCT_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",", ...
Formats a string containing the fully-qualified path to represent a product resource. @deprecated Use the {@link ProductName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "product", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L163-L169
132,643
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.formatProductSetName
@Deprecated public static final String formatProductSetName( String project, String location, String productSet) { return PRODUCT_SET_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product_set", productSet); }
java
@Deprecated public static final String formatProductSetName( String project, String location, String productSet) { return PRODUCT_SET_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product_set", productSet); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatProductSetName", "(", "String", "project", ",", "String", "location", ",", "String", "productSet", ")", "{", "return", "PRODUCT_SET_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project...
Formats a string containing the fully-qualified path to represent a product_set resource. @deprecated Use the {@link ProductSetName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "product_set", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L176-L183
132,644
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.formatReferenceImageName
@Deprecated public static final String formatReferenceImageName( String project, String location, String product, String referenceImage) { return REFERENCE_IMAGE_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product, "reference_image", refere...
java
@Deprecated public static final String formatReferenceImageName( String project, String location, String product, String referenceImage) { return REFERENCE_IMAGE_PATH_TEMPLATE.instantiate( "project", project, "location", location, "product", product, "reference_image", refere...
[ "@", "Deprecated", "public", "static", "final", "String", "formatReferenceImageName", "(", "String", "project", ",", "String", "location", ",", "String", "product", ",", "String", "referenceImage", ")", "{", "return", "REFERENCE_IMAGE_PATH_TEMPLATE", ".", "instantiate...
Formats a string containing the fully-qualified path to represent a reference_image resource. @deprecated Use the {@link ReferenceImageName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "reference_image", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L190-L198
132,645
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.createProduct
public final Product createProduct(String parent, Product product, String productId) { CreateProductRequest request = CreateProductRequest.newBuilder() .setParent(parent) .setProduct(product) .setProductId(productId) .build(); return createProduct(request...
java
public final Product createProduct(String parent, Product product, String productId) { CreateProductRequest request = CreateProductRequest.newBuilder() .setParent(parent) .setProduct(product) .setProductId(productId) .build(); return createProduct(request...
[ "public", "final", "Product", "createProduct", "(", "String", "parent", ",", "Product", "product", ",", "String", "productId", ")", "{", "CreateProductRequest", "request", "=", "CreateProductRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ...
Creates and returns a new product resource. <p>Possible errors: <p>&#42; Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. &#42; Returns INVALID_ARGUMENT if description is longer than 4096 characters. &#42; Returns INVALID_ARGUMENT if product_category is missing or invalid. <p>Sampl...
[ "Creates", "and", "returns", "a", "new", "product", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L457-L466
132,646
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.updateProduct
public final Product updateProduct(Product product, FieldMask updateMask) { UpdateProductRequest request = UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); return updateProduct(request); }
java
public final Product updateProduct(Product product, FieldMask updateMask) { UpdateProductRequest request = UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); return updateProduct(request); }
[ "public", "final", "Product", "updateProduct", "(", "Product", "product", ",", "FieldMask", "updateMask", ")", "{", "UpdateProductRequest", "request", "=", "UpdateProductRequest", ".", "newBuilder", "(", ")", ".", "setProduct", "(", "product", ")", ".", "setUpdate...
Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` fields can be updated right now. <p>If labels are updated, the change will not be reflected in queries until the next index time. <p>Possible errors: <p>&#42; Returns NOT_FOUND if the Product does not exist. &#42; Returns INVAL...
[ "Makes", "changes", "to", "a", "Product", "resource", ".", "Only", "the", "display_name", "description", "and", "labels", "fields", "can", "be", "updated", "right", "now", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L822-L827
132,647
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.createReferenceImage
public final ReferenceImage createReferenceImage( ProductName parent, ReferenceImage referenceImage, String referenceImageId) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setReferenceIma...
java
public final ReferenceImage createReferenceImage( ProductName parent, ReferenceImage referenceImage, String referenceImageId) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setReferenceIma...
[ "public", "final", "ReferenceImage", "createReferenceImage", "(", "ProductName", "parent", ",", "ReferenceImage", "referenceImage", ",", "String", "referenceImageId", ")", "{", "CreateReferenceImageRequest", "request", "=", "CreateReferenceImageRequest", ".", "newBuilder", ...
Creates and returns a new ReferenceImage resource. <p>The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The syst...
[ "Creates", "and", "returns", "a", "new", "ReferenceImage", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L1468-L1478
132,648
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.createProductSet
public final ProductSet createProductSet( LocationName parent, ProductSet productSet, String productSetId) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setProductSet(productSet) .set...
java
public final ProductSet createProductSet( LocationName parent, ProductSet productSet, String productSetId) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setProductSet(productSet) .set...
[ "public", "final", "ProductSet", "createProductSet", "(", "LocationName", "parent", ",", "ProductSet", "productSet", ",", "String", "productSetId", ")", "{", "CreateProductSetRequest", "request", "=", "CreateProductSetRequest", ".", "newBuilder", "(", ")", ".", "setPa...
Creates and returns a new ProductSet resource. <p>Possible errors: <p>&#42; Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. <p>Sample code: <pre><code> try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJE...
[ "Creates", "and", "returns", "a", "new", "ProductSet", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L1644-L1654
132,649
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.updateProductSet
public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() .setProductSet(productSet) .setUpdateMask(updateMask) .build(); return updateProductSet(request); }
java
public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() .setProductSet(productSet) .setUpdateMask(updateMask) .build(); return updateProductSet(request); }
[ "public", "final", "ProductSet", "updateProductSet", "(", "ProductSet", "productSet", ",", "FieldMask", "updateMask", ")", "{", "UpdateProductSetRequest", "request", "=", "UpdateProductSetRequest", ".", "newBuilder", "(", ")", ".", "setProductSet", "(", "productSet", ...
Makes changes to a ProductSet resource. Only display_name can be updated currently. <p>Possible errors: <p>&#42; Returns NOT_FOUND if the ProductSet does not exist. &#42; Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters. <p>Sample code: <...
[ "Makes", "changes", "to", "a", "ProductSet", "resource", ".", "Only", "display_name", "can", "be", "updated", "currently", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L2043-L2051
132,650
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java
BigQuerySnippets.updateTableDescription
public Table updateTableDescription(String datasetName, String tableName, String newDescription) { // [START bigquery_update_table_description] // String datasetName = "my_dataset_name"; // String tableName = "my_table_name"; // String newDescription = "new_description"; Table beforeTable = bigquer...
java
public Table updateTableDescription(String datasetName, String tableName, String newDescription) { // [START bigquery_update_table_description] // String datasetName = "my_dataset_name"; // String tableName = "my_table_name"; // String newDescription = "new_description"; Table beforeTable = bigquer...
[ "public", "Table", "updateTableDescription", "(", "String", "datasetName", ",", "String", "tableName", ",", "String", "newDescription", ")", "{", "// [START bigquery_update_table_description]", "// String datasetName = \"my_dataset_name\";", "// String tableName = \"my_table_name\";"...
Example of updating a table by changing its description.
[ "Example", "of", "updating", "a", "table", "by", "changing", "its", "description", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java#L116-L127
132,651
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java
FieldPath.canonicalString
private String canonicalString() { ImmutableList<String> segments = getSegments(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < segments.size(); i++) { if (i > 0) { builder.append("."); } // Escape backslashes and backticks. String escaped = segments.get(...
java
private String canonicalString() { ImmutableList<String> segments = getSegments(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < segments.size(); i++) { if (i > 0) { builder.append("."); } // Escape backslashes and backticks. String escaped = segments.get(...
[ "private", "String", "canonicalString", "(", ")", "{", "ImmutableList", "<", "String", ">", "segments", "=", "getSegments", "(", ")", ";", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i",...
Encodes a list of field name segments in the server-accepted format.
[ "Encodes", "a", "list", "of", "field", "name", "segments", "in", "the", "server", "-", "accepted", "format", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FieldPath.java#L125-L144
132,652
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java
QuerySnapshot.withDocuments
public static QuerySnapshot withDocuments( final Query query, Timestamp readTime, final List<QueryDocumentSnapshot> documents) { return new QuerySnapshot(query, readTime) { volatile List<DocumentChange> documentChanges; @Nonnull @Override public List<QueryDocumentSnapshot> getDocument...
java
public static QuerySnapshot withDocuments( final Query query, Timestamp readTime, final List<QueryDocumentSnapshot> documents) { return new QuerySnapshot(query, readTime) { volatile List<DocumentChange> documentChanges; @Nonnull @Override public List<QueryDocumentSnapshot> getDocument...
[ "public", "static", "QuerySnapshot", "withDocuments", "(", "final", "Query", "query", ",", "Timestamp", "readTime", ",", "final", "List", "<", "QueryDocumentSnapshot", ">", "documents", ")", "{", "return", "new", "QuerySnapshot", "(", "query", ",", "readTime", "...
Creates a new QuerySnapshot representing the results of a Query with added documents.
[ "Creates", "a", "new", "QuerySnapshot", "representing", "the", "results", "of", "a", "Query", "with", "added", "documents", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java#L43-L94
132,653
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java
QuerySnapshot.withChanges
public static QuerySnapshot withChanges( final Query query, Timestamp readTime, final DocumentSet documentSet, final List<DocumentChange> documentChanges) { return new QuerySnapshot(query, readTime) { volatile List<QueryDocumentSnapshot> documents; @Nonnull @Override ...
java
public static QuerySnapshot withChanges( final Query query, Timestamp readTime, final DocumentSet documentSet, final List<DocumentChange> documentChanges) { return new QuerySnapshot(query, readTime) { volatile List<QueryDocumentSnapshot> documents; @Nonnull @Override ...
[ "public", "static", "QuerySnapshot", "withChanges", "(", "final", "Query", "query", ",", "Timestamp", "readTime", ",", "final", "DocumentSet", "documentSet", ",", "final", "List", "<", "DocumentChange", ">", "documentChanges", ")", "{", "return", "new", "QuerySnap...
Creates a new QuerySnapshot representing a snapshot of a Query with changed documents.
[ "Creates", "a", "new", "QuerySnapshot", "representing", "a", "snapshot", "of", "a", "Query", "with", "changed", "documents", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java#L97-L149
132,654
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.getInstanceName
@Deprecated public com.google.bigtable.admin.v2.InstanceName getInstanceName() { return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); }
java
@Deprecated public com.google.bigtable.admin.v2.InstanceName getInstanceName() { return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId); }
[ "@", "Deprecated", "public", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v2", ".", "InstanceName", "getInstanceName", "(", ")", "{", "return", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v2", ".", "InstanceName", ".", "of", ...
Gets the instanceName this client is associated with. @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
[ "Gets", "the", "instanceName", "this", "client", "is", "associated", "with", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L164-L167
132,655
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.createTableAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> createTableAsync(CreateTableRequest request) { return transformToTableResponse( this.stub.createTableCallable().futureCall(request.toProto(projectId, instanceId))); }
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> createTableAsync(CreateTableRequest request) { return transformToTableResponse( this.stub.createTableCallable().futureCall(request.toProto(projectId, instanceId))); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Table", ">", "createTableAsync", "(", "CreateTableRequest", "request", ")", "{", "return", "transformToTableResponse", "(", "this", ".", "stub", ".", "createTableCallable", "(", ")",...
Creates a new table with the specified configuration asynchronously <p>Sample code: <pre>{@code ApiFuture<Table> tableFuture = client.createTableAsync( CreateTableRequest.of("my-table") .addFamily("cf", GCRules.GCRULES.maxVersions(1)) ); ApiFutures.addCallback( tableFuture, new ApiFutureCallback<Table>() { public vo...
[ "Creates", "a", "new", "table", "with", "the", "specified", "configuration", "asynchronously" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L221-L225
132,656
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.modifyFamiliesAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { return transformToTableResponse( this.stub .modifyColumnFamiliesCallable() .futureCall(request.toProto(projectId, instanceId))); }
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { return transformToTableResponse( this.stub .modifyColumnFamiliesCallable() .futureCall(request.toProto(projectId, instanceId))); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Table", ">", "modifyFamiliesAsync", "(", "ModifyColumnFamiliesRequest", "request", ")", "{", "return", "transformToTableResponse", "(", "this", ".", "stub", ".", "modifyColumnFamiliesCal...
Asynchronously creates, updates and drops ColumnFamilies as per the request. <p>Sample code: <pre>{@code ApiFuture<Table> modifiedTableFuture = client.modifyFamiliesAsync( ModifyColumnFamiliesRequest.of(tableId) .addFamily("cf1") .addFamily("cf2", GCRULES.maxAge(Duration.ofSeconds(1000, 20000))) .updateFamily( "cf3",...
[ "Asynchronously", "creates", "updates", "and", "drops", "ColumnFamilies", "as", "per", "the", "request", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L313-L319
132,657
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.deleteTableAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> deleteTableAsync(String tableId) { DeleteTableRequest request = DeleteTableRequest.newBuilder().setName(getTableName(tableId)).build(); return transformToVoid(this.stub.deleteTableCallable().futureCall(request)); }
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> deleteTableAsync(String tableId) { DeleteTableRequest request = DeleteTableRequest.newBuilder().setName(getTableName(tableId)).build(); return transformToVoid(this.stub.deleteTableCallable().futureCall(request)); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Void", ">", "deleteTableAsync", "(", "String", "tableId", ")", "{", "DeleteTableRequest", "request", "=", "DeleteTableRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", ...
Asynchronously deletes the table specified by tableId. <p>Sample code: <pre>{@code ApiFuture<Void> future = client.deleteTableAsync("my-table"); ApiFutures.addCallback( future, new ApiFutureCallback<Void>() { public void onSuccess(Void ignored) { System.out.println("Successfully deleted the table"); } public void o...
[ "Asynchronously", "deletes", "the", "table", "specified", "by", "tableId", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L358-L364
132,658
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.existsAsync
public ApiFuture<Boolean> existsAsync(String tableId) { ApiFuture<Table> protoFuture = getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.NAME_ONLY); ApiFuture<Boolean> existsFuture = ApiFutures.transform( protoFuture, new ApiFunction<Table, Boolean>() { ...
java
public ApiFuture<Boolean> existsAsync(String tableId) { ApiFuture<Table> protoFuture = getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.NAME_ONLY); ApiFuture<Boolean> existsFuture = ApiFutures.transform( protoFuture, new ApiFunction<Table, Boolean>() { ...
[ "public", "ApiFuture", "<", "Boolean", ">", "existsAsync", "(", "String", "tableId", ")", "{", "ApiFuture", "<", "Table", ">", "protoFuture", "=", "getTableAsync", "(", "tableId", ",", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v2", ".", ...
Asynchronously checks if the table specified by the tableId exists <p>Sample code: <pre>{@code ApiFuture<Boolean> found = client.existsAsync("my-table"); ApiFutures.addCallback( found, new ApiFutureCallback<Boolean>() { public void onSuccess(Boolean found) { if (found) { System.out.println("Table exists"); } else { ...
[ "Asynchronously", "checks", "if", "the", "table", "specified", "by", "the", "tableId", "exists" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L408-L434
132,659
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.getTableAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> getTableAsync(String tableId) { return getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.SCHEMA_VIEW); }
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> getTableAsync(String tableId) { return getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.SCHEMA_VIEW); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Table", ">", "getTableAsync", "(", "String", "tableId", ")", "{", "return", "getTableAsync", "(", "tableId", ",", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v...
Asynchronously gets the table metadata by tableId. <p>Sample code: <pre>{@code ApiFuture<Table> tableFuture = client.getTableAsync("my-table"); ApiFutures.addCallback( tableFuture, new ApiFutureCallback<Table>() { public void onSuccess(Table table) { System.out.println("Got metadata for table: " + table.getId()); Sy...
[ "Asynchronously", "gets", "the", "table", "metadata", "by", "tableId", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L484-L487
132,660
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.listTablesAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<List<String>> listTablesAsync() { ListTablesRequest request = ListTablesRequest.newBuilder() .setParent(NameUtil.formatInstanceName(projectId, instanceId)) .build(); // TODO(igorbernstein2): try to upstream pagination spooling...
java
@SuppressWarnings("WeakerAccess") public ApiFuture<List<String>> listTablesAsync() { ListTablesRequest request = ListTablesRequest.newBuilder() .setParent(NameUtil.formatInstanceName(projectId, instanceId)) .build(); // TODO(igorbernstein2): try to upstream pagination spooling...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "List", "<", "String", ">", ">", "listTablesAsync", "(", ")", "{", "ListTablesRequest", "request", "=", "ListTablesRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", ...
Asynchronously lists all table ids in the instance. <p>Sample code: <pre>{@code ApiFuture<List<String>> listFuture = client.listTables(); ApiFutures.addCallback( listFuture, new ApiFutureCallback<List<String>>() { public void onSuccess(List<String> tableIds) { System.out.println("Got list of tables:"); for (String t...
[ "Asynchronously", "lists", "all", "table", "ids", "in", "the", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L540-L601
132,661
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.dropRowRange
@SuppressWarnings("WeakerAccess") public void dropRowRange(String tableId, String rowKeyPrefix) { ApiExceptions.callAndTranslateApiException(dropRowRangeAsync(tableId, rowKeyPrefix)); }
java
@SuppressWarnings("WeakerAccess") public void dropRowRange(String tableId, String rowKeyPrefix) { ApiExceptions.callAndTranslateApiException(dropRowRangeAsync(tableId, rowKeyPrefix)); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "dropRowRange", "(", "String", "tableId", ",", "String", "rowKeyPrefix", ")", "{", "ApiExceptions", ".", "callAndTranslateApiException", "(", "dropRowRangeAsync", "(", "tableId", ",", "rowKeyPref...
Drops rows by the specified key prefix and tableId <p>Please note that this method is considered part of the admin API and is rate limited. <p>Sample code: <pre>{@code client.dropRowRange("my-table", "prefix"); }</pre>
[ "Drops", "rows", "by", "the", "specified", "key", "prefix", "and", "tableId" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L614-L617
132,662
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.dropAllRowsAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> dropAllRowsAsync(String tableId) { DropRowRangeRequest request = DropRowRangeRequest.newBuilder() .setName(getTableName(tableId)) .setDeleteAllDataFromTable(true) .build(); return transformToVoid(this.stub.dr...
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> dropAllRowsAsync(String tableId) { DropRowRangeRequest request = DropRowRangeRequest.newBuilder() .setName(getTableName(tableId)) .setDeleteAllDataFromTable(true) .build(); return transformToVoid(this.stub.dr...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Void", ">", "dropAllRowsAsync", "(", "String", "tableId", ")", "{", "DropRowRangeRequest", "request", "=", "DropRowRangeRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", ...
Asynchornously drops all data in the table. <p>Sample code: <pre>{@code ApiFuture<Void> dropFuture = client.dropAllRowsAsync("my-table"); ApiFutures.addCallback( dropFuture, new ApiFutureCallback<Void>() { public void onSuccess(Void tableNames) { System.out.println("Successfully dropped all data"); } public void on...
[ "Asynchornously", "drops", "all", "data", "in", "the", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L738-L747
132,663
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.awaitReplication
@SuppressWarnings("WeakerAccess") public void awaitReplication(String tableId) { // TODO(igorbernstein2): remove usage of typesafe names com.google.bigtable.admin.v2.TableName tableName = com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); ApiExceptions.callAndTranslateApiE...
java
@SuppressWarnings("WeakerAccess") public void awaitReplication(String tableId) { // TODO(igorbernstein2): remove usage of typesafe names com.google.bigtable.admin.v2.TableName tableName = com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); ApiExceptions.callAndTranslateApiE...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "awaitReplication", "(", "String", "tableId", ")", "{", "// TODO(igorbernstein2): remove usage of typesafe names", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v2", ".", "TableName"...
Blocks until replication has caught up to the point this method was called. This allows callers to make sure that their mutations have been replicated across all of their clusters. <p>Sample code <pre>{@code client.awaitReplication("my-table"); }</pre> @throws com.google.api.gax.retrying.PollException when polling e...
[ "Blocks", "until", "replication", "has", "caught", "up", "to", "the", "point", "this", "method", "was", "called", ".", "This", "allows", "callers", "to", "make", "sure", "that", "their", "mutations", "have", "been", "replicated", "across", "all", "of", "thei...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L761-L769
132,664
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.awaitReplicationAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> awaitReplicationAsync(final String tableId) { // TODO(igorbernstein2): remove usage of trypesafe names com.google.bigtable.admin.v2.TableName tableName = com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); return stub....
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Void> awaitReplicationAsync(final String tableId) { // TODO(igorbernstein2): remove usage of trypesafe names com.google.bigtable.admin.v2.TableName tableName = com.google.bigtable.admin.v2.TableName.of(projectId, instanceId, tableId); return stub....
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Void", ">", "awaitReplicationAsync", "(", "final", "String", "tableId", ")", "{", "// TODO(igorbernstein2): remove usage of trypesafe names", "com", ".", "google", ".", "bigtable", ".", ...
Returns a future that is resolved when replication has caught up to the point this method was called. This allows callers to make sure that their mutations have been replicated across all of their clusters. <p>Sample code: <pre>{@code ApiFuture<Void> replicationFuture = client.awaitReplicationAsync("my-table"); ApiF...
[ "Returns", "a", "future", "that", "is", "resolved", "when", "replication", "has", "caught", "up", "to", "the", "point", "this", "method", "was", "called", ".", "This", "allows", "callers", "to", "make", "sure", "that", "their", "mutations", "have", "been", ...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L797-L803
132,665
googleapis/google-cloud-java
google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java
ProfileServiceClient.updateProfile
public final Profile updateProfile(Profile profile) { UpdateProfileRequest request = UpdateProfileRequest.newBuilder().setProfile(profile).build(); return updateProfile(request); }
java
public final Profile updateProfile(Profile profile) { UpdateProfileRequest request = UpdateProfileRequest.newBuilder().setProfile(profile).build(); return updateProfile(request); }
[ "public", "final", "Profile", "updateProfile", "(", "Profile", "profile", ")", "{", "UpdateProfileRequest", "request", "=", "UpdateProfileRequest", ".", "newBuilder", "(", ")", ".", "setProfile", "(", "profile", ")", ".", "build", "(", ")", ";", "return", "upd...
Updates the specified profile and returns the updated result. <p>Sample code: <pre><code> try (ProfileServiceClient profileServiceClient = ProfileServiceClient.create()) { Profile profile = Profile.newBuilder().build(); Profile response = profileServiceClient.updateProfile(profile); } </code></pre> @param profile Re...
[ "Updates", "the", "specified", "profile", "and", "returns", "the", "updated", "result", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java#L518-L522
132,666
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java
LoggingAppender.start
@Override public synchronized void start() { if (isStarted()) { return; } MonitoredResource resource = getMonitoredResource(getProjectId()); defaultWriteOptions = new WriteOption[] {WriteOption.logName(getLogName()), WriteOption.resource(resource)}; getLogging().setFlushSeverity(seve...
java
@Override public synchronized void start() { if (isStarted()) { return; } MonitoredResource resource = getMonitoredResource(getProjectId()); defaultWriteOptions = new WriteOption[] {WriteOption.logName(getLogName()), WriteOption.resource(resource)}; getLogging().setFlushSeverity(seve...
[ "@", "Override", "public", "synchronized", "void", "start", "(", ")", "{", "if", "(", "isStarted", "(", ")", ")", "{", "return", ";", "}", "MonitoredResource", "resource", "=", "getMonitoredResource", "(", "getProjectId", "(", ")", ")", ";", "defaultWriteOpt...
Initialize and configure the cloud logging service.
[ "Initialize", "and", "configure", "the", "cloud", "logging", "service", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java#L188-L205
132,667
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java
LoggingAppender.severityFor
private static Severity severityFor(Level level) { switch (level.toInt()) { // TRACE case 5000: return Severity.DEBUG; // DEBUG case 10000: return Severity.DEBUG; // INFO case 20000: return Severity.INFO; // WARNING case 30000: ...
java
private static Severity severityFor(Level level) { switch (level.toInt()) { // TRACE case 5000: return Severity.DEBUG; // DEBUG case 10000: return Severity.DEBUG; // INFO case 20000: return Severity.INFO; // WARNING case 30000: ...
[ "private", "static", "Severity", "severityFor", "(", "Level", "level", ")", "{", "switch", "(", "level", ".", "toInt", "(", ")", ")", "{", "// TRACE", "case", "5000", ":", "return", "Severity", ".", "DEBUG", ";", "// DEBUG", "case", "10000", ":", "return...
Transforms Logback logging levels to Cloud severity. @param level Logback logging level @return Cloud severity level
[ "Transforms", "Logback", "logging", "levels", "to", "Cloud", "severity", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java#L332-L352
132,668
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java
UpdateInstanceRequest.setProductionType
@SuppressWarnings("WeakerAccess") public UpdateInstanceRequest setProductionType() { builder.getInstanceBuilder().setType(Type.PRODUCTION); updateFieldMask(Instance.TYPE_FIELD_NUMBER); return this; }
java
@SuppressWarnings("WeakerAccess") public UpdateInstanceRequest setProductionType() { builder.getInstanceBuilder().setType(Type.PRODUCTION); updateFieldMask(Instance.TYPE_FIELD_NUMBER); return this; }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "UpdateInstanceRequest", "setProductionType", "(", ")", "{", "builder", ".", "getInstanceBuilder", "(", ")", ".", "setType", "(", "Type", ".", "PRODUCTION", ")", ";", "updateFieldMask", "(", "Instanc...
Upgrades the instance from a DEVELOPMENT instance to a PRODUCTION instance. This cannot be undone.
[ "Upgrades", "the", "instance", "from", "a", "DEVELOPMENT", "instance", "to", "a", "PRODUCTION", "instance", ".", "This", "cannot", "be", "undone", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java#L65-L71
132,669
googleapis/google-cloud-java
google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceClient.java
LanguageServiceClient.annotateText
public final AnnotateTextResponse annotateText( Document document, AnnotateTextRequest.Features features) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder().setDocument(document).setFeatures(features).build(); return annotateText(request); }
java
public final AnnotateTextResponse annotateText( Document document, AnnotateTextRequest.Features features) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder().setDocument(document).setFeatures(features).build(); return annotateText(request); }
[ "public", "final", "AnnotateTextResponse", "annotateText", "(", "Document", "document", ",", "AnnotateTextRequest", ".", "Features", "features", ")", "{", "AnnotateTextRequest", "request", "=", "AnnotateTextRequest", ".", "newBuilder", "(", ")", ".", "setDocument", "(...
A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. <p>Sample code: <pre><code> try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnnotateTextRequest.Fea...
[ "A", "convenience", "method", "that", "provides", "all", "the", "features", "that", "analyzeSentiment", "analyzeEntities", "and", "analyzeSyntax", "provide", "in", "one", "call", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceClient.java#L675-L681
132,670
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
Blob.downloadTo
public void downloadTo(Path path, BlobSourceOption... options) { try (OutputStream outputStream = Files.newOutputStream(path); ReadChannel reader = reader(options)) { WritableByteChannel channel = Channels.newChannel(outputStream); ByteBuffer bytes = ByteBuffer.allocate(DEFAULT_CHUNK_SIZE); ...
java
public void downloadTo(Path path, BlobSourceOption... options) { try (OutputStream outputStream = Files.newOutputStream(path); ReadChannel reader = reader(options)) { WritableByteChannel channel = Channels.newChannel(outputStream); ByteBuffer bytes = ByteBuffer.allocate(DEFAULT_CHUNK_SIZE); ...
[ "public", "void", "downloadTo", "(", "Path", "path", ",", "BlobSourceOption", "...", "options", ")", "{", "try", "(", "OutputStream", "outputStream", "=", "Files", ".", "newOutputStream", "(", "path", ")", ";", "ReadChannel", "reader", "=", "reader", "(", "o...
Downloads this blob to the given file path using specified blob read options. @param path destination @param options blob read options @throws StorageException upon failure
[ "Downloads", "this", "blob", "to", "the", "given", "file", "path", "using", "specified", "blob", "read", "options", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java#L213-L226
132,671
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
Blob.exists
public boolean exists(BlobSourceOption... options) { int length = options.length; Storage.BlobGetOption[] getOptions = Arrays.copyOf(toGetOptions(this, options), length + 1); getOptions[length] = Storage.BlobGetOption.fields(); return storage.get(getBlobId(), getOptions) != null; }
java
public boolean exists(BlobSourceOption... options) { int length = options.length; Storage.BlobGetOption[] getOptions = Arrays.copyOf(toGetOptions(this, options), length + 1); getOptions[length] = Storage.BlobGetOption.fields(); return storage.get(getBlobId(), getOptions) != null; }
[ "public", "boolean", "exists", "(", "BlobSourceOption", "...", "options", ")", "{", "int", "length", "=", "options", ".", "length", ";", "Storage", ".", "BlobGetOption", "[", "]", "getOptions", "=", "Arrays", ".", "copyOf", "(", "toGetOptions", "(", "this", ...
Checks if this blob exists. <p>Example of checking if the blob exists. <pre>{@code boolean exists = blob.exists(); if (exists) { // the blob exists } else { // the blob was not found } }</pre> @param options blob read options @return true if this blob exists, false otherwise @throws StorageException upon failure
[ "Checks", "if", "this", "blob", "exists", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java#L462-L467
132,672
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java
ModifyColumnFamiliesRequest.addFamily
public ModifyColumnFamiliesRequest addFamily(String familyId, GCRule gcRule) { Preconditions.checkNotNull(gcRule); Modification.Builder modification = Modification.newBuilder().setId(familyId); modification.getCreateBuilder().setGcRule(gcRule.toProto()); modFamilyRequest.addModifications(modification.bu...
java
public ModifyColumnFamiliesRequest addFamily(String familyId, GCRule gcRule) { Preconditions.checkNotNull(gcRule); Modification.Builder modification = Modification.newBuilder().setId(familyId); modification.getCreateBuilder().setGcRule(gcRule.toProto()); modFamilyRequest.addModifications(modification.bu...
[ "public", "ModifyColumnFamiliesRequest", "addFamily", "(", "String", "familyId", ",", "GCRule", "gcRule", ")", "{", "Preconditions", ".", "checkNotNull", "(", "gcRule", ")", ";", "Modification", ".", "Builder", "modification", "=", "Modification", ".", "newBuilder",...
Configures the name and GcRule of the new ColumnFamily to be created @param familyId @param gcRule @return
[ "Configures", "the", "name", "and", "GcRule", "of", "the", "new", "ColumnFamily", "to", "be", "created" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java#L72-L78
132,673
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java
ModifyColumnFamiliesRequest.dropFamily
public ModifyColumnFamiliesRequest dropFamily(String familyId) { Modification.Builder modification = Modification.newBuilder().setId(familyId).setDrop(true); modFamilyRequest.addModifications(modification.build()); return this; }
java
public ModifyColumnFamiliesRequest dropFamily(String familyId) { Modification.Builder modification = Modification.newBuilder().setId(familyId).setDrop(true); modFamilyRequest.addModifications(modification.build()); return this; }
[ "public", "ModifyColumnFamiliesRequest", "dropFamily", "(", "String", "familyId", ")", "{", "Modification", ".", "Builder", "modification", "=", "Modification", ".", "newBuilder", "(", ")", ".", "setId", "(", "familyId", ")", ".", "setDrop", "(", "true", ")", ...
Drops the specified ColumnFamily @param familyId @return
[ "Drops", "the", "specified", "ColumnFamily" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ModifyColumnFamiliesRequest.java#L101-L105
132,674
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
FirestoreClient.updateDocument
public final Document updateDocument(Document document, DocumentMask updateMask) { UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder().setDocument(document).setUpdateMask(updateMask).build(); return updateDocument(request); }
java
public final Document updateDocument(Document document, DocumentMask updateMask) { UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder().setDocument(document).setUpdateMask(updateMask).build(); return updateDocument(request); }
[ "public", "final", "Document", "updateDocument", "(", "Document", "document", ",", "DocumentMask", "updateMask", ")", "{", "UpdateDocumentRequest", "request", "=", "UpdateDocumentRequest", ".", "newBuilder", "(", ")", ".", "setDocument", "(", "document", ")", ".", ...
Updates or inserts a document. <p>Sample code: <pre><code> try (FirestoreClient firestoreClient = FirestoreClient.create()) { Document document = Document.newBuilder().build(); DocumentMask updateMask = DocumentMask.newBuilder().build(); Document response = firestoreClient.updateDocument(document, updateMask); } </co...
[ "Updates", "or", "inserts", "a", "document", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java#L405-L410
132,675
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
FirestoreClient.beginTransaction
public final BeginTransactionResponse beginTransaction(String database) { BeginTransactionRequest request = BeginTransactionRequest.newBuilder().setDatabase(database).build(); return beginTransaction(request); }
java
public final BeginTransactionResponse beginTransaction(String database) { BeginTransactionRequest request = BeginTransactionRequest.newBuilder().setDatabase(database).build(); return beginTransaction(request); }
[ "public", "final", "BeginTransactionResponse", "beginTransaction", "(", "String", "database", ")", "{", "BeginTransactionRequest", "request", "=", "BeginTransactionRequest", ".", "newBuilder", "(", ")", ".", "setDatabase", "(", "database", ")", ".", "build", "(", ")...
Starts a new transaction. <p>Sample code: <pre><code> try (FirestoreClient firestoreClient = FirestoreClient.create()) { String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]"); BeginTransactionResponse response = firestoreClient.beginTransaction(formattedDatabase); } </code></pre> @param datab...
[ "Starts", "a", "new", "transaction", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java#L600-L605
132,676
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
FirestoreClient.commit
public final CommitResponse commit(String database, List<Write> writes) { CommitRequest request = CommitRequest.newBuilder().setDatabase(database).addAllWrites(writes).build(); return commit(request); }
java
public final CommitResponse commit(String database, List<Write> writes) { CommitRequest request = CommitRequest.newBuilder().setDatabase(database).addAllWrites(writes).build(); return commit(request); }
[ "public", "final", "CommitResponse", "commit", "(", "String", "database", ",", "List", "<", "Write", ">", "writes", ")", "{", "CommitRequest", "request", "=", "CommitRequest", ".", "newBuilder", "(", ")", ".", "setDatabase", "(", "database", ")", ".", "addAl...
Commits a transaction, while optionally updating documents. <p>Sample code: <pre><code> try (FirestoreClient firestoreClient = FirestoreClient.create()) { String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]"); List&lt;Write&gt; writes = new ArrayList&lt;&gt;(); CommitResponse response = firest...
[ "Commits", "a", "transaction", "while", "optionally", "updating", "documents", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java#L673-L678
132,677
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
FirestoreClient.rollback
public final void rollback(String database, ByteString transaction) { RollbackRequest request = RollbackRequest.newBuilder().setDatabase(database).setTransaction(transaction).build(); rollback(request); }
java
public final void rollback(String database, ByteString transaction) { RollbackRequest request = RollbackRequest.newBuilder().setDatabase(database).setTransaction(transaction).build(); rollback(request); }
[ "public", "final", "void", "rollback", "(", "String", "database", ",", "ByteString", "transaction", ")", "{", "RollbackRequest", "request", "=", "RollbackRequest", ".", "newBuilder", "(", ")", ".", "setDatabase", "(", "database", ")", ".", "setTransaction", "(",...
Rolls back a transaction. <p>Sample code: <pre><code> try (FirestoreClient firestoreClient = FirestoreClient.create()) { String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]"); ByteString transaction = ByteString.copyFromUtf8(""); firestoreClient.rollback(formattedDatabase, transaction); } </co...
[ "Rolls", "back", "a", "transaction", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java#L748-L753
132,678
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
FirestoreClient.listCollectionIds
public final ListCollectionIdsPagedResponse listCollectionIds(String parent) { ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder().setParent(parent).build(); return listCollectionIds(request); }
java
public final ListCollectionIdsPagedResponse listCollectionIds(String parent) { ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder().setParent(parent).build(); return listCollectionIds(request); }
[ "public", "final", "ListCollectionIdsPagedResponse", "listCollectionIds", "(", "String", "parent", ")", "{", "ListCollectionIdsRequest", "request", "=", "ListCollectionIdsRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "build", "(", ...
Lists all the collection IDs underneath a document. <p>Sample code: <pre><code> try (FirestoreClient firestoreClient = FirestoreClient.create()) { String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]"); for (String element : firestoreClient.listCollectionIds(formattedParent...
[ "Lists", "all", "the", "collection", "IDs", "underneath", "a", "document", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java#L900-L904
132,679
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketIamSnippets.java
BucketIamSnippets.listBucketIamMembers
public Policy listBucketIamMembers(String bucketName) { // [START view_bucket_iam_members] // Initialize a Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // Get IAM Policy for a bucket Policy policy = storage.getIamPolicy(bucketName); // Print Roles an...
java
public Policy listBucketIamMembers(String bucketName) { // [START view_bucket_iam_members] // Initialize a Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // Get IAM Policy for a bucket Policy policy = storage.getIamPolicy(bucketName); // Print Roles an...
[ "public", "Policy", "listBucketIamMembers", "(", "String", "bucketName", ")", "{", "// [START view_bucket_iam_members]", "// Initialize a Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstance", "(", ")", ".", "getService", "(", ")", ...
Example of listing the Bucket-Level IAM Roles and Members
[ "Example", "of", "listing", "the", "Bucket", "-", "Level", "IAM", "Roles", "and", "Members" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketIamSnippets.java#L31-L46
132,680
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketIamSnippets.java
BucketIamSnippets.addBucketIamMember
public Policy addBucketIamMember(String bucketName, Role role, Identity identity) { // [START add_bucket_iam_member] // Initialize a Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // Get IAM Policy for a bucket Policy policy = storage.getIamPolicy(bucketNam...
java
public Policy addBucketIamMember(String bucketName, Role role, Identity identity) { // [START add_bucket_iam_member] // Initialize a Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // Get IAM Policy for a bucket Policy policy = storage.getIamPolicy(bucketNam...
[ "public", "Policy", "addBucketIamMember", "(", "String", "bucketName", ",", "Role", "role", ",", "Identity", "identity", ")", "{", "// [START add_bucket_iam_member]", "// Initialize a Cloud Storage client", "Storage", "storage", "=", "StorageOptions", ".", "getDefaultInstan...
Example of adding a member to the Bucket-level IAM
[ "Example", "of", "adding", "a", "member", "to", "the", "Bucket", "-", "level", "IAM" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketIamSnippets.java#L49-L66
132,681
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/FormatOptions.java
FormatOptions.of
public static FormatOptions of(String format) { if (checkNotNull(format).equals(CSV)) { return csv(); } else if (format.equals(DATASTORE_BACKUP)) { return datastoreBackup(); } else if (format.equals(GOOGLE_SHEETS)) { return googleSheets(); } else if (format.equals(BIGTABLE)) { re...
java
public static FormatOptions of(String format) { if (checkNotNull(format).equals(CSV)) { return csv(); } else if (format.equals(DATASTORE_BACKUP)) { return datastoreBackup(); } else if (format.equals(GOOGLE_SHEETS)) { return googleSheets(); } else if (format.equals(BIGTABLE)) { re...
[ "public", "static", "FormatOptions", "of", "(", "String", "format", ")", "{", "if", "(", "checkNotNull", "(", "format", ")", ".", "equals", "(", "CSV", ")", ")", "{", "return", "csv", "(", ")", ";", "}", "else", "if", "(", "format", ".", "equals", ...
Default options for the provided format.
[ "Default", "options", "for", "the", "provided", "format", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/FormatOptions.java#L118-L129
132,682
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
EnhancedBigtableStub.createMutateRowsBaseCallable
private UnaryCallable<MutateRowsRequest, Void> createMutateRowsBaseCallable() { RetryAlgorithm<Void> retryAlgorithm = new RetryAlgorithm<>( new ApiResultRetryAlgorithm<Void>(), new ExponentialRetryAlgorithm( settings.bulkMutateRowsSettings().getRetrySettings(), client...
java
private UnaryCallable<MutateRowsRequest, Void> createMutateRowsBaseCallable() { RetryAlgorithm<Void> retryAlgorithm = new RetryAlgorithm<>( new ApiResultRetryAlgorithm<Void>(), new ExponentialRetryAlgorithm( settings.bulkMutateRowsSettings().getRetrySettings(), client...
[ "private", "UnaryCallable", "<", "MutateRowsRequest", ",", "Void", ">", "createMutateRowsBaseCallable", "(", ")", "{", "RetryAlgorithm", "<", "Void", ">", "retryAlgorithm", "=", "new", "RetryAlgorithm", "<>", "(", "new", "ApiResultRetryAlgorithm", "<", "Void", ">", ...
Internal helper to create the base MutateRows callable chain. The chain is responsible for retrying individual entry in case of error. @see MutateRowsRetryingCallable for more details
[ "Internal", "helper", "to", "create", "the", "base", "MutateRows", "callable", "chain", ".", "The", "chain", "is", "responsible", "for", "retrying", "individual", "entry", "in", "case", "of", "error", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java#L371-L385
132,683
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
BigtableTableAdminSettings.newBuilderForEmulator
public static Builder newBuilderForEmulator(int port) { Builder builder = newBuilder().setProjectId("fake-project").setInstanceId("fake-instance"); builder .stubSettings() .setCredentialsProvider(NoCredentialsProvider.create()) .setEndpoint("localhost:" + port) .setTransportChan...
java
public static Builder newBuilderForEmulator(int port) { Builder builder = newBuilder().setProjectId("fake-project").setInstanceId("fake-instance"); builder .stubSettings() .setCredentialsProvider(NoCredentialsProvider.create()) .setEndpoint("localhost:" + port) .setTransportChan...
[ "public", "static", "Builder", "newBuilderForEmulator", "(", "int", "port", ")", "{", "Builder", "builder", "=", "newBuilder", "(", ")", ".", "setProjectId", "(", "\"fake-project\"", ")", ".", "setInstanceId", "(", "\"fake-instance\"", ")", ";", "builder", ".", ...
Create a new builder preconfigured to connect to the Bigtable emulator.
[ "Create", "a", "new", "builder", "preconfigured", "to", "connect", "to", "the", "Bigtable", "emulator", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java#L93-L113
132,684
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java
RouterClient.updateRouter
@BetaApi public final Operation updateRouter( ProjectRegionRouterName router, Router routerResource, List<String> fieldMask) { UpdateRouterHttpRequest request = UpdateRouterHttpRequest.newBuilder() .setRouter(router == null ? null : router.toString()) .setRouterResource(rout...
java
@BetaApi public final Operation updateRouter( ProjectRegionRouterName router, Router routerResource, List<String> fieldMask) { UpdateRouterHttpRequest request = UpdateRouterHttpRequest.newBuilder() .setRouter(router == null ? null : router.toString()) .setRouterResource(rout...
[ "@", "BetaApi", "public", "final", "Operation", "updateRouter", "(", "ProjectRegionRouterName", "router", ",", "Router", "routerResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "UpdateRouterHttpRequest", "request", "=", "UpdateRouterHttpRequest", "."...
Updates the specified Router resource with the data included in the request. <p>Sample code: <pre><code> try (RouterClient routerClient = RouterClient.create()) { ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]"); Router routerResource = Router.newBuilder().build(); List...
[ "Updates", "the", "specified", "Router", "resource", "with", "the", "data", "included", "in", "the", "request", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java#L1244-L1255
132,685
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java
StorageImpl.buildSignatureInfo
private SignatureInfo buildSignatureInfo( Map<SignUrlOption.Option, Object> optionMap, BlobInfo blobInfo, long expiration, URI path, String accountEmail) { HttpMethod httpVerb = optionMap.containsKey(SignUrlOption.Option.HTTP_METHOD) ? (HttpMethod) optionMap.get(Si...
java
private SignatureInfo buildSignatureInfo( Map<SignUrlOption.Option, Object> optionMap, BlobInfo blobInfo, long expiration, URI path, String accountEmail) { HttpMethod httpVerb = optionMap.containsKey(SignUrlOption.Option.HTTP_METHOD) ? (HttpMethod) optionMap.get(Si...
[ "private", "SignatureInfo", "buildSignatureInfo", "(", "Map", "<", "SignUrlOption", ".", "Option", ",", "Object", ">", "optionMap", ",", "BlobInfo", "blobInfo", ",", "long", "expiration", ",", "URI", "path", ",", "String", "accountEmail", ")", "{", "HttpMethod",...
Builds signature info. @param optionMap the option map @param blobInfo the blob info @param expiration the expiration in seconds @param path the resource URI @param accountEmail the account email @return signature info
[ "Builds", "signature", "info", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java#L701-L741
132,686
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
GapicSpannerRpc.get
private static <T> T get(final Future<T> future) throws SpannerException { final Context context = Context.current(); try { return future.get(); } catch (InterruptedException e) { // We are the sole consumer of the future, so cancel it. future.cancel(true); throw SpannerExceptionFact...
java
private static <T> T get(final Future<T> future) throws SpannerException { final Context context = Context.current(); try { return future.get(); } catch (InterruptedException e) { // We are the sole consumer of the future, so cancel it. future.cancel(true); throw SpannerExceptionFact...
[ "private", "static", "<", "T", ">", "T", "get", "(", "final", "Future", "<", "T", ">", "future", ")", "throws", "SpannerException", "{", "final", "Context", "context", "=", "Context", ".", "current", "(", ")", ";", "try", "{", "return", "future", ".", ...
Gets the result of an async RPC call, handling any exceptions encountered.
[ "Gets", "the", "result", "of", "an", "async", "RPC", "call", "handling", "any", "exceptions", "encountered", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java#L563-L574
132,687
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java
UrlMapClient.updateUrlMap
@BetaApi public final Operation updateUrlMap( ProjectGlobalUrlMapName urlMap, UrlMap urlMapResource, List<String> fieldMask) { UpdateUrlMapHttpRequest request = UpdateUrlMapHttpRequest.newBuilder() .setUrlMap(urlMap == null ? null : urlMap.toString()) .setUrlMapResource(urlM...
java
@BetaApi public final Operation updateUrlMap( ProjectGlobalUrlMapName urlMap, UrlMap urlMapResource, List<String> fieldMask) { UpdateUrlMapHttpRequest request = UpdateUrlMapHttpRequest.newBuilder() .setUrlMap(urlMap == null ? null : urlMap.toString()) .setUrlMapResource(urlM...
[ "@", "BetaApi", "public", "final", "Operation", "updateUrlMap", "(", "ProjectGlobalUrlMapName", "urlMap", ",", "UrlMap", "urlMapResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "UpdateUrlMapHttpRequest", "request", "=", "UpdateUrlMapHttpRequest", "."...
Updates the specified UrlMap resource with the data included in the request. <p>Sample code: <pre><code> try (UrlMapClient urlMapClient = UrlMapClient.create()) { ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]"); UrlMap urlMapResource = UrlMap.newBuilder().build(); List&lt;String&...
[ "Updates", "the", "specified", "UrlMap", "resource", "with", "the", "data", "included", "in", "the", "request", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java#L870-L881
132,688
googleapis/google-cloud-java
google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java
JobServiceClient.updateJob
public final Job updateJob(Job job) { UpdateJobRequest request = UpdateJobRequest.newBuilder().setJob(job).build(); return updateJob(request); }
java
public final Job updateJob(Job job) { UpdateJobRequest request = UpdateJobRequest.newBuilder().setJob(job).build(); return updateJob(request); }
[ "public", "final", "Job", "updateJob", "(", "Job", "job", ")", "{", "UpdateJobRequest", "request", "=", "UpdateJobRequest", ".", "newBuilder", "(", ")", ".", "setJob", "(", "job", ")", ".", "build", "(", ")", ";", "return", "updateJob", "(", "request", "...
Updates specified job. <p>Typically, updated contents become visible in search results within 10 seconds, but it may take up to 5 minutes. <p>Sample code: <pre><code> try (JobServiceClient jobServiceClient = JobServiceClient.create()) { Job job = Job.newBuilder().build(); Job response = jobServiceClient.updateJob(jo...
[ "Updates", "specified", "job", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java#L398-L402
132,689
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/TranslateSnippetsBeta.java
TranslateSnippetsBeta.translateText
static TranslateTextResponse translateText( String projectId, String location, String text, String sourceLanguageCode, String targetLanguageCode) { try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { LocationName locationName = ...
java
static TranslateTextResponse translateText( String projectId, String location, String text, String sourceLanguageCode, String targetLanguageCode) { try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { LocationName locationName = ...
[ "static", "TranslateTextResponse", "translateText", "(", "String", "projectId", ",", "String", "location", ",", "String", "text", ",", "String", "sourceLanguageCode", ",", "String", "targetLanguageCode", ")", "{", "try", "(", "TranslationServiceClient", "translationServ...
Translates a given text to a target language. @param projectId - Id of the project. @param location - location name. @param text - Text for translation. @param sourceLanguageCode - Language code of text. e.g. "en" @param targetLanguageCode - Language code for translation. e.g. "sr"
[ "Translates", "a", "given", "text", "to", "a", "target", "language", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/TranslateSnippetsBeta.java#L169-L198
132,690
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java
BaseBigtableInstanceAdminClient.updateClusterAsync
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Cluster, UpdateClusterMetadata> updateClusterAsync(Cluster request) { return updateClusterOperationCallable().futureCall(request); }
java
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Cluster, UpdateClusterMetadata> updateClusterAsync(Cluster request) { return updateClusterOperationCallable().futureCall(request); }
[ "@", "BetaApi", "(", "\"The surface for long-running operations is not stable yet and may change in the future.\"", ")", "public", "final", "OperationFuture", "<", "Cluster", ",", "UpdateClusterMetadata", ">", "updateClusterAsync", "(", "Cluster", "request", ")", "{", "return",...
Updates a cluster within an instance. <p>Sample code: <pre><code> try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) { ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]"); int serveNodes = 0; Cluster request = Cluster.newBuilder() .se...
[ "Updates", "a", "cluster", "within", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java#L1079-L1083
132,691
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java
BaseBigtableInstanceAdminClient.createAppProfile
public final AppProfile createAppProfile( InstanceName parent, String appProfileId, AppProfile appProfile) { CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setAppProfileId(appProfileId) ...
java
public final AppProfile createAppProfile( InstanceName parent, String appProfileId, AppProfile appProfile) { CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setAppProfileId(appProfileId) ...
[ "public", "final", "AppProfile", "createAppProfile", "(", "InstanceName", "parent", ",", "String", "appProfileId", ",", "AppProfile", "appProfile", ")", "{", "CreateAppProfileRequest", "request", "=", "CreateAppProfileRequest", ".", "newBuilder", "(", ")", ".", "setPa...
Creates an app profile within an instance. <p>Sample code: <pre><code> try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) { InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); String appProfileId = ""; AppProfile appProfile = AppProfile.newBu...
[ "Creates", "an", "app", "profile", "within", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java#L1250-L1260
132,692
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
InstanceGroupManagerClient.patchInstanceGroupManager
@BetaApi public final Operation patchInstanceGroupManager( String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource, List<String> fieldMask) { PatchInstanceGroupManagerHttpRequest request = PatchInstanceGroupManagerHttpRequest.newBuilder() .setInstanceG...
java
@BetaApi public final Operation patchInstanceGroupManager( String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource, List<String> fieldMask) { PatchInstanceGroupManagerHttpRequest request = PatchInstanceGroupManagerHttpRequest.newBuilder() .setInstanceG...
[ "@", "BetaApi", "public", "final", "Operation", "patchInstanceGroupManager", "(", "String", "instanceGroupManager", ",", "InstanceGroupManager", "instanceGroupManagerResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "PatchInstanceGroupManagerHttpRequest", "...
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances...
[ "Updates", "a", "managed", "instance", "group", "using", "the", "information", "that", "you", "specify", "in", "the", "request", ".", "This", "operation", "is", "marked", "as", "DONE", "when", "the", "group", "is", "patched", "even", "if", "the", "instances"...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java#L1337-L1350
132,693
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetId.java
DatasetId.of
public static DatasetId of(String project, String dataset) { return new DatasetId(checkNotNull(project), checkNotNull(dataset)); }
java
public static DatasetId of(String project, String dataset) { return new DatasetId(checkNotNull(project), checkNotNull(dataset)); }
[ "public", "static", "DatasetId", "of", "(", "String", "project", ",", "String", "dataset", ")", "{", "return", "new", "DatasetId", "(", "checkNotNull", "(", "project", ")", ",", "checkNotNull", "(", "dataset", ")", ")", ";", "}" ]
Creates a dataset identity given project's and dataset's user-defined ids.
[ "Creates", "a", "dataset", "identity", "given", "project", "s", "and", "dataset", "s", "user", "-", "defined", "ids", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/DatasetId.java#L49-L51
132,694
KostyaSha/yet-another-docker-plugin
yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerProvisioningStrategy.java
DockerProvisioningStrategy.notAllowedStrategy
@VisibleForTesting protected static boolean notAllowedStrategy(DockerSlaveTemplate template) { if (isNull(template)) { LOG.debug("Skipping DockerProvisioningStrategy because: template is null"); return true; } final RetentionStrategy retentionStrategy = template.getR...
java
@VisibleForTesting protected static boolean notAllowedStrategy(DockerSlaveTemplate template) { if (isNull(template)) { LOG.debug("Skipping DockerProvisioningStrategy because: template is null"); return true; } final RetentionStrategy retentionStrategy = template.getR...
[ "@", "VisibleForTesting", "protected", "static", "boolean", "notAllowedStrategy", "(", "DockerSlaveTemplate", "template", ")", "{", "if", "(", "isNull", "(", "template", ")", ")", "{", "LOG", ".", "debug", "(", "\"Skipping DockerProvisioningStrategy because: template is...
Exclude unknown mix of configuration.
[ "Exclude", "unknown", "mix", "of", "configuration", "." ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerProvisioningStrategy.java#L119-L150
132,695
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.pullImage
public void pullImage(DockerImagePullStrategy pullStrategy, String imageName) throws InterruptedException { LOG.info("Pulling image {} with {} strategy...", imageName, pullStrategy); final List<Image> images = getDockerCli().listImagesCmd().withShowAll(true).exec(); NameParser.ReposTag repostag...
java
public void pullImage(DockerImagePullStrategy pullStrategy, String imageName) throws InterruptedException { LOG.info("Pulling image {} with {} strategy...", imageName, pullStrategy); final List<Image> images = getDockerCli().listImagesCmd().withShowAll(true).exec(); NameParser.ReposTag repostag...
[ "public", "void", "pullImage", "(", "DockerImagePullStrategy", "pullStrategy", ",", "String", "imageName", ")", "throws", "InterruptedException", "{", "LOG", ".", "info", "(", "\"Pulling image {} with {} strategy...\"", ",", "imageName", ",", "pullStrategy", ")", ";", ...
Pull docker image on this docker host.
[ "Pull", "docker", "image", "on", "this", "docker", "host", "." ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L144-L173
132,696
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.buildImage
public String buildImage(Map<String, File> plugins) throws IOException, InterruptedException { LOG.debug("Building image for {}", plugins); // final File tempDirectory = TempFileHelper.createTempDirectory("build-image", targetDir().toPath()); final File buildDir = new File(targetDir().getAbsolute...
java
public String buildImage(Map<String, File> plugins) throws IOException, InterruptedException { LOG.debug("Building image for {}", plugins); // final File tempDirectory = TempFileHelper.createTempDirectory("build-image", targetDir().toPath()); final File buildDir = new File(targetDir().getAbsolute...
[ "public", "String", "buildImage", "(", "Map", "<", "String", ",", "File", ">", "plugins", ")", "throws", "IOException", ",", "InterruptedException", "{", "LOG", ".", "debug", "(", "\"Building image for {}\"", ",", "plugins", ")", ";", "// final File tempDir...
Build docker image containing specified plugins.
[ "Build", "docker", "image", "containing", "specified", "plugins", "." ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L377-L427
132,697
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.runFreshJenkinsContainer
public String runFreshJenkinsContainer(DockerImagePullStrategy pullStrategy, boolean forceRefresh) throws IOException, SettingsBuildingException, InterruptedException { LOG.debug("Entering run fresh jenkins container."); pullImage(pullStrategy, JENKINS_DEFAULT.getDockerImageName()); ...
java
public String runFreshJenkinsContainer(DockerImagePullStrategy pullStrategy, boolean forceRefresh) throws IOException, SettingsBuildingException, InterruptedException { LOG.debug("Entering run fresh jenkins container."); pullImage(pullStrategy, JENKINS_DEFAULT.getDockerImageName()); ...
[ "public", "String", "runFreshJenkinsContainer", "(", "DockerImagePullStrategy", "pullStrategy", ",", "boolean", "forceRefresh", ")", "throws", "IOException", ",", "SettingsBuildingException", ",", "InterruptedException", "{", "LOG", ".", "debug", "(", "\"Entering run fresh ...
Run, record and remove after test container with jenkins. @param forceRefresh enforce data container and data image refresh
[ "Run", "record", "and", "remove", "after", "test", "container", "with", "jenkins", "." ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L444-L488
132,698
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.generateDockerfileFor
public String generateDockerfileFor(Map<String, File> plugins) throws IOException { StringBuilder builder = new StringBuilder(); builder.append("FROM scratch").append(NL) .append("MAINTAINER Kanstantsin Shautsou <kanstantsin.sha@gmail.com>").append(NL) .append("COPY ./ /"...
java
public String generateDockerfileFor(Map<String, File> plugins) throws IOException { StringBuilder builder = new StringBuilder(); builder.append("FROM scratch").append(NL) .append("MAINTAINER Kanstantsin Shautsou <kanstantsin.sha@gmail.com>").append(NL) .append("COPY ./ /"...
[ "public", "String", "generateDockerfileFor", "(", "Map", "<", "String", ",", "File", ">", "plugins", ")", "throws", "IOException", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "\"FROM scratch\"", "...
'Dockerfile' as String based on sratch for placing plugins.
[ "Dockerfile", "as", "String", "based", "on", "sratch", "for", "placing", "plugins", "." ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L502-L516
132,699
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.createCliWithWait
private DockerCLI createCliWithWait(URL url, int port) throws InterruptedException, IOException { DockerCLI tempCli = null; boolean connected = false; int i = 0; while (i <= 10 && !connected) { i++; try { final CLIConnectionFactory factory = new CL...
java
private DockerCLI createCliWithWait(URL url, int port) throws InterruptedException, IOException { DockerCLI tempCli = null; boolean connected = false; int i = 0; while (i <= 10 && !connected) { i++; try { final CLIConnectionFactory factory = new CL...
[ "private", "DockerCLI", "createCliWithWait", "(", "URL", "url", ",", "int", "port", ")", "throws", "InterruptedException", ",", "IOException", "{", "DockerCLI", "tempCli", "=", "null", ";", "boolean", "connected", "=", "false", ";", "int", "i", "=", "0", ";"...
Create DockerCLI connection against specified jnlpSlaveAgent port
[ "Create", "DockerCLI", "connection", "against", "specified", "jnlpSlaveAgent", "port" ]
40b12e39ff94c3834cff7e028c3dd01c88e87d77
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L568-L601