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
12,400
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatDataItemName
@Deprecated public static final String formatDataItemName(String project, String dataset, String dataItem) { return DATA_ITEM_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset, "data_item", dataItem); }
java
@Deprecated public static final String formatDataItemName(String project, String dataset, String dataItem) { return DATA_ITEM_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset, "data_item", dataItem); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatDataItemName", "(", "String", "project", ",", "String", "dataset", ",", "String", "dataItem", ")", "{", "return", "DATA_ITEM_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",...
Formats a string containing the fully-qualified path to represent a data_item resource. @deprecated Use the {@link DataItemName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "data_item", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L174-L180
12,401
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatDatasetName
@Deprecated public static final String formatDatasetName(String project, String dataset) { return DATASET_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset); }
java
@Deprecated public static final String formatDatasetName(String project, String dataset) { return DATASET_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatDatasetName", "(", "String", "project", ",", "String", "dataset", ")", "{", "return", "DATASET_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",", "\"dataset\"", ",", "datase...
Formats a string containing the fully-qualified path to represent a dataset resource. @deprecated Use the {@link DatasetName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "dataset", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L187-L192
12,402
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatExampleName
@Deprecated public static final String formatExampleName( String project, String dataset, String annotatedDataset, String example) { return EXAMPLE_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset, "annotated_dataset", annotatedDataset, "example", example); ...
java
@Deprecated public static final String formatExampleName( String project, String dataset, String annotatedDataset, String example) { return EXAMPLE_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset, "annotated_dataset", annotatedDataset, "example", example); ...
[ "@", "Deprecated", "public", "static", "final", "String", "formatExampleName", "(", "String", "project", ",", "String", "dataset", ",", "String", "annotatedDataset", ",", "String", "example", ")", "{", "return", "EXAMPLE_PATH_TEMPLATE", ".", "instantiate", "(", "\...
Formats a string containing the fully-qualified path to represent a example resource. @deprecated Use the {@link ExampleName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "example", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L199-L207
12,403
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatInstructionName
@Deprecated public static final String formatInstructionName(String project, String instruction) { return INSTRUCTION_PATH_TEMPLATE.instantiate( "project", project, "instruction", instruction); }
java
@Deprecated public static final String formatInstructionName(String project, String instruction) { return INSTRUCTION_PATH_TEMPLATE.instantiate( "project", project, "instruction", instruction); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatInstructionName", "(", "String", "project", ",", "String", "instruction", ")", "{", "return", "INSTRUCTION_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",", "\"instruction\"", ...
Formats a string containing the fully-qualified path to represent a instruction resource. @deprecated Use the {@link InstructionName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "instruction", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L214-L219
12,404
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listDatasets
public final ListDatasetsPagedResponse listDatasets(String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listDatasets"); ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listDatasets(request); }
java
public final ListDatasetsPagedResponse listDatasets(String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listDatasets"); ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listDatasets(request); }
[ "public", "final", "ListDatasetsPagedResponse", "listDatasets", "(", "String", "parent", ",", "String", "filter", ")", "{", "PROJECT_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listDatasets\"", ")", ";", "ListDatasetsRequest", "request", "=", "ListDatasets...
Lists datasets under a project. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); String filter = ""; for (Dataset element : dataLabeli...
[ "Lists", "datasets", "under", "a", "project", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L634-L639
12,405
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.deleteDataset
public final void deleteDataset(String name) { DATASET_PATH_TEMPLATE.validate(name, "deleteDataset"); DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); deleteDataset(request); }
java
public final void deleteDataset(String name) { DATASET_PATH_TEMPLATE.validate(name, "deleteDataset"); DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); deleteDataset(request); }
[ "public", "final", "void", "deleteDataset", "(", "String", "name", ")", "{", "DATASET_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"deleteDataset\"", ")", ";", "DeleteDatasetRequest", "request", "=", "DeleteDatasetRequest", ".", "newBuilder", "(", ")", "."...
Deletes a dataset by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); dataLabelingServiceClient.deleteDataset(formattedName); } </cod...
[ "Deletes", "a", "dataset", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L739-L743
12,406
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.getDataItem
public final DataItem getDataItem(String name) { DATA_ITEM_PATH_TEMPLATE.validate(name, "getDataItem"); GetDataItemRequest request = GetDataItemRequest.newBuilder().setName(name).build(); return getDataItem(request); }
java
public final DataItem getDataItem(String name) { DATA_ITEM_PATH_TEMPLATE.validate(name, "getDataItem"); GetDataItemRequest request = GetDataItemRequest.newBuilder().setName(name).build(); return getDataItem(request); }
[ "public", "final", "DataItem", "getDataItem", "(", "String", "name", ")", "{", "DATA_ITEM_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"getDataItem\"", ")", ";", "GetDataItemRequest", "request", "=", "GetDataItemRequest", ".", "newBuilder", "(", ")", ".", ...
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[D...
[ "Gets", "a", "data", "item", "in", "a", "dataset", "by", "resource", "name", ".", "This", "API", "can", "be", "called", "after", "data", "are", "imported", "into", "dataset", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1054-L1058
12,407
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listDataItems
public final ListDataItemsPagedResponse listDataItems(String parent, String filter) { DATASET_PATH_TEMPLATE.validate(parent, "listDataItems"); ListDataItemsRequest request = ListDataItemsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listDataItems(request); }
java
public final ListDataItemsPagedResponse listDataItems(String parent, String filter) { DATASET_PATH_TEMPLATE.validate(parent, "listDataItems"); ListDataItemsRequest request = ListDataItemsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listDataItems(request); }
[ "public", "final", "ListDataItemsPagedResponse", "listDataItems", "(", "String", "parent", ",", "String", "filter", ")", "{", "DATASET_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listDataItems\"", ")", ";", "ListDataItemsRequest", "request", "=", "ListData...
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJE...
[ "Lists", "data", "items", "in", "a", "dataset", ".", "This", "API", "can", "be", "called", "after", "data", "are", "imported", "into", "dataset", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1129-L1134
12,408
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.getAnnotatedDataset
public final AnnotatedDataset getAnnotatedDataset(String name) { ANNOTATED_DATASET_PATH_TEMPLATE.validate(name, "getAnnotatedDataset"); GetAnnotatedDatasetRequest request = GetAnnotatedDatasetRequest.newBuilder().setName(name).build(); return getAnnotatedDataset(request); }
java
public final AnnotatedDataset getAnnotatedDataset(String name) { ANNOTATED_DATASET_PATH_TEMPLATE.validate(name, "getAnnotatedDataset"); GetAnnotatedDatasetRequest request = GetAnnotatedDatasetRequest.newBuilder().setName(name).build(); return getAnnotatedDataset(request); }
[ "public", "final", "AnnotatedDataset", "getAnnotatedDataset", "(", "String", "name", ")", "{", "ANNOTATED_DATASET_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"getAnnotatedDataset\"", ")", ";", "GetAnnotatedDatasetRequest", "request", "=", "GetAnnotatedDatasetReques...
Gets an annotated dataset by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); AnnotatedDataset respon...
[ "Gets", "an", "annotated", "dataset", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1237-L1242
12,409
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listAnnotatedDatasets
public final ListAnnotatedDatasetsPagedResponse listAnnotatedDatasets( String parent, String filter) { DATASET_PATH_TEMPLATE.validate(parent, "listAnnotatedDatasets"); ListAnnotatedDatasetsRequest request = ListAnnotatedDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); ...
java
public final ListAnnotatedDatasetsPagedResponse listAnnotatedDatasets( String parent, String filter) { DATASET_PATH_TEMPLATE.validate(parent, "listAnnotatedDatasets"); ListAnnotatedDatasetsRequest request = ListAnnotatedDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); ...
[ "public", "final", "ListAnnotatedDatasetsPagedResponse", "listAnnotatedDatasets", "(", "String", "parent", ",", "String", "filter", ")", "{", "DATASET_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listAnnotatedDatasets\"", ")", ";", "ListAnnotatedDatasetsRequest",...
Lists annotated datasets for a dataset. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); String filter = ""; for (Annotat...
[ "Lists", "annotated", "datasets", "for", "a", "dataset", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1311-L1317
12,410
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.getExample
public final Example getExample(String name, String filter) { EXAMPLE_PATH_TEMPLATE.validate(name, "getExample"); GetExampleRequest request = GetExampleRequest.newBuilder().setName(name).setFilter(filter).build(); return getExample(request); }
java
public final Example getExample(String name, String filter) { EXAMPLE_PATH_TEMPLATE.validate(name, "getExample"); GetExampleRequest request = GetExampleRequest.newBuilder().setName(name).setFilter(filter).build(); return getExample(request); }
[ "public", "final", "Example", "getExample", "(", "String", "name", ",", "String", "filter", ")", "{", "EXAMPLE_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"getExample\"", ")", ";", "GetExampleRequest", "request", "=", "GetExampleRequest", ".", "newBuilder...
Gets an example by resource name, including both data and annotation. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatExampleName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMP...
[ "Gets", "an", "example", "by", "resource", "name", "including", "both", "data", "and", "annotation", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1916-L1921
12,411
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listExamples
public final ListExamplesPagedResponse listExamples(String parent, String filter) { ANNOTATED_DATASET_PATH_TEMPLATE.validate(parent, "listExamples"); ListExamplesRequest request = ListExamplesRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listExamples(request); }
java
public final ListExamplesPagedResponse listExamples(String parent, String filter) { ANNOTATED_DATASET_PATH_TEMPLATE.validate(parent, "listExamples"); ListExamplesRequest request = ListExamplesRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listExamples(request); }
[ "public", "final", "ListExamplesPagedResponse", "listExamples", "(", "String", "parent", ",", "String", "filter", ")", "{", "ANNOTATED_DATASET_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listExamples\"", ")", ";", "ListExamplesRequest", "request", "=", "Li...
Lists examples in an annotated dataset. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); ...
[ "Lists", "examples", "in", "an", "annotated", "dataset", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L1990-L1995
12,412
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.createAnnotationSpecSet
public final AnnotationSpecSet createAnnotationSpecSet( String parent, AnnotationSpecSet annotationSpecSet) { PROJECT_PATH_TEMPLATE.validate(parent, "createAnnotationSpecSet"); CreateAnnotationSpecSetRequest request = CreateAnnotationSpecSetRequest.newBuilder() .setParent(parent) ...
java
public final AnnotationSpecSet createAnnotationSpecSet( String parent, AnnotationSpecSet annotationSpecSet) { PROJECT_PATH_TEMPLATE.validate(parent, "createAnnotationSpecSet"); CreateAnnotationSpecSetRequest request = CreateAnnotationSpecSetRequest.newBuilder() .setParent(parent) ...
[ "public", "final", "AnnotationSpecSet", "createAnnotationSpecSet", "(", "String", "parent", ",", "AnnotationSpecSet", "annotationSpecSet", ")", "{", "PROJECT_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"createAnnotationSpecSet\"", ")", ";", "CreateAnnotationSpecS...
Creates an annotation spec set by providing a set of labels. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); AnnotationSpecSet annotationSpecSet = AnnotationS...
[ "Creates", "an", "annotation", "spec", "set", "by", "providing", "a", "set", "of", "labels", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2098-L2107
12,413
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.getAnnotationSpecSet
public final AnnotationSpecSet getAnnotationSpecSet(String name) { ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "getAnnotationSpecSet"); GetAnnotationSpecSetRequest request = GetAnnotationSpecSetRequest.newBuilder().setName(name).build(); return getAnnotationSpecSet(request); }
java
public final AnnotationSpecSet getAnnotationSpecSet(String name) { ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "getAnnotationSpecSet"); GetAnnotationSpecSetRequest request = GetAnnotationSpecSetRequest.newBuilder().setName(name).build(); return getAnnotationSpecSet(request); }
[ "public", "final", "AnnotationSpecSet", "getAnnotationSpecSet", "(", "String", "name", ")", "{", "ANNOTATION_SPEC_SET_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"getAnnotationSpecSet\"", ")", ";", "GetAnnotationSpecSetRequest", "request", "=", "GetAnnotationSpecSe...
Gets an annotation spec set by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]"); AnnotationSpecSet response = da...
[ "Gets", "an", "annotation", "spec", "set", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2176-L2181
12,414
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listAnnotationSpecSets
public final ListAnnotationSpecSetsPagedResponse listAnnotationSpecSets( String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listAnnotationSpecSets"); ListAnnotationSpecSetsRequest request = ListAnnotationSpecSetsRequest.newBuilder().setParent(parent).setFilter(filter).build();...
java
public final ListAnnotationSpecSetsPagedResponse listAnnotationSpecSets( String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listAnnotationSpecSets"); ListAnnotationSpecSetsRequest request = ListAnnotationSpecSetsRequest.newBuilder().setParent(parent).setFilter(filter).build();...
[ "public", "final", "ListAnnotationSpecSetsPagedResponse", "listAnnotationSpecSets", "(", "String", "parent", ",", "String", "filter", ")", "{", "PROJECT_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listAnnotationSpecSets\"", ")", ";", "ListAnnotationSpecSetsReque...
Lists annotation spec sets for a project. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); String filter = ""; for (AnnotationSpecSet ...
[ "Lists", "annotation", "spec", "sets", "for", "a", "project", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2249-L2255
12,415
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.deleteAnnotationSpecSet
public final void deleteAnnotationSpecSet(String name) { ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "deleteAnnotationSpecSet"); DeleteAnnotationSpecSetRequest request = DeleteAnnotationSpecSetRequest.newBuilder().setName(name).build(); deleteAnnotationSpecSet(request); }
java
public final void deleteAnnotationSpecSet(String name) { ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "deleteAnnotationSpecSet"); DeleteAnnotationSpecSetRequest request = DeleteAnnotationSpecSetRequest.newBuilder().setName(name).build(); deleteAnnotationSpecSet(request); }
[ "public", "final", "void", "deleteAnnotationSpecSet", "(", "String", "name", ")", "{", "ANNOTATION_SPEC_SET_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"deleteAnnotationSpecSet\"", ")", ";", "DeleteAnnotationSpecSetRequest", "request", "=", "DeleteAnnotationSpecSet...
Deletes an annotation spec set by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]"); dataLabelingServiceClient.de...
[ "Deletes", "an", "annotation", "spec", "set", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2357-L2362
12,416
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.getInstruction
public final Instruction getInstruction(String name) { INSTRUCTION_PATH_TEMPLATE.validate(name, "getInstruction"); GetInstructionRequest request = GetInstructionRequest.newBuilder().setName(name).build(); return getInstruction(request); }
java
public final Instruction getInstruction(String name) { INSTRUCTION_PATH_TEMPLATE.validate(name, "getInstruction"); GetInstructionRequest request = GetInstructionRequest.newBuilder().setName(name).build(); return getInstruction(request); }
[ "public", "final", "Instruction", "getInstruction", "(", "String", "name", ")", "{", "INSTRUCTION_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"getInstruction\"", ")", ";", "GetInstructionRequest", "request", "=", "GetInstructionRequest", ".", "newBuilder", "(...
Gets an instruction by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); Instruction response = dataLabelingServiceClient.getI...
[ "Gets", "an", "instruction", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2533-L2537
12,417
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.listInstructions
public final ListInstructionsPagedResponse listInstructions(String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listInstructions"); ListInstructionsRequest request = ListInstructionsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listInstructions(request)...
java
public final ListInstructionsPagedResponse listInstructions(String parent, String filter) { PROJECT_PATH_TEMPLATE.validate(parent, "listInstructions"); ListInstructionsRequest request = ListInstructionsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listInstructions(request)...
[ "public", "final", "ListInstructionsPagedResponse", "listInstructions", "(", "String", "parent", ",", "String", "filter", ")", "{", "PROJECT_PATH_TEMPLATE", ".", "validate", "(", "parent", ",", "\"listInstructions\"", ")", ";", "ListInstructionsRequest", "request", "=",...
Lists instructions for a project. Pagination is supported. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); String filter = ""; for (Instruction element : data...
[ "Lists", "instructions", "for", "a", "project", ".", "Pagination", "is", "supported", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2604-L2609
12,418
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.deleteInstruction
public final void deleteInstruction(String name) { INSTRUCTION_PATH_TEMPLATE.validate(name, "deleteInstruction"); DeleteInstructionRequest request = DeleteInstructionRequest.newBuilder().setName(name).build(); deleteInstruction(request); }
java
public final void deleteInstruction(String name) { INSTRUCTION_PATH_TEMPLATE.validate(name, "deleteInstruction"); DeleteInstructionRequest request = DeleteInstructionRequest.newBuilder().setName(name).build(); deleteInstruction(request); }
[ "public", "final", "void", "deleteInstruction", "(", "String", "name", ")", "{", "INSTRUCTION_PATH_TEMPLATE", ".", "validate", "(", "name", ",", "\"deleteInstruction\"", ")", ";", "DeleteInstructionRequest", "request", "=", "DeleteInstructionRequest", ".", "newBuilder",...
Deletes an instruction object by resource name. <p>Sample code: <pre><code> try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); dataLabelingServiceClient.deleteInstruction...
[ "Deletes", "an", "instruction", "object", "by", "resource", "name", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L2710-L2714
12,419
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/DnsException.java
DnsException.translateAndThrow
static DnsException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DnsException(UNKNOWN_CODE, ex.getMessage(), ex.getCause()); }
java
static DnsException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DnsException(UNKNOWN_CODE, ex.getMessage(), ex.getCause()); }
[ "static", "DnsException", "translateAndThrow", "(", "RetryHelperException", "ex", ")", "{", "BaseServiceException", ".", "translate", "(", "ex", ")", ";", "throw", "new", "DnsException", "(", "UNKNOWN_CODE", ",", "ex", ".", "getMessage", "(", ")", ",", "ex", "...
Translate RetryHelperException to the DnsException that caused the error. This method will always throw an exception. @throws DnsException when {@code ex} was caused by a {@code DnsException}
[ "Translate", "RetryHelperException", "to", "the", "DnsException", "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-dns/src/main/java/com/google/cloud/dns/DnsException.java#L59-L62
12,420
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutationBatcher.java
BulkMutationBatcher.close
public void close(Duration duration) throws InterruptedException, TimeoutException { closed = true; long deadlineMs = System.currentTimeMillis() + duration.toMillis(); synchronized (lock) { while (numOutstanding.get() > 0) { long waitMs = deadlineMs - System.currentTimeMillis(); if (w...
java
public void close(Duration duration) throws InterruptedException, TimeoutException { closed = true; long deadlineMs = System.currentTimeMillis() + duration.toMillis(); synchronized (lock) { while (numOutstanding.get() > 0) { long waitMs = deadlineMs - System.currentTimeMillis(); if (w...
[ "public", "void", "close", "(", "Duration", "duration", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "closed", "=", "true", ";", "long", "deadlineMs", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "duration", ".", "toMillis", ...
Prevents further mutations and waits for all outstanding mutations to complete. @throws BulkMutationFailure If any mutations failed. @throws InterruptedException If interrupted. @throws TimeoutException If the outstanding requests don't finish in time.
[ "Prevents", "further", "mutations", "and", "waits", "for", "all", "outstanding", "mutations", "to", "complete", "." ]
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/models/BulkMutationBatcher.java#L70-L88
12,421
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutationBatcher.java
BulkMutationBatcher.add
public ApiFuture<Void> add(final RowMutation rowMutation) { Preconditions.checkState(!closed, "BulkMutations has been closed"); numOutstanding.incrementAndGet(); ApiFuture<Void> future = callable.futureCall(rowMutation); ApiFutures.addCallback( future, new ApiFutureCallback<Void>() { ...
java
public ApiFuture<Void> add(final RowMutation rowMutation) { Preconditions.checkState(!closed, "BulkMutations has been closed"); numOutstanding.incrementAndGet(); ApiFuture<Void> future = callable.futureCall(rowMutation); ApiFutures.addCallback( future, new ApiFutureCallback<Void>() { ...
[ "public", "ApiFuture", "<", "Void", ">", "add", "(", "final", "RowMutation", "rowMutation", ")", "{", "Preconditions", ".", "checkState", "(", "!", "closed", ",", "\"BulkMutations has been closed\"", ")", ";", "numOutstanding", ".", "incrementAndGet", "(", ")", ...
Queues the mutation to be batched and sent. Please note that the order of mutations is not guaranteed. @throws IllegalStateException If this instance has been closed.
[ "Queues", "the", "mutation", "to", "be", "batched", "and", "sent", ".", "Please", "note", "that", "the", "order", "of", "mutations", "is", "not", "guaranteed", "." ]
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/models/BulkMutationBatcher.java#L96-L118
12,422
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java
HealthCheckClient.patchHealthCheck
@BetaApi public final Operation patchHealthCheck( ProjectGlobalHealthCheckName healthCheck, HealthCheck healthCheckResource, List<String> fieldMask) { PatchHealthCheckHttpRequest request = PatchHealthCheckHttpRequest.newBuilder() .setHealthCheck(healthCheck == null ? null : ...
java
@BetaApi public final Operation patchHealthCheck( ProjectGlobalHealthCheckName healthCheck, HealthCheck healthCheckResource, List<String> fieldMask) { PatchHealthCheckHttpRequest request = PatchHealthCheckHttpRequest.newBuilder() .setHealthCheck(healthCheck == null ? null : ...
[ "@", "BetaApi", "public", "final", "Operation", "patchHealthCheck", "(", "ProjectGlobalHealthCheckName", "healthCheck", ",", "HealthCheck", "healthCheckResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "PatchHealthCheckHttpRequest", "request", "=", "Pat...
Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. <p>Sample code: <pre><code> try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) { ProjectGlobalHealthCheckN...
[ "Updates", "a", "HealthCheck", "resource", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", ".", "This", "method", "supports", "PATCH", "semantics", "and", "uses", "the", "JSON", "merge", "patch", "format", "and"...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java#L629-L642
12,423
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java
GqlQuery.getNamedBindings
public Map<String, Object> getNamedBindings() { ImmutableMap.Builder<String, Object> builder = ImmutableSortedMap.naturalOrder(); for (Map.Entry<String, Binding> binding : namedBindings.entrySet()) { builder.put(binding.getKey(), binding.getValue().getCursorOrValue()); } return builder.build(); ...
java
public Map<String, Object> getNamedBindings() { ImmutableMap.Builder<String, Object> builder = ImmutableSortedMap.naturalOrder(); for (Map.Entry<String, Binding> binding : namedBindings.entrySet()) { builder.put(binding.getKey(), binding.getValue().getCursorOrValue()); } return builder.build(); ...
[ "public", "Map", "<", "String", ",", "Object", ">", "getNamedBindings", "(", ")", "{", "ImmutableMap", ".", "Builder", "<", "String", ",", "Object", ">", "builder", "=", "ImmutableSortedMap", ".", "naturalOrder", "(", ")", ";", "for", "(", "Map", ".", "E...
Returns an immutable map of named bindings.
[ "Returns", "an", "immutable", "map", "of", "named", "bindings", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java#L437-L443
12,424
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.createTable
public void createTable() { // [START bigtable_create_table] // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Table does not exist, creating table: " + tableId); CreateTableRequest createTableRequest = CreateTableRequest.of(table...
java
public void createTable() { // [START bigtable_create_table] // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Table does not exist, creating table: " + tableId); CreateTableRequest createTableRequest = CreateTableRequest.of(table...
[ "public", "void", "createTable", "(", ")", "{", "// [START bigtable_create_table]", "// Checks if table exists, creates table if does not exist.", "if", "(", "!", "adminClient", ".", "exists", "(", "tableId", ")", ")", "{", "System", ".", "out", ".", "println", "(", ...
Demonstrates how to create a table with the specified configuration.
[ "Demonstrates", "how", "to", "create", "a", "table", "with", "the", "specified", "configuration", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L116-L126
12,425
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.listAllTables
public void listAllTables() { System.out.println("\nListing tables in current instance"); // [START bigtable_list_tables] // Lists tables in the current instance. try { List<String> tableIds = adminClient.listTables(); for (String tableId : tableIds) { System.out.println(tableId); ...
java
public void listAllTables() { System.out.println("\nListing tables in current instance"); // [START bigtable_list_tables] // Lists tables in the current instance. try { List<String> tableIds = adminClient.listTables(); for (String tableId : tableIds) { System.out.println(tableId); ...
[ "public", "void", "listAllTables", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"\\nListing tables in current instance\"", ")", ";", "// [START bigtable_list_tables]", "// Lists tables in the current instance.", "try", "{", "List", "<", "String", ">", "ta...
Demonstrates how to list all tables within an instance.
[ "Demonstrates", "how", "to", "list", "all", "tables", "within", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L129-L142
12,426
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.addFamilyWithMaxAgeRule
public void addFamilyWithMaxAgeRule() { System.out.printf("%nCreating column family %s with max age GC rule%n", COLUMN_FAMILY_1); // [START bigtable_create_family_gc_max_age] // Creates a column family with GC policy : maximum age // where age = current time minus cell timestamp // Defines the GC r...
java
public void addFamilyWithMaxAgeRule() { System.out.printf("%nCreating column family %s with max age GC rule%n", COLUMN_FAMILY_1); // [START bigtable_create_family_gc_max_age] // Creates a column family with GC policy : maximum age // where age = current time minus cell timestamp // Defines the GC r...
[ "public", "void", "addFamilyWithMaxAgeRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nCreating column family %s with max age GC rule%n\"", ",", "COLUMN_FAMILY_1", ")", ";", "// [START bigtable_create_family_gc_max_age]", "// Creates a column family with GC po...
Demonstrates how to create a new instance of the DurationRule.
[ "Demonstrates", "how", "to", "create", "a", "new", "instance", "of", "the", "DurationRule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L166-L188
12,427
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.addFamilyWithMaxVersionsRule
public void addFamilyWithMaxVersionsRule() { System.out.printf("%nCreating column family %s with max versions GC rule%n", COLUMN_FAMILY_2); // [START bigtable_create_family_gc_max_versions] // Creates a column family with GC policy : most recent N versions // where 1 = most recent version // Define...
java
public void addFamilyWithMaxVersionsRule() { System.out.printf("%nCreating column family %s with max versions GC rule%n", COLUMN_FAMILY_2); // [START bigtable_create_family_gc_max_versions] // Creates a column family with GC policy : most recent N versions // where 1 = most recent version // Define...
[ "public", "void", "addFamilyWithMaxVersionsRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nCreating column family %s with max versions GC rule%n\"", ",", "COLUMN_FAMILY_2", ")", ";", "// [START bigtable_create_family_gc_max_versions]", "// Creates a column fa...
Demonstrates how to create a new instance of the VersionRule.
[ "Demonstrates", "how", "to", "create", "a", "new", "instance", "of", "the", "VersionRule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L191-L213
12,428
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.addFamilyWithUnionRule
public void addFamilyWithUnionRule() { System.out.printf("%nCreating column family %s with union GC rule%n", COLUMN_FAMILY_3); // [START bigtable_create_family_gc_union] // Creates a column family with GC policy to drop data that matches at least one condition. // Defines a list of GC rules to drop cel...
java
public void addFamilyWithUnionRule() { System.out.printf("%nCreating column family %s with union GC rule%n", COLUMN_FAMILY_3); // [START bigtable_create_family_gc_union] // Creates a column family with GC policy to drop data that matches at least one condition. // Defines a list of GC rules to drop cel...
[ "public", "void", "addFamilyWithUnionRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nCreating column family %s with union GC rule%n\"", ",", "COLUMN_FAMILY_3", ")", ";", "// [START bigtable_create_family_gc_union]", "// Creates a column family with GC policy ...
Demonstrates how to create a new instance of the UnionRule.
[ "Demonstrates", "how", "to", "create", "a", "new", "instance", "of", "the", "UnionRule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L216-L239
12,429
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.addFamilyWithIntersectionRule
public void addFamilyWithIntersectionRule() { System.out.printf("%nCreating column family %s with intersection GC rule%n", COLUMN_FAMILY_4); // [START bigtable_create_family_gc_intersection] // Creates a column family with GC policy to drop data that matches all conditions. // Defines a GC rule to drop...
java
public void addFamilyWithIntersectionRule() { System.out.printf("%nCreating column family %s with intersection GC rule%n", COLUMN_FAMILY_4); // [START bigtable_create_family_gc_intersection] // Creates a column family with GC policy to drop data that matches all conditions. // Defines a GC rule to drop...
[ "public", "void", "addFamilyWithIntersectionRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nCreating column family %s with intersection GC rule%n\"", ",", "COLUMN_FAMILY_4", ")", ";", "// [START bigtable_create_family_gc_intersection]", "// Creates a column f...
Demonstrates how to create a new instance of the IntersectionRule.
[ "Demonstrates", "how", "to", "create", "a", "new", "instance", "of", "the", "IntersectionRule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L242-L265
12,430
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.addFamilyWithNestedRule
public void addFamilyWithNestedRule() { System.out.printf("%nCreating column family %s with a nested GC rule%n", COLUMN_FAMILY_5); // [START bigtable_create_family_gc_nested] // Creates a nested GC rule: // Drop cells that are either older than the 10 recent versions // OR // Drop cells that are...
java
public void addFamilyWithNestedRule() { System.out.printf("%nCreating column family %s with a nested GC rule%n", COLUMN_FAMILY_5); // [START bigtable_create_family_gc_nested] // Creates a nested GC rule: // Drop cells that are either older than the 10 recent versions // OR // Drop cells that are...
[ "public", "void", "addFamilyWithNestedRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nCreating column family %s with a nested GC rule%n\"", ",", "COLUMN_FAMILY_5", ")", ";", "// [START bigtable_create_family_gc_nested]", "// Creates a nested GC rule:", "// ...
Demonstrates how to create a nested rule using the IntersectionRule and UnionRule.
[ "Demonstrates", "how", "to", "create", "a", "nested", "rule", "using", "the", "IntersectionRule", "and", "UnionRule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L268-L294
12,431
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.modifyColumnFamilyRule
public void modifyColumnFamilyRule() { System.out.printf("%nUpdating column family %s GC rule%n", COLUMN_FAMILY_1); // [START bigtable_update_gc_rule] // Updates the column family metadata to update the GC rule. // Updates a column family GC rule. VersionRule versionRule = GCRULES.maxVersions(1); ...
java
public void modifyColumnFamilyRule() { System.out.printf("%nUpdating column family %s GC rule%n", COLUMN_FAMILY_1); // [START bigtable_update_gc_rule] // Updates the column family metadata to update the GC rule. // Updates a column family GC rule. VersionRule versionRule = GCRULES.maxVersions(1); ...
[ "public", "void", "modifyColumnFamilyRule", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nUpdating column family %s GC rule%n\"", ",", "COLUMN_FAMILY_1", ")", ";", "// [START bigtable_update_gc_rule]", "// Updates the column family metadata to update the GC rule."...
Demonstrates how to modify a column family's rule.
[ "Demonstrates", "how", "to", "modify", "a", "column", "family", "s", "rule", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L317-L335
12,432
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.printModifiedColumnFamily
public void printModifiedColumnFamily() { System.out.printf("%nPrint updated GC rule for column family %s%n", COLUMN_FAMILY_1); // [START bigtable_family_get_gc_rule] try { Table table = adminClient.getTable(tableId); Collection<ColumnFamily> columnFamilies = table.getColumnFamilies(); for...
java
public void printModifiedColumnFamily() { System.out.printf("%nPrint updated GC rule for column family %s%n", COLUMN_FAMILY_1); // [START bigtable_family_get_gc_rule] try { Table table = adminClient.getTable(tableId); Collection<ColumnFamily> columnFamilies = table.getColumnFamilies(); for...
[ "public", "void", "printModifiedColumnFamily", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%nPrint updated GC rule for column family %s%n\"", ",", "COLUMN_FAMILY_1", ")", ";", "// [START bigtable_family_get_gc_rule]", "try", "{", "Table", "table", "=", "...
Demonstrates how to print the modified column family.
[ "Demonstrates", "how", "to", "print", "the", "modified", "column", "family", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L338-L355
12,433
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.deleteColumnFamily
public void deleteColumnFamily() { System.out.println("\nDelete column family: " + COLUMN_FAMILY_2); // [START bigtable_delete_family] // Deletes a column family. try { ModifyColumnFamiliesRequest deleted = ModifyColumnFamiliesRequest.of(tableId).dropFamily(COLUMN_FAMILY_2); adminC...
java
public void deleteColumnFamily() { System.out.println("\nDelete column family: " + COLUMN_FAMILY_2); // [START bigtable_delete_family] // Deletes a column family. try { ModifyColumnFamiliesRequest deleted = ModifyColumnFamiliesRequest.of(tableId).dropFamily(COLUMN_FAMILY_2); adminC...
[ "public", "void", "deleteColumnFamily", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"\\nDelete column family: \"", "+", "COLUMN_FAMILY_2", ")", ";", "// [START bigtable_delete_family]", "// Deletes a column family.", "try", "{", "ModifyColumnFamiliesRequest"...
Demonstrates how to delete a column family.
[ "Demonstrates", "how", "to", "delete", "a", "column", "family", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L358-L371
12,434
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java
TableAdminExample.deleteTable
public void deleteTable() { // [START bigtable_delete_table] // Deletes the entire table. System.out.println("\nDelete table: " + tableId); try { adminClient.deleteTable(tableId); System.out.printf("Table: %s deleted successfully%n", tableId); } catch (NotFoundException e) { System...
java
public void deleteTable() { // [START bigtable_delete_table] // Deletes the entire table. System.out.println("\nDelete table: " + tableId); try { adminClient.deleteTable(tableId); System.out.printf("Table: %s deleted successfully%n", tableId); } catch (NotFoundException e) { System...
[ "public", "void", "deleteTable", "(", ")", "{", "// [START bigtable_delete_table]", "// Deletes the entire table.", "System", ".", "out", ".", "println", "(", "\"\\nDelete table: \"", "+", "tableId", ")", ";", "try", "{", "adminClient", ".", "deleteTable", "(", "tab...
Demonstrates how to delete a table.
[ "Demonstrates", "how", "to", "delete", "a", "table", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigtable/TableAdminExample.java#L374-L385
12,435
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.forDocument
static Watch forDocument(DocumentReference documentReference) { Target.Builder target = Target.newBuilder(); target.getDocumentsBuilder().addDocuments(documentReference.getName()); target.setTargetId(WATCH_TARGET_ID); return new Watch( (FirestoreImpl) documentReference.getFirestore(), d...
java
static Watch forDocument(DocumentReference documentReference) { Target.Builder target = Target.newBuilder(); target.getDocumentsBuilder().addDocuments(documentReference.getName()); target.setTargetId(WATCH_TARGET_ID); return new Watch( (FirestoreImpl) documentReference.getFirestore(), d...
[ "static", "Watch", "forDocument", "(", "DocumentReference", "documentReference", ")", "{", "Target", ".", "Builder", "target", "=", "Target", ".", "newBuilder", "(", ")", ";", "target", ".", "getDocumentsBuilder", "(", ")", ".", "addDocuments", "(", "documentRef...
Creates a new Watch instance that listens on DocumentReferences. @param documentReference The document reference for this watch. @return A newly created Watch instance.
[ "Creates", "a", "new", "Watch", "instance", "that", "listens", "on", "DocumentReferences", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L153-L162
12,436
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.forQuery
static Watch forQuery(Query query) { Target.Builder target = Target.newBuilder(); target.setQuery( QueryTarget.newBuilder() .setStructuredQuery(query.buildQuery()) .setParent(query.getResourcePath().getParent().getName()) .build()); target.setTargetId(WATCH_TARGET...
java
static Watch forQuery(Query query) { Target.Builder target = Target.newBuilder(); target.setQuery( QueryTarget.newBuilder() .setStructuredQuery(query.buildQuery()) .setParent(query.getResourcePath().getParent().getName()) .build()); target.setTargetId(WATCH_TARGET...
[ "static", "Watch", "forQuery", "(", "Query", "query", ")", "{", "Target", ".", "Builder", "target", "=", "Target", ".", "newBuilder", "(", ")", ";", "target", ".", "setQuery", "(", "QueryTarget", ".", "newBuilder", "(", ")", ".", "setStructuredQuery", "(",...
Creates a new Watch instance that listens on Queries. @param query The query used for this watch. @return A newly created Watch instance.
[ "Creates", "a", "new", "Watch", "instance", "that", "listens", "on", "Queries", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L170-L180
12,437
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.runWatch
ListenerRegistration runWatch( final Executor userCallbackExecutor, EventListener<QuerySnapshot> listener) { boolean watchStarted = isActive.compareAndSet(false, true); Preconditions.checkState(watchStarted, "Can't restart an already active watch"); this.userCallbackExecutor = userCallbackExecutor; ...
java
ListenerRegistration runWatch( final Executor userCallbackExecutor, EventListener<QuerySnapshot> listener) { boolean watchStarted = isActive.compareAndSet(false, true); Preconditions.checkState(watchStarted, "Can't restart an already active watch"); this.userCallbackExecutor = userCallbackExecutor; ...
[ "ListenerRegistration", "runWatch", "(", "final", "Executor", "userCallbackExecutor", ",", "EventListener", "<", "QuerySnapshot", ">", "listener", ")", "{", "boolean", "watchStarted", "=", "isActive", ".", "compareAndSet", "(", "false", ",", "true", ")", ";", "Pre...
API entry point that starts the Watch stream.
[ "API", "entry", "point", "that", "starts", "the", "Watch", "stream", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L278-L315
12,438
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.currentSize
private int currentSize() { ChangeSet changeSet = extractChanges(Timestamp.now()); return documentSet.size() + changeSet.adds.size() - changeSet.deletes.size(); }
java
private int currentSize() { ChangeSet changeSet = extractChanges(Timestamp.now()); return documentSet.size() + changeSet.adds.size() - changeSet.deletes.size(); }
[ "private", "int", "currentSize", "(", ")", "{", "ChangeSet", "changeSet", "=", "extractChanges", "(", "Timestamp", ".", "now", "(", ")", ")", ";", "return", "documentSet", ".", "size", "(", ")", "+", "changeSet", ".", "adds", ".", "size", "(", ")", "-"...
Returns the current count of all documents, including the changes from the current changeMap.
[ "Returns", "the", "current", "count", "of", "all", "documents", "including", "the", "changes", "from", "the", "current", "changeMap", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L320-L323
12,439
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.resetDocs
private void resetDocs() { changeMap.clear(); resumeToken = null; for (DocumentSnapshot snapshot : documentSet) { // Mark each document as deleted. If documents are not deleted, they will be send again by // the server. changeMap.put(snapshot.getReference().getResourcePath(), null); ...
java
private void resetDocs() { changeMap.clear(); resumeToken = null; for (DocumentSnapshot snapshot : documentSet) { // Mark each document as deleted. If documents are not deleted, they will be send again by // the server. changeMap.put(snapshot.getReference().getResourcePath(), null); ...
[ "private", "void", "resetDocs", "(", ")", "{", "changeMap", ".", "clear", "(", ")", ";", "resumeToken", "=", "null", ";", "for", "(", "DocumentSnapshot", "snapshot", ":", "documentSet", ")", "{", "// Mark each document as deleted. If documents are not deleted, they w...
Helper to clear the docs on RESET or filter mismatch.
[ "Helper", "to", "clear", "the", "docs", "on", "RESET", "or", "filter", "mismatch", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L326-L337
12,440
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.maybeReopenStream
private void maybeReopenStream(Throwable throwable) { if (isActive.get() && !isPermanentError(throwable)) { if (isResourceExhaustedError(throwable)) { nextAttempt = backoff.createNextAttempt(nextAttempt); } changeMap.clear(); resetStream(); } else { closeStream(throwable);...
java
private void maybeReopenStream(Throwable throwable) { if (isActive.get() && !isPermanentError(throwable)) { if (isResourceExhaustedError(throwable)) { nextAttempt = backoff.createNextAttempt(nextAttempt); } changeMap.clear(); resetStream(); } else { closeStream(throwable);...
[ "private", "void", "maybeReopenStream", "(", "Throwable", "throwable", ")", "{", "if", "(", "isActive", ".", "get", "(", ")", "&&", "!", "isPermanentError", "(", "throwable", ")", ")", "{", "if", "(", "isResourceExhaustedError", "(", "throwable", ")", ")", ...
Re-opens the stream unless the specified error is considered permanent. Clears the change map.
[ "Re", "-", "opens", "the", "stream", "unless", "the", "specified", "error", "is", "considered", "permanent", ".", "Clears", "the", "change", "map", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L368-L379
12,441
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.initStream
private void initStream() { firestoreExecutor.schedule( new Runnable() { @Override public void run() { if (!isActive.get()) { return; } synchronized (Watch.this) { if (!isActive.get()) { return; ...
java
private void initStream() { firestoreExecutor.schedule( new Runnable() { @Override public void run() { if (!isActive.get()) { return; } synchronized (Watch.this) { if (!isActive.get()) { return; ...
[ "private", "void", "initStream", "(", ")", "{", "firestoreExecutor", ".", "schedule", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "if", "(", "!", "isActive", ".", "get", "(", ")", ")", "{", "return"...
Initializes a new stream to the backend with backoff.
[ "Initializes", "a", "new", "stream", "to", "the", "backend", "with", "backoff", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L392-L426
12,442
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.affectsTarget
private boolean affectsTarget(List<Integer> targetIds, int currentId) { return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId); }
java
private boolean affectsTarget(List<Integer> targetIds, int currentId) { return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId); }
[ "private", "boolean", "affectsTarget", "(", "List", "<", "Integer", ">", "targetIds", ",", "int", "currentId", ")", "{", "return", "targetIds", "==", "null", "||", "targetIds", ".", "isEmpty", "(", ")", "||", "targetIds", ".", "contains", "(", "currentId", ...
Checks if the current target id is included in the list of target ids. Returns true if no targetIds are provided.
[ "Checks", "if", "the", "current", "target", "id", "is", "included", "in", "the", "list", "of", "target", "ids", ".", "Returns", "true", "if", "no", "targetIds", "are", "provided", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L432-L434
12,443
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.extractChanges
private ChangeSet extractChanges(Timestamp readTime) { ChangeSet changeSet = new ChangeSet(); for (Entry<ResourcePath, Document> change : changeMap.entrySet()) { if (change.getValue() == null) { if (documentSet.contains(change.getKey())) { changeSet.deletes.add(documentSet.getDocument(c...
java
private ChangeSet extractChanges(Timestamp readTime) { ChangeSet changeSet = new ChangeSet(); for (Entry<ResourcePath, Document> change : changeMap.entrySet()) { if (change.getValue() == null) { if (documentSet.contains(change.getKey())) { changeSet.deletes.add(documentSet.getDocument(c...
[ "private", "ChangeSet", "extractChanges", "(", "Timestamp", "readTime", ")", "{", "ChangeSet", "changeSet", "=", "new", "ChangeSet", "(", ")", ";", "for", "(", "Entry", "<", "ResourcePath", ",", "Document", ">", "change", ":", "changeMap", ".", "entrySet", "...
Splits up document changes into removals, additions, and updates.
[ "Splits", "up", "document", "changes", "into", "removals", "additions", "and", "updates", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L437-L459
12,444
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.pushSnapshot
private void pushSnapshot(final Timestamp readTime, ByteString nextResumeToken) { final List<DocumentChange> changes = computeSnapshot(readTime); if (!hasPushed || !changes.isEmpty()) { final QuerySnapshot querySnapshot = QuerySnapshot.withChanges(query, readTime, documentSet, changes); us...
java
private void pushSnapshot(final Timestamp readTime, ByteString nextResumeToken) { final List<DocumentChange> changes = computeSnapshot(readTime); if (!hasPushed || !changes.isEmpty()) { final QuerySnapshot querySnapshot = QuerySnapshot.withChanges(query, readTime, documentSet, changes); us...
[ "private", "void", "pushSnapshot", "(", "final", "Timestamp", "readTime", ",", "ByteString", "nextResumeToken", ")", "{", "final", "List", "<", "DocumentChange", ">", "changes", "=", "computeSnapshot", "(", "readTime", ")", ";", "if", "(", "!", "hasPushed", "|...
Assembles a new snapshot from the current set of changes and invokes the user's callback. Clears the current changes on completion.
[ "Assembles", "a", "new", "snapshot", "from", "the", "current", "set", "of", "changes", "and", "invokes", "the", "user", "s", "callback", ".", "Clears", "the", "current", "changes", "on", "completion", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L465-L482
12,445
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.deleteDoc
private DocumentChange deleteDoc(QueryDocumentSnapshot oldDocument) { ResourcePath resourcePath = oldDocument.getReference().getResourcePath(); int oldIndex = documentSet.indexOf(resourcePath); documentSet = documentSet.remove(resourcePath); return new DocumentChange(oldDocument, Type.REMOVED, oldIndex,...
java
private DocumentChange deleteDoc(QueryDocumentSnapshot oldDocument) { ResourcePath resourcePath = oldDocument.getReference().getResourcePath(); int oldIndex = documentSet.indexOf(resourcePath); documentSet = documentSet.remove(resourcePath); return new DocumentChange(oldDocument, Type.REMOVED, oldIndex,...
[ "private", "DocumentChange", "deleteDoc", "(", "QueryDocumentSnapshot", "oldDocument", ")", "{", "ResourcePath", "resourcePath", "=", "oldDocument", ".", "getReference", "(", ")", ".", "getResourcePath", "(", ")", ";", "int", "oldIndex", "=", "documentSet", ".", "...
Applies a document delete to the document tree. Returns the corresponding DocumentChange event.
[ "Applies", "a", "document", "delete", "to", "the", "document", "tree", ".", "Returns", "the", "corresponding", "DocumentChange", "event", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L487-L492
12,446
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.addDoc
private DocumentChange addDoc(QueryDocumentSnapshot newDocument) { ResourcePath resourcePath = newDocument.getReference().getResourcePath(); documentSet = documentSet.add(newDocument); int newIndex = documentSet.indexOf(resourcePath); return new DocumentChange(newDocument, Type.ADDED, -1, newIndex); }
java
private DocumentChange addDoc(QueryDocumentSnapshot newDocument) { ResourcePath resourcePath = newDocument.getReference().getResourcePath(); documentSet = documentSet.add(newDocument); int newIndex = documentSet.indexOf(resourcePath); return new DocumentChange(newDocument, Type.ADDED, -1, newIndex); }
[ "private", "DocumentChange", "addDoc", "(", "QueryDocumentSnapshot", "newDocument", ")", "{", "ResourcePath", "resourcePath", "=", "newDocument", ".", "getReference", "(", ")", ".", "getResourcePath", "(", ")", ";", "documentSet", "=", "documentSet", ".", "add", "...
Applies a document add to the document tree. Returns the corresponding DocumentChange event.
[ "Applies", "a", "document", "add", "to", "the", "document", "tree", ".", "Returns", "the", "corresponding", "DocumentChange", "event", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L497-L502
12,447
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.modifyDoc
@Nullable private DocumentChange modifyDoc(QueryDocumentSnapshot newDocument) { ResourcePath resourcePath = newDocument.getReference().getResourcePath(); DocumentSnapshot oldDocument = documentSet.getDocument(resourcePath); if (!oldDocument.getUpdateTime().equals(newDocument.getUpdateTime())) { int...
java
@Nullable private DocumentChange modifyDoc(QueryDocumentSnapshot newDocument) { ResourcePath resourcePath = newDocument.getReference().getResourcePath(); DocumentSnapshot oldDocument = documentSet.getDocument(resourcePath); if (!oldDocument.getUpdateTime().equals(newDocument.getUpdateTime())) { int...
[ "@", "Nullable", "private", "DocumentChange", "modifyDoc", "(", "QueryDocumentSnapshot", "newDocument", ")", "{", "ResourcePath", "resourcePath", "=", "newDocument", ".", "getReference", "(", ")", ".", "getResourcePath", "(", ")", ";", "DocumentSnapshot", "oldDocument...
Applies a document modification to the document tree. Returns the DocumentChange event for successful modifications.
[ "Applies", "a", "document", "modification", "to", "the", "document", "tree", ".", "Returns", "the", "DocumentChange", "event", "for", "successful", "modifications", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L508-L521
12,448
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.computeSnapshot
private List<DocumentChange> computeSnapshot(Timestamp readTime) { List<DocumentChange> appliedChanges = new ArrayList<>(); ChangeSet changeSet = extractChanges(readTime); // Process the sorted changes in the order that is expected by our clients (removals, additions, // and then modifications). We al...
java
private List<DocumentChange> computeSnapshot(Timestamp readTime) { List<DocumentChange> appliedChanges = new ArrayList<>(); ChangeSet changeSet = extractChanges(readTime); // Process the sorted changes in the order that is expected by our clients (removals, additions, // and then modifications). We al...
[ "private", "List", "<", "DocumentChange", ">", "computeSnapshot", "(", "Timestamp", "readTime", ")", "{", "List", "<", "DocumentChange", ">", "appliedChanges", "=", "new", "ArrayList", "<>", "(", ")", ";", "ChangeSet", "changeSet", "=", "extractChanges", "(", ...
Applies the mutations in changeMap to the document tree. Modified 'documentSet' in-place and returns the changed documents. @param readTime The time at which this snapshot was obtained.
[ "Applies", "the", "mutations", "in", "changeMap", "to", "the", "document", "tree", ".", "Modified", "documentSet", "in", "-", "place", "and", "returns", "the", "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/Watch.java#L529-L556
12,449
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.isPermanentError
private static boolean isPermanentError(Throwable throwable) { Status status = getStatus(throwable); switch (status.getCode()) { case CANCELLED: case UNKNOWN: case DEADLINE_EXCEEDED: case RESOURCE_EXHAUSTED: case INTERNAL: case UNAVAILABLE: case UNAUTHENTICATED: ...
java
private static boolean isPermanentError(Throwable throwable) { Status status = getStatus(throwable); switch (status.getCode()) { case CANCELLED: case UNKNOWN: case DEADLINE_EXCEEDED: case RESOURCE_EXHAUSTED: case INTERNAL: case UNAVAILABLE: case UNAUTHENTICATED: ...
[ "private", "static", "boolean", "isPermanentError", "(", "Throwable", "throwable", ")", "{", "Status", "status", "=", "getStatus", "(", "throwable", ")", ";", "switch", "(", "status", ".", "getCode", "(", ")", ")", "{", "case", "CANCELLED", ":", "case", "U...
Determines whether a GRPC Error is considered permanent and should not be retried.
[ "Determines", "whether", "a", "GRPC", "Error", "is", "considered", "permanent", "and", "should", "not", "be", "retried", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L559-L574
12,450
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.getStatus
private static Status getStatus(Throwable throwable) { Status status = Status.UNKNOWN; if (throwable instanceof StatusRuntimeException) { status = ((StatusRuntimeException) throwable).getStatus(); } else if (throwable instanceof StatusException) { status = ((StatusException) throwable).getStatu...
java
private static Status getStatus(Throwable throwable) { Status status = Status.UNKNOWN; if (throwable instanceof StatusRuntimeException) { status = ((StatusRuntimeException) throwable).getStatus(); } else if (throwable instanceof StatusException) { status = ((StatusException) throwable).getStatu...
[ "private", "static", "Status", "getStatus", "(", "Throwable", "throwable", ")", "{", "Status", "status", "=", "Status", ".", "UNKNOWN", ";", "if", "(", "throwable", "instanceof", "StatusRuntimeException", ")", "{", "status", "=", "(", "(", "StatusRuntimeExceptio...
Extracts the GRPC status code if available. Returns UNKNOWN for non-GRPC exceptions.
[ "Extracts", "the", "GRPC", "status", "code", "if", "available", ".", "Returns", "UNKNOWN", "for", "non", "-", "GRPC", "exceptions", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L577-L586
12,451
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java
FirewallClient.patchFirewall
@BetaApi public final Operation patchFirewall( ProjectGlobalFirewallName firewall, Firewall firewallResource, List<String> fieldMask) { PatchFirewallHttpRequest request = PatchFirewallHttpRequest.newBuilder() .setFirewall(firewall == null ? null : firewall.toString()) .setFi...
java
@BetaApi public final Operation patchFirewall( ProjectGlobalFirewallName firewall, Firewall firewallResource, List<String> fieldMask) { PatchFirewallHttpRequest request = PatchFirewallHttpRequest.newBuilder() .setFirewall(firewall == null ? null : firewall.toString()) .setFi...
[ "@", "BetaApi", "public", "final", "Operation", "patchFirewall", "(", "ProjectGlobalFirewallName", "firewall", ",", "Firewall", "firewallResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "PatchFirewallHttpRequest", "request", "=", "PatchFirewallHttpRequ...
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. <p>Sample code: <pre><code> try (FirewallClient firewallClient = FirewallClient.create()) { ProjectGlobalFirewallName firewall = ProjectGlobalFirew...
[ "Updates", "the", "specified", "firewall", "rule", "with", "the", "data", "included", "in", "the", "request", ".", "This", "method", "supports", "PATCH", "semantics", "and", "uses", "the", "JSON", "merge", "patch", "format", "and", "processing", "rules", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java#L617-L628
12,452
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageOptions.java
CloudStorageOptions.withUserMetadata
public static CloudStorageOption.OpenCopy withUserMetadata(String key, String value) { return OptionUserMetadata.create(key, value); }
java
public static CloudStorageOption.OpenCopy withUserMetadata(String key, String value) { return OptionUserMetadata.create(key, value); }
[ "public", "static", "CloudStorageOption", ".", "OpenCopy", "withUserMetadata", "(", "String", "key", ",", "String", "value", ")", "{", "return", "OptionUserMetadata", ".", "create", "(", "key", ",", "value", ")", ";", "}" ]
Sets an unmodifiable piece of user metadata on a Cloud Storage object. @see "https://developers.google.com/storage/docs/reference-headers#xgoogmeta"
[ "Sets", "an", "unmodifiable", "piece", "of", "user", "metadata", "on", "a", "Cloud", "Storage", "object", "." ]
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/CloudStorageOptions.java#L75-L77
12,453
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java
ClusterControllerClient.createClusterAsync
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Cluster, ClusterOperationMetadata> createClusterAsync( String projectId, String region, Cluster cluster) { CreateClusterRequest request = CreateClusterRequest.newB...
java
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Cluster, ClusterOperationMetadata> createClusterAsync( String projectId, String region, Cluster cluster) { CreateClusterRequest request = CreateClusterRequest.newB...
[ "@", "BetaApi", "(", "\"The surface for long-running operations is not stable yet and may change in the future.\"", ")", "public", "final", "OperationFuture", "<", "Cluster", ",", "ClusterOperationMetadata", ">", "createClusterAsync", "(", "String", "projectId", ",", "String", ...
Creates a cluster in a project. <p>Sample code: <pre><code> try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) { String projectId = ""; String region = ""; Cluster cluster = Cluster.newBuilder().build(); Cluster response = clusterControllerClient.createClusterAsync(projectId, reg...
[ "Creates", "a", "cluster", "in", "a", "project", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java#L200-L212
12,454
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java
ClusterControllerClient.getCluster
public final Cluster getCluster(String projectId, String region, String clusterName) { GetClusterRequest request = GetClusterRequest.newBuilder() .setProjectId(projectId) .setRegion(region) .setClusterName(clusterName) .build(); return getCluster(request)...
java
public final Cluster getCluster(String projectId, String region, String clusterName) { GetClusterRequest request = GetClusterRequest.newBuilder() .setProjectId(projectId) .setRegion(region) .setClusterName(clusterName) .build(); return getCluster(request)...
[ "public", "final", "Cluster", "getCluster", "(", "String", "projectId", ",", "String", "region", ",", "String", "clusterName", ")", "{", "GetClusterRequest", "request", "=", "GetClusterRequest", ".", "newBuilder", "(", ")", ".", "setProjectId", "(", "projectId", ...
Gets the resource representation for a cluster in a project. <p>Sample code: <pre><code> try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) { String projectId = ""; String region = ""; String clusterName = ""; Cluster response = clusterControllerClient.getCluster(projectId, regio...
[ "Gets", "the", "resource", "representation", "for", "a", "cluster", "in", "a", "project", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java#L593-L602
12,455
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getString
@SuppressWarnings("unchecked") public String getString(String name) { return ((Value<String>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public String getString(String name) { return ((Value<String>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "String", "getString", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "String", ">", ")", "getValue", "(", "name", ")", ")", ".", "get", "(", ")", ";", "}" ]
Returns the property value as a string. @throws DatastoreException if no such property @throws ClassCastException if value is not a string
[ "Returns", "the", "property", "value", "as", "a", "string", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L525-L528
12,456
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getTimestamp
@SuppressWarnings("unchecked") public Timestamp getTimestamp(String name) { return ((Value<Timestamp>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public Timestamp getTimestamp(String name) { return ((Value<Timestamp>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Timestamp", "getTimestamp", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "Timestamp", ">", ")", "getValue", "(", "name", ")", ")", ".", "get", "(", ")", ";", "}" ]
Returns the property value as a Timestamp. @throws DatastoreException if no such property @throws ClassCastException if value is not a Timestamp
[ "Returns", "the", "property", "value", "as", "a", "Timestamp", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L569-L572
12,457
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getLatLng
@SuppressWarnings("unchecked") public LatLng getLatLng(String name) { return ((Value<LatLng>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public LatLng getLatLng(String name) { return ((Value<LatLng>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "LatLng", "getLatLng", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "LatLng", ">", ")", "getValue", "(", "name", ")", ")", ".", "get", "(", ")", ";", "}" ]
Returns the property value as a LatLng. @throws DatastoreException if no such property. @throws ClassCastException if value is not a LatLng.
[ "Returns", "the", "property", "value", "as", "a", "LatLng", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L580-L583
12,458
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getKey
@SuppressWarnings("unchecked") public Key getKey(String name) { return ((Value<Key>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public Key getKey(String name) { return ((Value<Key>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Key", "getKey", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "Key", ">", ")", "getValue", "(", "name", ")", ")", ".", "get", "(", ")", ";", "}" ]
Returns the property value as a Key. @throws DatastoreException if no such property @throws ClassCastException if value is not a Key
[ "Returns", "the", "property", "value", "as", "a", "Key", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L591-L594
12,459
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getEntity
@SuppressWarnings("unchecked") public <K extends IncompleteKey> FullEntity<K> getEntity(String name) { return ((Value<FullEntity<K>>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public <K extends IncompleteKey> FullEntity<K> getEntity(String name) { return ((Value<FullEntity<K>>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "K", "extends", "IncompleteKey", ">", "FullEntity", "<", "K", ">", "getEntity", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "FullEntity", "<", "K", ">", ">", ")", ...
Returns the property value as an entity. @throws DatastoreException if no such property @throws ClassCastException if value is not an entity
[ "Returns", "the", "property", "value", "as", "an", "entity", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L602-L605
12,460
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getList
@SuppressWarnings("unchecked") public <T extends Value<?>> List<T> getList(String name) { return (List<T>) getValue(name).get(); }
java
@SuppressWarnings("unchecked") public <T extends Value<?>> List<T> getList(String name) { return (List<T>) getValue(name).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "Value", "<", "?", ">", ">", "List", "<", "T", ">", "getList", "(", "String", "name", ")", "{", "return", "(", "List", "<", "T", ">", ")", "getValue", "(", "name", "...
Returns the property value as a list of values. @throws DatastoreException if no such property @throws ClassCastException if value is not a list of values
[ "Returns", "the", "property", "value", "as", "a", "list", "of", "values", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L613-L616
12,461
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java
BaseEntity.getBlob
@SuppressWarnings("unchecked") public Blob getBlob(String name) { return ((Value<Blob>) getValue(name)).get(); }
java
@SuppressWarnings("unchecked") public Blob getBlob(String name) { return ((Value<Blob>) getValue(name)).get(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Blob", "getBlob", "(", "String", "name", ")", "{", "return", "(", "(", "Value", "<", "Blob", ">", ")", "getValue", "(", "name", ")", ")", ".", "get", "(", ")", ";", "}" ]
Returns the property value as a blob. @throws DatastoreException if no such property @throws ClassCastException if value is not a blob
[ "Returns", "the", "property", "value", "as", "a", "blob", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java#L624-L627
12,462
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.addAccessConfig
public Operation addAccessConfig( String networkInterface, AccessConfig accessConfig, OperationOption... options) { return compute.addAccessConfig(getInstanceId(), networkInterface, accessConfig, options); }
java
public Operation addAccessConfig( String networkInterface, AccessConfig accessConfig, OperationOption... options) { return compute.addAccessConfig(getInstanceId(), networkInterface, accessConfig, options); }
[ "public", "Operation", "addAccessConfig", "(", "String", "networkInterface", ",", "AccessConfig", "accessConfig", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "addAccessConfig", "(", "getInstanceId", "(", ")", ",", "networkInterface", ...
Adds an access configuration to the provided network interface for this instance. @return a zone operation if the add request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Adds", "an", "access", "configuration", "to", "the", "provided", "network", "interface", "for", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L227-L230
12,463
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.attachDisk
public Operation attachDisk( PersistentDiskConfiguration configuration, OperationOption... options) { return compute.attachDisk(getInstanceId(), configuration, options); }
java
public Operation attachDisk( PersistentDiskConfiguration configuration, OperationOption... options) { return compute.attachDisk(getInstanceId(), configuration, options); }
[ "public", "Operation", "attachDisk", "(", "PersistentDiskConfiguration", "configuration", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "attachDisk", "(", "getInstanceId", "(", ")", ",", "configuration", ",", "options", ")", ";", "}...
Attaches a persistent disk to this instance given its configuration. @return a zone operation if the attach request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Attaches", "a", "persistent", "disk", "to", "this", "instance", "given", "its", "configuration", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L239-L242
12,464
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.deleteAccessConfig
public Operation deleteAccessConfig( String networkInterface, String accessConfig, OperationOption... options) { return compute.deleteAccessConfig(getInstanceId(), networkInterface, accessConfig, options); }
java
public Operation deleteAccessConfig( String networkInterface, String accessConfig, OperationOption... options) { return compute.deleteAccessConfig(getInstanceId(), networkInterface, accessConfig, options); }
[ "public", "Operation", "deleteAccessConfig", "(", "String", "networkInterface", ",", "String", "accessConfig", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "deleteAccessConfig", "(", "getInstanceId", "(", ")", ",", "networkInterface", ...
Deletes an access configuration from the provided network interface for this instance. @return a zone operation if the delete request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Deletes", "an", "access", "configuration", "from", "the", "provided", "network", "interface", "for", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L279-L282
12,465
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.detachDisk
public Operation detachDisk(String deviceName, OperationOption... options) { return compute.detachDisk(getInstanceId(), deviceName, options); }
java
public Operation detachDisk(String deviceName, OperationOption... options) { return compute.detachDisk(getInstanceId(), deviceName, options); }
[ "public", "Operation", "detachDisk", "(", "String", "deviceName", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "detachDisk", "(", "getInstanceId", "(", ")", ",", "deviceName", ",", "options", ")", ";", "}" ]
Detaches a disk from this instance. @return a zone operation if the detach request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Detaches", "a", "disk", "from", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L291-L293
12,466
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setDiskAutoDelete
public Operation setDiskAutoDelete( String deviceName, boolean autoDelete, OperationOption... options) { return compute.setDiskAutoDelete(getInstanceId(), deviceName, autoDelete, options); }
java
public Operation setDiskAutoDelete( String deviceName, boolean autoDelete, OperationOption... options) { return compute.setDiskAutoDelete(getInstanceId(), deviceName, autoDelete, options); }
[ "public", "Operation", "setDiskAutoDelete", "(", "String", "deviceName", ",", "boolean", "autoDelete", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setDiskAutoDelete", "(", "getInstanceId", "(", ")", ",", "deviceName", ",", "autoD...
Sets the auto-delete flag for a disk attached to this instance. @return a zone operation if the flag setting request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "auto", "-", "delete", "flag", "for", "a", "disk", "attached", "to", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L335-L338
12,467
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setMetadata
public Operation setMetadata(Metadata metadata, OperationOption... options) { return compute.setMetadata(getInstanceId(), metadata, options); }
java
public Operation setMetadata(Metadata metadata, OperationOption... options) { return compute.setMetadata(getInstanceId(), metadata, options); }
[ "public", "Operation", "setMetadata", "(", "Metadata", "metadata", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setMetadata", "(", "getInstanceId", "(", ")", ",", "metadata", ",", "options", ")", ";", "}" ]
Sets the metadata for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "metadata", "for", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L359-L361
12,468
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setSchedulingOptions
public Operation setSchedulingOptions(SchedulingOptions scheduling, OperationOption... options) { return compute.setSchedulingOptions(getInstanceId(), scheduling, options); }
java
public Operation setSchedulingOptions(SchedulingOptions scheduling, OperationOption... options) { return compute.setSchedulingOptions(getInstanceId(), scheduling, options); }
[ "public", "Operation", "setSchedulingOptions", "(", "SchedulingOptions", "scheduling", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setSchedulingOptions", "(", "getInstanceId", "(", ")", ",", "scheduling", ",", "options", ")", ";", ...
Sets the scheduling options for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "scheduling", "options", "for", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L382-L384
12,469
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setTags
public Operation setTags(Tags tags, OperationOption... options) { return compute.setTags(getInstanceId(), tags, options); }
java
public Operation setTags(Tags tags, OperationOption... options) { return compute.setTags(getInstanceId(), tags, options); }
[ "public", "Operation", "setTags", "(", "Tags", "tags", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setTags", "(", "getInstanceId", "(", ")", ",", "tags", ",", "options", ")", ";", "}" ]
Sets the tags for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "tags", "for", "this", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L393-L395
12,470
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
LoggingHandler.getLogging
private Logging getLogging() { if (logging == null) { synchronized (this) { if (logging == null) { logging = loggingOptions.getService(); } } } return logging; }
java
private Logging getLogging() { if (logging == null) { synchronized (this) { if (logging == null) { logging = loggingOptions.getService(); } } } return logging; }
[ "private", "Logging", "getLogging", "(", ")", "{", "if", "(", "logging", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "logging", "==", "null", ")", "{", "logging", "=", "loggingOptions", ".", "getService", "(", ")", ";", ...
Returns an instance of the logging service.
[ "Returns", "an", "instance", "of", "the", "logging", "service", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java#L358-L367
12,471
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RegexUtil.java
RegexUtil.literalRegex
public static ByteString literalRegex(ByteString value) { ByteString.Output output = ByteString.newOutput(value.size() * 2); ByteIterator it = value.iterator(); writeLiteralRegex(it, output); return output.toByteString(); }
java
public static ByteString literalRegex(ByteString value) { ByteString.Output output = ByteString.newOutput(value.size() * 2); ByteIterator it = value.iterator(); writeLiteralRegex(it, output); return output.toByteString(); }
[ "public", "static", "ByteString", "literalRegex", "(", "ByteString", "value", ")", "{", "ByteString", ".", "Output", "output", "=", "ByteString", ".", "newOutput", "(", "value", ".", "size", "(", ")", "*", "2", ")", ";", "ByteIterator", "it", "=", "value",...
Converts the value to a quoted regular expression.
[ "Converts", "the", "value", "to", "a", "quoted", "regular", "expression", "." ]
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/internal/RegexUtil.java#L44-L51
12,472
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
BaseBigtableTableAdminClient.createTable
public final Table createTable(InstanceName parent, String tableId, Table table) { CreateTableRequest request = CreateTableRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setTableId(tableId) .setTable(table) .build(); return cr...
java
public final Table createTable(InstanceName parent, String tableId, Table table) { CreateTableRequest request = CreateTableRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setTableId(tableId) .setTable(table) .build(); return cr...
[ "public", "final", "Table", "createTable", "(", "InstanceName", "parent", ",", "String", "tableId", ",", "Table", "table", ")", "{", "CreateTableRequest", "request", "=", "CreateTableRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", ...
Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request. <p>Sample code: <pre><code> try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { InstanceName parent = InstanceName.of("[PR...
[ "Creates", "a", "new", "table", "in", "the", "specified", "instance", ".", "The", "table", "can", "be", "created", "with", "a", "full", "set", "of", "initial", "column", "families", "specified", "in", "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/BaseBigtableTableAdminClient.java#L160-L169
12,473
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java
DocumentSet.emptySet
static DocumentSet emptySet(final Comparator<QueryDocumentSnapshot> comparator) { return new DocumentSet( EMPTY_DOCUMENT_MAP, new ImmutableSortedSet<>(Collections.<QueryDocumentSnapshot>emptyList(), comparator)); }
java
static DocumentSet emptySet(final Comparator<QueryDocumentSnapshot> comparator) { return new DocumentSet( EMPTY_DOCUMENT_MAP, new ImmutableSortedSet<>(Collections.<QueryDocumentSnapshot>emptyList(), comparator)); }
[ "static", "DocumentSet", "emptySet", "(", "final", "Comparator", "<", "QueryDocumentSnapshot", ">", "comparator", ")", "{", "return", "new", "DocumentSet", "(", "EMPTY_DOCUMENT_MAP", ",", "new", "ImmutableSortedSet", "<>", "(", "Collections", ".", "<", "QueryDocumen...
Returns an empty DocumentSet sorted by the given comparator, then by keys.
[ "Returns", "an", "empty", "DocumentSet", "sorted", "by", "the", "given", "comparator", "then", "by", "keys", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java#L37-L41
12,474
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java
DocumentSet.indexOf
int indexOf(ResourcePath key) { QueryDocumentSnapshot document = keyIndex.get(key); if (document == null) { return -1; } return sortedSet.indexOf(document); }
java
int indexOf(ResourcePath key) { QueryDocumentSnapshot document = keyIndex.get(key); if (document == null) { return -1; } return sortedSet.indexOf(document); }
[ "int", "indexOf", "(", "ResourcePath", "key", ")", "{", "QueryDocumentSnapshot", "document", "=", "keyIndex", ".", "get", "(", "key", ")", ";", "if", "(", "document", "==", "null", ")", "{", "return", "-", "1", ";", "}", "return", "sortedSet", ".", "in...
Returns the index of the provided key in the document set, or -1 if the document key is not present in the set;
[ "Returns", "the", "index", "of", "the", "provided", "key", "in", "the", "document", "set", "or", "-", "1", "if", "the", "document", "key", "is", "not", "present", "in", "the", "set", ";" ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java#L87-L93
12,475
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java
DocumentSet.add
DocumentSet add(QueryDocumentSnapshot document) { // Remove any prior mapping of the document's key before adding, preventing sortedSet from // accumulating values that aren't in the index. DocumentSet removed = remove(document.getReference().getResourcePath()); ImmutableSortedMap<ResourcePath, QueryDo...
java
DocumentSet add(QueryDocumentSnapshot document) { // Remove any prior mapping of the document's key before adding, preventing sortedSet from // accumulating values that aren't in the index. DocumentSet removed = remove(document.getReference().getResourcePath()); ImmutableSortedMap<ResourcePath, QueryDo...
[ "DocumentSet", "add", "(", "QueryDocumentSnapshot", "document", ")", "{", "// Remove any prior mapping of the document's key before adding, preventing sortedSet from", "// accumulating values that aren't in the index.", "DocumentSet", "removed", "=", "remove", "(", "document", ".", "...
Returns a new DocumentSet that contains the given document, replacing any old document with the same key.
[ "Returns", "a", "new", "DocumentSet", "that", "contains", "the", "given", "document", "replacing", "any", "old", "document", "with", "the", "same", "key", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java#L99-L108
12,476
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java
DocumentSet.remove
DocumentSet remove(ResourcePath key) { QueryDocumentSnapshot document = keyIndex.get(key); if (document == null) { return this; } ImmutableSortedMap<ResourcePath, QueryDocumentSnapshot> newKeyIndex = keyIndex.remove(key); ImmutableSortedSet<QueryDocumentSnapshot> newSortedSet = sortedSet.remo...
java
DocumentSet remove(ResourcePath key) { QueryDocumentSnapshot document = keyIndex.get(key); if (document == null) { return this; } ImmutableSortedMap<ResourcePath, QueryDocumentSnapshot> newKeyIndex = keyIndex.remove(key); ImmutableSortedSet<QueryDocumentSnapshot> newSortedSet = sortedSet.remo...
[ "DocumentSet", "remove", "(", "ResourcePath", "key", ")", "{", "QueryDocumentSnapshot", "document", "=", "keyIndex", ".", "get", "(", "key", ")", ";", "if", "(", "document", "==", "null", ")", "{", "return", "this", ";", "}", "ImmutableSortedMap", "<", "Re...
Returns a new DocumentSet with the document for the provided key removed.
[ "Returns", "a", "new", "DocumentSet", "with", "the", "document", "for", "the", "provided", "key", "removed", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSet.java#L111-L120
12,477
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.create
public static BigtableDataClient create(String projectId, String instanceId) throws IOException { BigtableDataSettings settings = BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId).build(); return create(settings); }
java
public static BigtableDataClient create(String projectId, String instanceId) throws IOException { BigtableDataSettings settings = BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId).build(); return create(settings); }
[ "public", "static", "BigtableDataClient", "create", "(", "String", "projectId", ",", "String", "instanceId", ")", "throws", "IOException", "{", "BigtableDataSettings", "settings", "=", "BigtableDataSettings", ".", "newBuilder", "(", ")", ".", "setProjectId", "(", "p...
Constructs an instance of BigtableDataClient with default settings. @param projectId The project id of the instance to connect to. @param instanceId The id of the instance to connect to. @return A new client. @throws IOException If any.
[ "Constructs", "an", "instance", "of", "BigtableDataClient", "with", "default", "settings", "." ]
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/BigtableDataClient.java#L123-L127
12,478
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.create
public static BigtableDataClient create(BigtableDataSettings settings) throws IOException { EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.getStubSettings()); return new BigtableDataClient(stub); }
java
public static BigtableDataClient create(BigtableDataSettings settings) throws IOException { EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.getStubSettings()); return new BigtableDataClient(stub); }
[ "public", "static", "BigtableDataClient", "create", "(", "BigtableDataSettings", "settings", ")", "throws", "IOException", "{", "EnhancedBigtableStub", "stub", "=", "EnhancedBigtableStub", ".", "create", "(", "settings", ".", "getStubSettings", "(", ")", ")", ";", "...
Constructs an instance of BigtableDataClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
[ "Constructs", "an", "instance", "of", "BigtableDataClient", "using", "the", "given", "settings", ".", "The", "channels", "are", "created", "based", "on", "the", "settings", "passed", "in", "or", "defaults", "for", "any", "settings", "that", "are", "not", "set"...
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/BigtableDataClient.java#L133-L136
12,479
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.readRowCallable
public <RowT> UnaryCallable<Query, RowT> readRowCallable(RowAdapter<RowT> rowAdapter) { return stub.createReadRowCallable(rowAdapter); }
java
public <RowT> UnaryCallable<Query, RowT> readRowCallable(RowAdapter<RowT> rowAdapter) { return stub.createReadRowCallable(rowAdapter); }
[ "public", "<", "RowT", ">", "UnaryCallable", "<", "Query", ",", "RowT", ">", "readRowCallable", "(", "RowAdapter", "<", "RowT", ">", "rowAdapter", ")", "{", "return", "stub", ".", "createReadRowCallable", "(", "rowAdapter", ")", ";", "}" ]
Reads a single row. This callable allows for customization of the logical representation of a row. It's meant for advanced use cases. <p>Sample code: <pre>{@code try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { String tableId = "[TABLE]"; Query query = Query.create...
[ "Reads", "a", "single", "row", ".", "This", "callable", "allows", "for", "customization", "of", "the", "logical", "representation", "of", "a", "row", ".", "It", "s", "meant", "for", "advanced", "use", "cases", "." ]
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/BigtableDataClient.java#L496-L498
12,480
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.readRowsCallable
public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<RowT> rowAdapter) { return stub.createReadRowsCallable(rowAdapter); }
java
public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<RowT> rowAdapter) { return stub.createReadRowsCallable(rowAdapter); }
[ "public", "<", "RowT", ">", "ServerStreamingCallable", "<", "Query", ",", "RowT", ">", "readRowsCallable", "(", "RowAdapter", "<", "RowT", ">", "rowAdapter", ")", "{", "return", "stub", ".", "createReadRowsCallable", "(", "rowAdapter", ")", ";", "}" ]
Streams back the results of the query. This callable allows for customization of the logical representation of a row. It's meant for advanced use cases. <p>Sample code: <pre>{@code try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { String tableId = "[TABLE]"; Query q...
[ "Streams", "back", "the", "results", "of", "the", "query", ".", "This", "callable", "allows", "for", "customization", "of", "the", "logical", "representation", "of", "a", "row", ".", "It", "s", "meant", "for", "advanced", "use", "cases", "." ]
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/BigtableDataClient.java#L666-L668
12,481
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.getInstanceConfig
public InstanceConfig getInstanceConfig(final String my_config_id) { // [START instance_admin_client_get_instance_config] final String configId = my_config_id; InstanceConfig instanceConfig = instanceAdminClient.getInstanceConfig(configId); // [END instance_admin_client_get_instance_config] return i...
java
public InstanceConfig getInstanceConfig(final String my_config_id) { // [START instance_admin_client_get_instance_config] final String configId = my_config_id; InstanceConfig instanceConfig = instanceAdminClient.getInstanceConfig(configId); // [END instance_admin_client_get_instance_config] return i...
[ "public", "InstanceConfig", "getInstanceConfig", "(", "final", "String", "my_config_id", ")", "{", "// [START instance_admin_client_get_instance_config]", "final", "String", "configId", "=", "my_config_id", ";", "InstanceConfig", "instanceConfig", "=", "instanceAdminClient", ...
Example to get instance config.
[ "Example", "to", "get", "instance", "config", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L51-L57
12,482
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.listInstanceConfigs
public List<InstanceConfig> listInstanceConfigs() { // [START instance_admin_client_list_configs] List<InstanceConfig> configs = Lists.newArrayList( instanceAdminClient.listInstanceConfigs(Options.pageSize(1)).iterateAll()); // [END instance_admin_client_list_configs] return configs;...
java
public List<InstanceConfig> listInstanceConfigs() { // [START instance_admin_client_list_configs] List<InstanceConfig> configs = Lists.newArrayList( instanceAdminClient.listInstanceConfigs(Options.pageSize(1)).iterateAll()); // [END instance_admin_client_list_configs] return configs;...
[ "public", "List", "<", "InstanceConfig", ">", "listInstanceConfigs", "(", ")", "{", "// [START instance_admin_client_list_configs]", "List", "<", "InstanceConfig", ">", "configs", "=", "Lists", ".", "newArrayList", "(", "instanceAdminClient", ".", "listInstanceConfigs", ...
Example to list instance configs.
[ "Example", "to", "list", "instance", "configs", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L60-L67
12,483
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.createInstance
public void createInstance( final String my_instance_id, final String my_config_id, final String my_client_project) { // [START instance_admin_client_create_instance] final String instanceId = my_instance_id; final String configId = my_config_id; final String clientProject = my_client_project; ...
java
public void createInstance( final String my_instance_id, final String my_config_id, final String my_client_project) { // [START instance_admin_client_create_instance] final String instanceId = my_instance_id; final String configId = my_config_id; final String clientProject = my_client_project; ...
[ "public", "void", "createInstance", "(", "final", "String", "my_instance_id", ",", "final", "String", "my_config_id", ",", "final", "String", "my_client_project", ")", "{", "// [START instance_admin_client_create_instance]", "final", "String", "instanceId", "=", "my_insta...
Example to create an instance.
[ "Example", "to", "create", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L70-L92
12,484
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.getInstance
public Instance getInstance(final String my_instance_id) { // [START instance_admin_client_get_instance] final String instanceId = my_instance_id; Instance ins = instanceAdminClient.getInstance(instanceId); // [END instance_admin_client_get_instance] return ins; }
java
public Instance getInstance(final String my_instance_id) { // [START instance_admin_client_get_instance] final String instanceId = my_instance_id; Instance ins = instanceAdminClient.getInstance(instanceId); // [END instance_admin_client_get_instance] return ins; }
[ "public", "Instance", "getInstance", "(", "final", "String", "my_instance_id", ")", "{", "// [START instance_admin_client_get_instance]", "final", "String", "instanceId", "=", "my_instance_id", ";", "Instance", "ins", "=", "instanceAdminClient", ".", "getInstance", "(", ...
Example to get an instance.
[ "Example", "to", "get", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L95-L101
12,485
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.listInstances
public List<Instance> listInstances() { // [START instance_admin_client_list_instances] List<Instance> instances = Lists.newArrayList(instanceAdminClient.listInstances(Options.pageSize(1)).iterateAll()); // [END instance_admin_client_list_instances] return instances; }
java
public List<Instance> listInstances() { // [START instance_admin_client_list_instances] List<Instance> instances = Lists.newArrayList(instanceAdminClient.listInstances(Options.pageSize(1)).iterateAll()); // [END instance_admin_client_list_instances] return instances; }
[ "public", "List", "<", "Instance", ">", "listInstances", "(", ")", "{", "// [START instance_admin_client_list_instances]", "List", "<", "Instance", ">", "instances", "=", "Lists", ".", "newArrayList", "(", "instanceAdminClient", ".", "listInstances", "(", "Options", ...
Example to list instances.
[ "Example", "to", "list", "instances", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L104-L110
12,486
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java
InstanceAdminClientSnippets.updateInstance
public void updateInstance( Instance my_instance, final String my_client_project, final String my_instance_id, final String my_display_name) { // [START instance_admin_client_update_instance] Instance instance = my_instance; final String clientProject = my_client_project; final S...
java
public void updateInstance( Instance my_instance, final String my_client_project, final String my_instance_id, final String my_display_name) { // [START instance_admin_client_update_instance] Instance instance = my_instance; final String clientProject = my_client_project; final S...
[ "public", "void", "updateInstance", "(", "Instance", "my_instance", ",", "final", "String", "my_client_project", ",", "final", "String", "my_instance_id", ",", "final", "String", "my_display_name", ")", "{", "// [START instance_admin_client_update_instance]", "Instance", ...
Example to update an instance.
[ "Example", "to", "update", "an", "instance", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/InstanceAdminClientSnippets.java#L121-L149
12,487
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
Cluster.getId
@SuppressWarnings("WeakerAccess") public String getId() { // Constructor ensures that name is not null ClusterName fullName = Verify.verifyNotNull(ClusterName.parse(stateProto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getCluster(); }
java
@SuppressWarnings("WeakerAccess") public String getId() { // Constructor ensures that name is not null ClusterName fullName = Verify.verifyNotNull(ClusterName.parse(stateProto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getCluster(); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "String", "getId", "(", ")", "{", "// Constructor ensures that name is not null", "ClusterName", "fullName", "=", "Verify", ".", "verifyNotNull", "(", "ClusterName", ".", "parse", "(", "stateProto", ".",...
Gets the cluster's id.
[ "Gets", "the", "cluster", "s", "id", "." ]
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/Cluster.java#L108-L115
12,488
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
Cluster.getInstanceId
@SuppressWarnings("WeakerAccess") public String getInstanceId() { // Constructor ensures that name is not null ClusterName fullName = Verify.verifyNotNull(ClusterName.parse(stateProto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getInstance(); }
java
@SuppressWarnings("WeakerAccess") public String getInstanceId() { // Constructor ensures that name is not null ClusterName fullName = Verify.verifyNotNull(ClusterName.parse(stateProto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getInstance(); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "String", "getInstanceId", "(", ")", "{", "// Constructor ensures that name is not null", "ClusterName", "fullName", "=", "Verify", ".", "verifyNotNull", "(", "ClusterName", ".", "parse", "(", "stateProto"...
Gets the instance id.
[ "Gets", "the", "instance", "id", "." ]
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/Cluster.java#L118-L125
12,489
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
Cluster.getZone
@SuppressWarnings("WeakerAccess") public String getZone() { LocationName location = Verify.verifyNotNull(LocationName.parse(stateProto.getLocation())); //noinspection ConstantConditions return location.getLocation(); }
java
@SuppressWarnings("WeakerAccess") public String getZone() { LocationName location = Verify.verifyNotNull(LocationName.parse(stateProto.getLocation())); //noinspection ConstantConditions return location.getLocation(); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "String", "getZone", "(", ")", "{", "LocationName", "location", "=", "Verify", ".", "verifyNotNull", "(", "LocationName", ".", "parse", "(", "stateProto", ".", "getLocation", "(", ")", ")", ")", ...
Get the zone where this cluster is located.
[ "Get", "the", "zone", "where", "this", "cluster", "is", "located", "." ]
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/Cluster.java#L128-L133
12,490
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java
AutoscalerClient.patchAutoscaler
@BetaApi public final Operation patchAutoscaler( String autoscaler, ProjectZoneName zone, Autoscaler autoscalerResource, List<String> fieldMask) { PatchAutoscalerHttpRequest request = PatchAutoscalerHttpRequest.newBuilder() .setAutoscaler(autoscaler) .setZo...
java
@BetaApi public final Operation patchAutoscaler( String autoscaler, ProjectZoneName zone, Autoscaler autoscalerResource, List<String> fieldMask) { PatchAutoscalerHttpRequest request = PatchAutoscalerHttpRequest.newBuilder() .setAutoscaler(autoscaler) .setZo...
[ "@", "BetaApi", "public", "final", "Operation", "patchAutoscaler", "(", "String", "autoscaler", ",", "ProjectZoneName", "zone", ",", "Autoscaler", "autoscalerResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "PatchAutoscalerHttpRequest", "request", ...
Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. <p>Sample code: <pre><code> try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) { String autoscaler = ""; ProjectZoneNa...
[ "Updates", "an", "autoscaler", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", ".", "This", "method", "supports", "PATCH", "semantics", "and", "uses", "the", "JSON", "merge", "patch", "format", "and", "processin...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java#L775-L790
12,491
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java
RegionInstanceGroupManagerClient.patchRegionInstanceGroupManager
@BetaApi public final Operation patchRegionInstanceGroupManager( String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource, List<String> fieldMask) { PatchRegionInstanceGroupManagerHttpRequest request = PatchRegionInstanceGroupManagerHttpRequest.newBuilder() ...
java
@BetaApi public final Operation patchRegionInstanceGroupManager( String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource, List<String> fieldMask) { PatchRegionInstanceGroupManagerHttpRequest request = PatchRegionInstanceGroupManagerHttpRequest.newBuilder() ...
[ "@", "BetaApi", "public", "final", "Operation", "patchRegionInstanceGroupManager", "(", "String", "instanceGroupManager", ",", "InstanceGroupManager", "instanceGroupManagerResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "PatchRegionInstanceGroupManagerHttpR...
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/RegionInstanceGroupManagerClient.java#L1171-L1184
12,492
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java
DocumentReference.extractFirst
private <T> ApiFuture<T> extractFirst(ApiFuture<List<T>> results) { return ApiFutures.transform( results, new ApiFunction<List<T>, T>() { @Override public T apply(List<T> results) { return results.isEmpty() ? null : results.get(0); } }); }
java
private <T> ApiFuture<T> extractFirst(ApiFuture<List<T>> results) { return ApiFutures.transform( results, new ApiFunction<List<T>, T>() { @Override public T apply(List<T> results) { return results.isEmpty() ? null : results.get(0); } }); }
[ "private", "<", "T", ">", "ApiFuture", "<", "T", ">", "extractFirst", "(", "ApiFuture", "<", "List", "<", "T", ">", ">", "results", ")", "{", "return", "ApiFutures", ".", "transform", "(", "results", ",", "new", "ApiFunction", "<", "List", "<", "T", ...
Extracts the first result from an ApiFuture with list of results. @param results A list with results. @return An ApiFuture with the first WriteResult.
[ "Extracts", "the", "first", "result", "from", "an", "ApiFuture", "with", "list", "of", "results", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java#L125-L134
12,493
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java
DocumentReference.listCollections
public Iterable<CollectionReference> listCollections() { ListCollectionIdsRequest.Builder request = ListCollectionIdsRequest.newBuilder(); request.setParent(path.toString()); final ListCollectionIdsPagedResponse response; try { response = ApiExceptions.callAndTranslateApiException( ...
java
public Iterable<CollectionReference> listCollections() { ListCollectionIdsRequest.Builder request = ListCollectionIdsRequest.newBuilder(); request.setParent(path.toString()); final ListCollectionIdsPagedResponse response; try { response = ApiExceptions.callAndTranslateApiException( ...
[ "public", "Iterable", "<", "CollectionReference", ">", "listCollections", "(", ")", "{", "ListCollectionIdsRequest", ".", "Builder", "request", "=", "ListCollectionIdsRequest", ".", "newBuilder", "(", ")", ";", "request", ".", "setParent", "(", "path", ".", "toStr...
Fetches the subcollections that are direct children of this document. @throws FirestoreException if the Iterable could not be initialized. @return An Iterable that can be used to fetch all subcollections.
[ "Fetches", "the", "subcollections", "that", "are", "direct", "children", "of", "this", "document", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java#L361-L398
12,494
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java
DataCatalogClient.formatEntryName
@Deprecated public static final String formatEntryName( String project, String location, String entryGroup, String entry) { return ENTRY_PATH_TEMPLATE.instantiate( "project", project, "location", location, "entry_group", entryGroup, "entry", entry); }
java
@Deprecated public static final String formatEntryName( String project, String location, String entryGroup, String entry) { return ENTRY_PATH_TEMPLATE.instantiate( "project", project, "location", location, "entry_group", entryGroup, "entry", entry); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatEntryName", "(", "String", "project", ",", "String", "location", ",", "String", "entryGroup", ",", "String", "entry", ")", "{", "return", "ENTRY_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\""...
Formats a string containing the fully-qualified path to represent a entry resource. @deprecated Use the {@link EntryName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "entry", "resource", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java#L115-L123
12,495
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java
AlertPolicyServiceClient.updateAlertPolicy
public final AlertPolicy updateAlertPolicy(FieldMask updateMask, AlertPolicy alertPolicy) { UpdateAlertPolicyRequest request = UpdateAlertPolicyRequest.newBuilder() .setUpdateMask(updateMask) .setAlertPolicy(alertPolicy) .build(); return updateAlertPolicy(request); ...
java
public final AlertPolicy updateAlertPolicy(FieldMask updateMask, AlertPolicy alertPolicy) { UpdateAlertPolicyRequest request = UpdateAlertPolicyRequest.newBuilder() .setUpdateMask(updateMask) .setAlertPolicy(alertPolicy) .build(); return updateAlertPolicy(request); ...
[ "public", "final", "AlertPolicy", "updateAlertPolicy", "(", "FieldMask", "updateMask", ",", "AlertPolicy", "alertPolicy", ")", "{", "UpdateAlertPolicyRequest", "request", "=", "UpdateAlertPolicyRequest", ".", "newBuilder", "(", ")", ".", "setUpdateMask", "(", "updateMas...
Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via `updateMask`. Returns the updated alerting policy. <p>Sample code: <pre><code> try (AlertPolicyServiceClient alertPolicyServiceCl...
[ "Updates", "an", "alerting", "policy", ".", "You", "can", "either", "replace", "the", "entire", "policy", "with", "a", "new", "one", "or", "replace", "only", "certain", "fields", "in", "the", "current", "alerting", "policy", "by", "specifying", "the", "field...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java#L653-L661
12,496
googleapis/google-cloud-java
google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java
WebRiskServiceV1Beta1Client.computeThreatListDiff
public final ComputeThreatListDiffResponse computeThreatListDiff( ThreatType threatType, ByteString versionToken, ComputeThreatListDiffRequest.Constraints constraints) { ComputeThreatListDiffRequest request = ComputeThreatListDiffRequest.newBuilder() .setThreatType(threatType)...
java
public final ComputeThreatListDiffResponse computeThreatListDiff( ThreatType threatType, ByteString versionToken, ComputeThreatListDiffRequest.Constraints constraints) { ComputeThreatListDiffRequest request = ComputeThreatListDiffRequest.newBuilder() .setThreatType(threatType)...
[ "public", "final", "ComputeThreatListDiffResponse", "computeThreatListDiff", "(", "ThreatType", "threatType", ",", "ByteString", "versionToken", ",", "ComputeThreatListDiffRequest", ".", "Constraints", "constraints", ")", "{", "ComputeThreatListDiffRequest", "request", "=", "...
Gets the most recent threat list diffs. <p>Sample code: <pre><code> try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) { ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED; ByteString versionToken = ByteString.copyFromUtf8(""); ComputeThreatListDiffRequest.Con...
[ "Gets", "the", "most", "recent", "threat", "list", "diffs", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java#L181-L193
12,497
googleapis/google-cloud-java
google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java
WebRiskServiceV1Beta1Client.searchUris
public final SearchUrisResponse searchUris(String uri, List<ThreatType> threatTypes) { SearchUrisRequest request = SearchUrisRequest.newBuilder().setUri(uri).addAllThreatTypes(threatTypes).build(); return searchUris(request); }
java
public final SearchUrisResponse searchUris(String uri, List<ThreatType> threatTypes) { SearchUrisRequest request = SearchUrisRequest.newBuilder().setUri(uri).addAllThreatTypes(threatTypes).build(); return searchUris(request); }
[ "public", "final", "SearchUrisResponse", "searchUris", "(", "String", "uri", ",", "List", "<", "ThreatType", ">", "threatTypes", ")", "{", "SearchUrisRequest", "request", "=", "SearchUrisRequest", ".", "newBuilder", "(", ")", ".", "setUri", "(", "uri", ")", "....
This method is used to check whether a URI is on a given threatList. <p>Sample code: <pre><code> try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) { String uri = ""; List&lt;ThreatType&gt; threatTypes = new ArrayList&lt;&gt;(); SearchUrisResponse response = webRiskSe...
[ "This", "method", "is", "used", "to", "check", "whether", "a", "URI", "is", "on", "a", "given", "threatList", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java#L264-L269
12,498
googleapis/google-cloud-java
google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java
WebRiskServiceV1Beta1Client.searchHashes
public final SearchHashesResponse searchHashes( ByteString hashPrefix, List<ThreatType> threatTypes) { SearchHashesRequest request = SearchHashesRequest.newBuilder() .setHashPrefix(hashPrefix) .addAllThreatTypes(threatTypes) .build(); return searchHashes(reques...
java
public final SearchHashesResponse searchHashes( ByteString hashPrefix, List<ThreatType> threatTypes) { SearchHashesRequest request = SearchHashesRequest.newBuilder() .setHashPrefix(hashPrefix) .addAllThreatTypes(threatTypes) .build(); return searchHashes(reques...
[ "public", "final", "SearchHashesResponse", "searchHashes", "(", "ByteString", "hashPrefix", ",", "List", "<", "ThreatType", ">", "threatTypes", ")", "{", "SearchHashesRequest", "request", "=", "SearchHashesRequest", ".", "newBuilder", "(", ")", ".", "setHashPrefix", ...
Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat. <p>Sample code: <pre><code> t...
[ "Gets", "the", "full", "hashes", "that", "match", "the", "requested", "hash", "prefix", ".", "This", "is", "used", "after", "a", "hash", "prefix", "is", "looked", "up", "in", "a", "threatList", "and", "there", "is", "a", "match", ".", "The", "client", ...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java#L342-L351
12,499
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java
InterconnectAttachmentClient.patchInterconnectAttachment
@BetaApi public final Operation patchInterconnectAttachment( ProjectRegionInterconnectAttachmentName interconnectAttachment, InterconnectAttachment interconnectAttachmentResource, List<String> fieldMask) { PatchInterconnectAttachmentHttpRequest request = PatchInterconnectAttachmentHttpR...
java
@BetaApi public final Operation patchInterconnectAttachment( ProjectRegionInterconnectAttachmentName interconnectAttachment, InterconnectAttachment interconnectAttachmentResource, List<String> fieldMask) { PatchInterconnectAttachmentHttpRequest request = PatchInterconnectAttachmentHttpR...
[ "@", "BetaApi", "public", "final", "Operation", "patchInterconnectAttachment", "(", "ProjectRegionInterconnectAttachmentName", "interconnectAttachment", ",", "InterconnectAttachment", "interconnectAttachmentResource", ",", "List", "<", "String", ">", "fieldMask", ")", "{", "P...
Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. <p>Sample code: <pre><code> try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) { Pro...
[ "Updates", "the", "specified", "interconnect", "attachment", "with", "the", "data", "included", "in", "the", "request", ".", "This", "method", "supports", "PATCH", "semantics", "and", "uses", "the", "JSON", "merge", "patch", "format", "and", "processing", "rules...
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java#L795-L809