
com.google.cloud.visionai.v1.SearchAssetsRequest Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/visionai/v1/warehouse.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* Request message for SearchAssets.
*
*
* Protobuf type {@code google.cloud.visionai.v1.SearchAssetsRequest}
*/
public final class SearchAssetsRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.SearchAssetsRequest)
SearchAssetsRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SearchAssetsRequest.newBuilder() to construct.
private SearchAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SearchAssetsRequest() {
corpus_ = "";
pageToken_ = "";
criteria_ = java.util.Collections.emptyList();
facetSelections_ = java.util.Collections.emptyList();
resultAnnotationKeys_ = com.google.protobuf.LazyStringArrayList.emptyList();
searchQuery_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SearchAssetsRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_SearchAssetsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_SearchAssetsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.SearchAssetsRequest.class,
com.google.cloud.visionai.v1.SearchAssetsRequest.Builder.class);
}
private int bitField0_;
private int sortSpecCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object sortSpec_;
public enum SortSpecCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SCHEMA_KEY_SORTING_STRATEGY(9),
SORTSPEC_NOT_SET(0);
private final int value;
private SortSpecCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SortSpecCase valueOf(int value) {
return forNumber(value);
}
public static SortSpecCase forNumber(int value) {
switch (value) {
case 9:
return SCHEMA_KEY_SORTING_STRATEGY;
case 0:
return SORTSPEC_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public SortSpecCase getSortSpecCase() {
return SortSpecCase.forNumber(sortSpecCase_);
}
public static final int SCHEMA_KEY_SORTING_STRATEGY_FIELD_NUMBER = 9;
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*
* @return Whether the schemaKeySortingStrategy field is set.
*/
@java.lang.Override
public boolean hasSchemaKeySortingStrategy() {
return sortSpecCase_ == 9;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*
* @return The schemaKeySortingStrategy.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.SchemaKeySortingStrategy getSchemaKeySortingStrategy() {
if (sortSpecCase_ == 9) {
return (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_;
}
return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.SchemaKeySortingStrategyOrBuilder
getSchemaKeySortingStrategyOrBuilder() {
if (sortSpecCase_ == 9) {
return (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_;
}
return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
}
public static final int CORPUS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object corpus_ = "";
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The corpus.
*/
@java.lang.Override
public java.lang.String getCorpus() {
java.lang.Object ref = corpus_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
corpus_ = s;
return s;
}
}
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for corpus.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCorpusBytes() {
java.lang.Object ref = corpus_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
corpus_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAGE_SIZE_FIELD_NUMBER = 2;
private int pageSize_ = 0;
/**
*
*
*
* The number of results to be returned in this page. If it's 0, the server
* will decide the appropriate page_size.
*
*
* int32 page_size = 2;
*
* @return The pageSize.
*/
@java.lang.Override
public int getPageSize() {
return pageSize_;
}
public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object pageToken_ = "";
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @return The pageToken.
*/
@java.lang.Override
public java.lang.String getPageToken() {
java.lang.Object ref = pageToken_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pageToken_ = s;
return s;
}
}
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @return The bytes for pageToken.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPageTokenBytes() {
java.lang.Object ref = pageToken_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
pageToken_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTENT_TIME_RANGES_FIELD_NUMBER = 5;
private com.google.cloud.visionai.v1.DateTimeRangeArray contentTimeRanges_;
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*
* @return Whether the contentTimeRanges field is set.
*/
@java.lang.Override
public boolean hasContentTimeRanges() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*
* @return The contentTimeRanges.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.DateTimeRangeArray getContentTimeRanges() {
return contentTimeRanges_ == null
? com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()
: contentTimeRanges_;
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder getContentTimeRangesOrBuilder() {
return contentTimeRanges_ == null
? com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()
: contentTimeRanges_;
}
public static final int CRITERIA_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List criteria_;
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
@java.lang.Override
public java.util.List getCriteriaList() {
return criteria_;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.visionai.v1.CriteriaOrBuilder>
getCriteriaOrBuilderList() {
return criteria_;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
@java.lang.Override
public int getCriteriaCount() {
return criteria_.size();
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Criteria getCriteria(int index) {
return criteria_.get(index);
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.CriteriaOrBuilder getCriteriaOrBuilder(int index) {
return criteria_.get(index);
}
public static final int FACET_SELECTIONS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List facetSelections_;
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
@java.lang.Override
public java.util.List getFacetSelectionsList() {
return facetSelections_;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.visionai.v1.FacetGroupOrBuilder>
getFacetSelectionsOrBuilderList() {
return facetSelections_;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
@java.lang.Override
public int getFacetSelectionsCount() {
return facetSelections_.size();
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.FacetGroup getFacetSelections(int index) {
return facetSelections_.get(index);
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.FacetGroupOrBuilder getFacetSelectionsOrBuilder(int index) {
return facetSelections_.get(index);
}
public static final int RESULT_ANNOTATION_KEYS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList resultAnnotationKeys_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @return A list containing the resultAnnotationKeys.
*/
public com.google.protobuf.ProtocolStringList getResultAnnotationKeysList() {
return resultAnnotationKeys_;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @return The count of resultAnnotationKeys.
*/
public int getResultAnnotationKeysCount() {
return resultAnnotationKeys_.size();
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param index The index of the element to return.
* @return The resultAnnotationKeys at the given index.
*/
public java.lang.String getResultAnnotationKeys(int index) {
return resultAnnotationKeys_.get(index);
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param index The index of the value to return.
* @return The bytes of the resultAnnotationKeys at the given index.
*/
public com.google.protobuf.ByteString getResultAnnotationKeysBytes(int index) {
return resultAnnotationKeys_.getByteString(index);
}
public static final int SEARCH_QUERY_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private volatile java.lang.Object searchQuery_ = "";
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @return The searchQuery.
*/
@java.lang.Override
public java.lang.String getSearchQuery() {
java.lang.Object ref = searchQuery_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
searchQuery_ = s;
return s;
}
}
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @return The bytes for searchQuery.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSearchQueryBytes() {
java.lang.Object ref = searchQuery_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
searchQuery_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(corpus_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, corpus_);
}
if (pageSize_ != 0) {
output.writeInt32(2, pageSize_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
}
for (int i = 0; i < criteria_.size(); i++) {
output.writeMessage(4, criteria_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getContentTimeRanges());
}
for (int i = 0; i < facetSelections_.size(); i++) {
output.writeMessage(6, facetSelections_.get(i));
}
for (int i = 0; i < resultAnnotationKeys_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 8, resultAnnotationKeys_.getRaw(i));
}
if (sortSpecCase_ == 9) {
output.writeMessage(9, (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchQuery_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, searchQuery_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(corpus_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, corpus_);
}
if (pageSize_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
}
for (int i = 0; i < criteria_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, criteria_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getContentTimeRanges());
}
for (int i = 0; i < facetSelections_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, facetSelections_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < resultAnnotationKeys_.size(); i++) {
dataSize += computeStringSizeNoTag(resultAnnotationKeys_.getRaw(i));
}
size += dataSize;
size += 1 * getResultAnnotationKeysList().size();
}
if (sortSpecCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
9, (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchQuery_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, searchQuery_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.visionai.v1.SearchAssetsRequest)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.SearchAssetsRequest other =
(com.google.cloud.visionai.v1.SearchAssetsRequest) obj;
if (!getCorpus().equals(other.getCorpus())) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
if (hasContentTimeRanges() != other.hasContentTimeRanges()) return false;
if (hasContentTimeRanges()) {
if (!getContentTimeRanges().equals(other.getContentTimeRanges())) return false;
}
if (!getCriteriaList().equals(other.getCriteriaList())) return false;
if (!getFacetSelectionsList().equals(other.getFacetSelectionsList())) return false;
if (!getResultAnnotationKeysList().equals(other.getResultAnnotationKeysList())) return false;
if (!getSearchQuery().equals(other.getSearchQuery())) return false;
if (!getSortSpecCase().equals(other.getSortSpecCase())) return false;
switch (sortSpecCase_) {
case 9:
if (!getSchemaKeySortingStrategy().equals(other.getSchemaKeySortingStrategy()))
return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CORPUS_FIELD_NUMBER;
hash = (53 * hash) + getCorpus().hashCode();
hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
if (hasContentTimeRanges()) {
hash = (37 * hash) + CONTENT_TIME_RANGES_FIELD_NUMBER;
hash = (53 * hash) + getContentTimeRanges().hashCode();
}
if (getCriteriaCount() > 0) {
hash = (37 * hash) + CRITERIA_FIELD_NUMBER;
hash = (53 * hash) + getCriteriaList().hashCode();
}
if (getFacetSelectionsCount() > 0) {
hash = (37 * hash) + FACET_SELECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getFacetSelectionsList().hashCode();
}
if (getResultAnnotationKeysCount() > 0) {
hash = (37 * hash) + RESULT_ANNOTATION_KEYS_FIELD_NUMBER;
hash = (53 * hash) + getResultAnnotationKeysList().hashCode();
}
hash = (37 * hash) + SEARCH_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getSearchQuery().hashCode();
switch (sortSpecCase_) {
case 9:
hash = (37 * hash) + SCHEMA_KEY_SORTING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + getSchemaKeySortingStrategy().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.visionai.v1.SearchAssetsRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Request message for SearchAssets.
*
*
* Protobuf type {@code google.cloud.visionai.v1.SearchAssetsRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.SearchAssetsRequest)
com.google.cloud.visionai.v1.SearchAssetsRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_SearchAssetsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_SearchAssetsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.SearchAssetsRequest.class,
com.google.cloud.visionai.v1.SearchAssetsRequest.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.SearchAssetsRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getContentTimeRangesFieldBuilder();
getCriteriaFieldBuilder();
getFacetSelectionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (schemaKeySortingStrategyBuilder_ != null) {
schemaKeySortingStrategyBuilder_.clear();
}
corpus_ = "";
pageSize_ = 0;
pageToken_ = "";
contentTimeRanges_ = null;
if (contentTimeRangesBuilder_ != null) {
contentTimeRangesBuilder_.dispose();
contentTimeRangesBuilder_ = null;
}
if (criteriaBuilder_ == null) {
criteria_ = java.util.Collections.emptyList();
} else {
criteria_ = null;
criteriaBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
if (facetSelectionsBuilder_ == null) {
facetSelections_ = java.util.Collections.emptyList();
} else {
facetSelections_ = null;
facetSelectionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
resultAnnotationKeys_ = com.google.protobuf.LazyStringArrayList.emptyList();
searchQuery_ = "";
sortSpecCase_ = 0;
sortSpec_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_SearchAssetsRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.SearchAssetsRequest getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.SearchAssetsRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.SearchAssetsRequest build() {
com.google.cloud.visionai.v1.SearchAssetsRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.SearchAssetsRequest buildPartial() {
com.google.cloud.visionai.v1.SearchAssetsRequest result =
new com.google.cloud.visionai.v1.SearchAssetsRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.visionai.v1.SearchAssetsRequest result) {
if (criteriaBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
criteria_ = java.util.Collections.unmodifiableList(criteria_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.criteria_ = criteria_;
} else {
result.criteria_ = criteriaBuilder_.build();
}
if (facetSelectionsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
facetSelections_ = java.util.Collections.unmodifiableList(facetSelections_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.facetSelections_ = facetSelections_;
} else {
result.facetSelections_ = facetSelectionsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.visionai.v1.SearchAssetsRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.corpus_ = corpus_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.pageSize_ = pageSize_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.pageToken_ = pageToken_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.contentTimeRanges_ =
contentTimeRangesBuilder_ == null
? contentTimeRanges_
: contentTimeRangesBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
resultAnnotationKeys_.makeImmutable();
result.resultAnnotationKeys_ = resultAnnotationKeys_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.searchQuery_ = searchQuery_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.visionai.v1.SearchAssetsRequest result) {
result.sortSpecCase_ = sortSpecCase_;
result.sortSpec_ = this.sortSpec_;
if (sortSpecCase_ == 9 && schemaKeySortingStrategyBuilder_ != null) {
result.sortSpec_ = schemaKeySortingStrategyBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.visionai.v1.SearchAssetsRequest) {
return mergeFrom((com.google.cloud.visionai.v1.SearchAssetsRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.SearchAssetsRequest other) {
if (other == com.google.cloud.visionai.v1.SearchAssetsRequest.getDefaultInstance())
return this;
if (!other.getCorpus().isEmpty()) {
corpus_ = other.corpus_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getPageSize() != 0) {
setPageSize(other.getPageSize());
}
if (!other.getPageToken().isEmpty()) {
pageToken_ = other.pageToken_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasContentTimeRanges()) {
mergeContentTimeRanges(other.getContentTimeRanges());
}
if (criteriaBuilder_ == null) {
if (!other.criteria_.isEmpty()) {
if (criteria_.isEmpty()) {
criteria_ = other.criteria_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureCriteriaIsMutable();
criteria_.addAll(other.criteria_);
}
onChanged();
}
} else {
if (!other.criteria_.isEmpty()) {
if (criteriaBuilder_.isEmpty()) {
criteriaBuilder_.dispose();
criteriaBuilder_ = null;
criteria_ = other.criteria_;
bitField0_ = (bitField0_ & ~0x00000020);
criteriaBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getCriteriaFieldBuilder()
: null;
} else {
criteriaBuilder_.addAllMessages(other.criteria_);
}
}
}
if (facetSelectionsBuilder_ == null) {
if (!other.facetSelections_.isEmpty()) {
if (facetSelections_.isEmpty()) {
facetSelections_ = other.facetSelections_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureFacetSelectionsIsMutable();
facetSelections_.addAll(other.facetSelections_);
}
onChanged();
}
} else {
if (!other.facetSelections_.isEmpty()) {
if (facetSelectionsBuilder_.isEmpty()) {
facetSelectionsBuilder_.dispose();
facetSelectionsBuilder_ = null;
facetSelections_ = other.facetSelections_;
bitField0_ = (bitField0_ & ~0x00000040);
facetSelectionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getFacetSelectionsFieldBuilder()
: null;
} else {
facetSelectionsBuilder_.addAllMessages(other.facetSelections_);
}
}
}
if (!other.resultAnnotationKeys_.isEmpty()) {
if (resultAnnotationKeys_.isEmpty()) {
resultAnnotationKeys_ = other.resultAnnotationKeys_;
bitField0_ |= 0x00000080;
} else {
ensureResultAnnotationKeysIsMutable();
resultAnnotationKeys_.addAll(other.resultAnnotationKeys_);
}
onChanged();
}
if (!other.getSearchQuery().isEmpty()) {
searchQuery_ = other.searchQuery_;
bitField0_ |= 0x00000100;
onChanged();
}
switch (other.getSortSpecCase()) {
case SCHEMA_KEY_SORTING_STRATEGY:
{
mergeSchemaKeySortingStrategy(other.getSchemaKeySortingStrategy());
break;
}
case SORTSPEC_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
corpus_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 10
case 16:
{
pageSize_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 16
case 26:
{
pageToken_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 26
case 34:
{
com.google.cloud.visionai.v1.Criteria m =
input.readMessage(
com.google.cloud.visionai.v1.Criteria.parser(), extensionRegistry);
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
criteria_.add(m);
} else {
criteriaBuilder_.addMessage(m);
}
break;
} // case 34
case 42:
{
input.readMessage(
getContentTimeRangesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
com.google.cloud.visionai.v1.FacetGroup m =
input.readMessage(
com.google.cloud.visionai.v1.FacetGroup.parser(), extensionRegistry);
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
facetSelections_.add(m);
} else {
facetSelectionsBuilder_.addMessage(m);
}
break;
} // case 50
case 66:
{
java.lang.String s = input.readStringRequireUtf8();
ensureResultAnnotationKeysIsMutable();
resultAnnotationKeys_.add(s);
break;
} // case 66
case 74:
{
input.readMessage(
getSchemaKeySortingStrategyFieldBuilder().getBuilder(), extensionRegistry);
sortSpecCase_ = 9;
break;
} // case 74
case 82:
{
searchQuery_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 82
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int sortSpecCase_ = 0;
private java.lang.Object sortSpec_;
public SortSpecCase getSortSpecCase() {
return SortSpecCase.forNumber(sortSpecCase_);
}
public Builder clearSortSpec() {
sortSpecCase_ = 0;
sortSpec_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.SchemaKeySortingStrategy,
com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder,
com.google.cloud.visionai.v1.SchemaKeySortingStrategyOrBuilder>
schemaKeySortingStrategyBuilder_;
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*
* @return Whether the schemaKeySortingStrategy field is set.
*/
@java.lang.Override
public boolean hasSchemaKeySortingStrategy() {
return sortSpecCase_ == 9;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*
* @return The schemaKeySortingStrategy.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.SchemaKeySortingStrategy getSchemaKeySortingStrategy() {
if (schemaKeySortingStrategyBuilder_ == null) {
if (sortSpecCase_ == 9) {
return (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_;
}
return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
} else {
if (sortSpecCase_ == 9) {
return schemaKeySortingStrategyBuilder_.getMessage();
}
return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
}
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
public Builder setSchemaKeySortingStrategy(
com.google.cloud.visionai.v1.SchemaKeySortingStrategy value) {
if (schemaKeySortingStrategyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sortSpec_ = value;
onChanged();
} else {
schemaKeySortingStrategyBuilder_.setMessage(value);
}
sortSpecCase_ = 9;
return this;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
public Builder setSchemaKeySortingStrategy(
com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder builderForValue) {
if (schemaKeySortingStrategyBuilder_ == null) {
sortSpec_ = builderForValue.build();
onChanged();
} else {
schemaKeySortingStrategyBuilder_.setMessage(builderForValue.build());
}
sortSpecCase_ = 9;
return this;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
public Builder mergeSchemaKeySortingStrategy(
com.google.cloud.visionai.v1.SchemaKeySortingStrategy value) {
if (schemaKeySortingStrategyBuilder_ == null) {
if (sortSpecCase_ == 9
&& sortSpec_
!= com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance()) {
sortSpec_ =
com.google.cloud.visionai.v1.SchemaKeySortingStrategy.newBuilder(
(com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_)
.mergeFrom(value)
.buildPartial();
} else {
sortSpec_ = value;
}
onChanged();
} else {
if (sortSpecCase_ == 9) {
schemaKeySortingStrategyBuilder_.mergeFrom(value);
} else {
schemaKeySortingStrategyBuilder_.setMessage(value);
}
}
sortSpecCase_ = 9;
return this;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
public Builder clearSchemaKeySortingStrategy() {
if (schemaKeySortingStrategyBuilder_ == null) {
if (sortSpecCase_ == 9) {
sortSpecCase_ = 0;
sortSpec_ = null;
onChanged();
}
} else {
if (sortSpecCase_ == 9) {
sortSpecCase_ = 0;
sortSpec_ = null;
}
schemaKeySortingStrategyBuilder_.clear();
}
return this;
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder
getSchemaKeySortingStrategyBuilder() {
return getSchemaKeySortingStrategyFieldBuilder().getBuilder();
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.SchemaKeySortingStrategyOrBuilder
getSchemaKeySortingStrategyOrBuilder() {
if ((sortSpecCase_ == 9) && (schemaKeySortingStrategyBuilder_ != null)) {
return schemaKeySortingStrategyBuilder_.getMessageOrBuilder();
} else {
if (sortSpecCase_ == 9) {
return (com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_;
}
return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
}
}
/**
*
*
*
* Sort by the value under the data schema key.
*
*
* .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.SchemaKeySortingStrategy,
com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder,
com.google.cloud.visionai.v1.SchemaKeySortingStrategyOrBuilder>
getSchemaKeySortingStrategyFieldBuilder() {
if (schemaKeySortingStrategyBuilder_ == null) {
if (!(sortSpecCase_ == 9)) {
sortSpec_ = com.google.cloud.visionai.v1.SchemaKeySortingStrategy.getDefaultInstance();
}
schemaKeySortingStrategyBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.SchemaKeySortingStrategy,
com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder,
com.google.cloud.visionai.v1.SchemaKeySortingStrategyOrBuilder>(
(com.google.cloud.visionai.v1.SchemaKeySortingStrategy) sortSpec_,
getParentForChildren(),
isClean());
sortSpec_ = null;
}
sortSpecCase_ = 9;
onChanged();
return schemaKeySortingStrategyBuilder_;
}
private java.lang.Object corpus_ = "";
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The corpus.
*/
public java.lang.String getCorpus() {
java.lang.Object ref = corpus_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
corpus_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for corpus.
*/
public com.google.protobuf.ByteString getCorpusBytes() {
java.lang.Object ref = corpus_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
corpus_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The corpus to set.
* @return This builder for chaining.
*/
public Builder setCorpus(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
corpus_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearCorpus() {
corpus_ = getDefaultInstance().getCorpus();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The parent corpus to search.
* Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'
*
*
*
* string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for corpus to set.
* @return This builder for chaining.
*/
public Builder setCorpusBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
corpus_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int pageSize_;
/**
*
*
*
* The number of results to be returned in this page. If it's 0, the server
* will decide the appropriate page_size.
*
*
* int32 page_size = 2;
*
* @return The pageSize.
*/
@java.lang.Override
public int getPageSize() {
return pageSize_;
}
/**
*
*
*
* The number of results to be returned in this page. If it's 0, the server
* will decide the appropriate page_size.
*
*
* int32 page_size = 2;
*
* @param value The pageSize to set.
* @return This builder for chaining.
*/
public Builder setPageSize(int value) {
pageSize_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The number of results to be returned in this page. If it's 0, the server
* will decide the appropriate page_size.
*
*
* int32 page_size = 2;
*
* @return This builder for chaining.
*/
public Builder clearPageSize() {
bitField0_ = (bitField0_ & ~0x00000004);
pageSize_ = 0;
onChanged();
return this;
}
private java.lang.Object pageToken_ = "";
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @return The pageToken.
*/
public java.lang.String getPageToken() {
java.lang.Object ref = pageToken_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pageToken_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @return The bytes for pageToken.
*/
public com.google.protobuf.ByteString getPageTokenBytes() {
java.lang.Object ref = pageToken_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
pageToken_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @param value The pageToken to set.
* @return This builder for chaining.
*/
public Builder setPageToken(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
pageToken_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @return This builder for chaining.
*/
public Builder clearPageToken() {
pageToken_ = getDefaultInstance().getPageToken();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* The continuation token to fetch the next page. If empty, it means it is
* fetching the first page.
*
*
* string page_token = 3;
*
* @param value The bytes for pageToken to set.
* @return This builder for chaining.
*/
public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
pageToken_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private com.google.cloud.visionai.v1.DateTimeRangeArray contentTimeRanges_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.DateTimeRangeArray,
com.google.cloud.visionai.v1.DateTimeRangeArray.Builder,
com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder>
contentTimeRangesBuilder_;
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*
* @return Whether the contentTimeRanges field is set.
*/
public boolean hasContentTimeRanges() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*
* @return The contentTimeRanges.
*/
public com.google.cloud.visionai.v1.DateTimeRangeArray getContentTimeRanges() {
if (contentTimeRangesBuilder_ == null) {
return contentTimeRanges_ == null
? com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()
: contentTimeRanges_;
} else {
return contentTimeRangesBuilder_.getMessage();
}
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public Builder setContentTimeRanges(com.google.cloud.visionai.v1.DateTimeRangeArray value) {
if (contentTimeRangesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
contentTimeRanges_ = value;
} else {
contentTimeRangesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public Builder setContentTimeRanges(
com.google.cloud.visionai.v1.DateTimeRangeArray.Builder builderForValue) {
if (contentTimeRangesBuilder_ == null) {
contentTimeRanges_ = builderForValue.build();
} else {
contentTimeRangesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public Builder mergeContentTimeRanges(com.google.cloud.visionai.v1.DateTimeRangeArray value) {
if (contentTimeRangesBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& contentTimeRanges_ != null
&& contentTimeRanges_
!= com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()) {
getContentTimeRangesBuilder().mergeFrom(value);
} else {
contentTimeRanges_ = value;
}
} else {
contentTimeRangesBuilder_.mergeFrom(value);
}
if (contentTimeRanges_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public Builder clearContentTimeRanges() {
bitField0_ = (bitField0_ & ~0x00000010);
contentTimeRanges_ = null;
if (contentTimeRangesBuilder_ != null) {
contentTimeRangesBuilder_.dispose();
contentTimeRangesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public com.google.cloud.visionai.v1.DateTimeRangeArray.Builder getContentTimeRangesBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getContentTimeRangesFieldBuilder().getBuilder();
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
public com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder
getContentTimeRangesOrBuilder() {
if (contentTimeRangesBuilder_ != null) {
return contentTimeRangesBuilder_.getMessageOrBuilder();
} else {
return contentTimeRanges_ == null
? com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()
: contentTimeRanges_;
}
}
/**
*
*
*
* Time ranges that matching video content must fall within. If no ranges are
* provided, there will be no time restriction. This field is treated just
* like the criteria below, but defined separately for convenience as it is
* used frequently. Note that if the end_time is in the future, it will be
* clamped to the time the request was received.
*
*
* .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.DateTimeRangeArray,
com.google.cloud.visionai.v1.DateTimeRangeArray.Builder,
com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder>
getContentTimeRangesFieldBuilder() {
if (contentTimeRangesBuilder_ == null) {
contentTimeRangesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.DateTimeRangeArray,
com.google.cloud.visionai.v1.DateTimeRangeArray.Builder,
com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder>(
getContentTimeRanges(), getParentForChildren(), isClean());
contentTimeRanges_ = null;
}
return contentTimeRangesBuilder_;
}
private java.util.List criteria_ =
java.util.Collections.emptyList();
private void ensureCriteriaIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
criteria_ = new java.util.ArrayList(criteria_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Criteria,
com.google.cloud.visionai.v1.Criteria.Builder,
com.google.cloud.visionai.v1.CriteriaOrBuilder>
criteriaBuilder_;
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public java.util.List getCriteriaList() {
if (criteriaBuilder_ == null) {
return java.util.Collections.unmodifiableList(criteria_);
} else {
return criteriaBuilder_.getMessageList();
}
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public int getCriteriaCount() {
if (criteriaBuilder_ == null) {
return criteria_.size();
} else {
return criteriaBuilder_.getCount();
}
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public com.google.cloud.visionai.v1.Criteria getCriteria(int index) {
if (criteriaBuilder_ == null) {
return criteria_.get(index);
} else {
return criteriaBuilder_.getMessage(index);
}
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder setCriteria(int index, com.google.cloud.visionai.v1.Criteria value) {
if (criteriaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCriteriaIsMutable();
criteria_.set(index, value);
onChanged();
} else {
criteriaBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder setCriteria(
int index, com.google.cloud.visionai.v1.Criteria.Builder builderForValue) {
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
criteria_.set(index, builderForValue.build());
onChanged();
} else {
criteriaBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder addCriteria(com.google.cloud.visionai.v1.Criteria value) {
if (criteriaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCriteriaIsMutable();
criteria_.add(value);
onChanged();
} else {
criteriaBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder addCriteria(int index, com.google.cloud.visionai.v1.Criteria value) {
if (criteriaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCriteriaIsMutable();
criteria_.add(index, value);
onChanged();
} else {
criteriaBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder addCriteria(com.google.cloud.visionai.v1.Criteria.Builder builderForValue) {
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
criteria_.add(builderForValue.build());
onChanged();
} else {
criteriaBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder addCriteria(
int index, com.google.cloud.visionai.v1.Criteria.Builder builderForValue) {
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
criteria_.add(index, builderForValue.build());
onChanged();
} else {
criteriaBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder addAllCriteria(
java.lang.Iterable extends com.google.cloud.visionai.v1.Criteria> values) {
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, criteria_);
onChanged();
} else {
criteriaBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder clearCriteria() {
if (criteriaBuilder_ == null) {
criteria_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
criteriaBuilder_.clear();
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public Builder removeCriteria(int index) {
if (criteriaBuilder_ == null) {
ensureCriteriaIsMutable();
criteria_.remove(index);
onChanged();
} else {
criteriaBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public com.google.cloud.visionai.v1.Criteria.Builder getCriteriaBuilder(int index) {
return getCriteriaFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public com.google.cloud.visionai.v1.CriteriaOrBuilder getCriteriaOrBuilder(int index) {
if (criteriaBuilder_ == null) {
return criteria_.get(index);
} else {
return criteriaBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public java.util.List extends com.google.cloud.visionai.v1.CriteriaOrBuilder>
getCriteriaOrBuilderList() {
if (criteriaBuilder_ != null) {
return criteriaBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(criteria_);
}
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public com.google.cloud.visionai.v1.Criteria.Builder addCriteriaBuilder() {
return getCriteriaFieldBuilder()
.addBuilder(com.google.cloud.visionai.v1.Criteria.getDefaultInstance());
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public com.google.cloud.visionai.v1.Criteria.Builder addCriteriaBuilder(int index) {
return getCriteriaFieldBuilder()
.addBuilder(index, com.google.cloud.visionai.v1.Criteria.getDefaultInstance());
}
/**
*
*
*
* Criteria applied to search results.
*
*
* repeated .google.cloud.visionai.v1.Criteria criteria = 4;
*/
public java.util.List getCriteriaBuilderList() {
return getCriteriaFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Criteria,
com.google.cloud.visionai.v1.Criteria.Builder,
com.google.cloud.visionai.v1.CriteriaOrBuilder>
getCriteriaFieldBuilder() {
if (criteriaBuilder_ == null) {
criteriaBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Criteria,
com.google.cloud.visionai.v1.Criteria.Builder,
com.google.cloud.visionai.v1.CriteriaOrBuilder>(
criteria_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean());
criteria_ = null;
}
return criteriaBuilder_;
}
private java.util.List facetSelections_ =
java.util.Collections.emptyList();
private void ensureFacetSelectionsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
facetSelections_ =
new java.util.ArrayList(facetSelections_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.FacetGroup,
com.google.cloud.visionai.v1.FacetGroup.Builder,
com.google.cloud.visionai.v1.FacetGroupOrBuilder>
facetSelectionsBuilder_;
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public java.util.List getFacetSelectionsList() {
if (facetSelectionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(facetSelections_);
} else {
return facetSelectionsBuilder_.getMessageList();
}
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public int getFacetSelectionsCount() {
if (facetSelectionsBuilder_ == null) {
return facetSelections_.size();
} else {
return facetSelectionsBuilder_.getCount();
}
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public com.google.cloud.visionai.v1.FacetGroup getFacetSelections(int index) {
if (facetSelectionsBuilder_ == null) {
return facetSelections_.get(index);
} else {
return facetSelectionsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder setFacetSelections(int index, com.google.cloud.visionai.v1.FacetGroup value) {
if (facetSelectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetSelectionsIsMutable();
facetSelections_.set(index, value);
onChanged();
} else {
facetSelectionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder setFacetSelections(
int index, com.google.cloud.visionai.v1.FacetGroup.Builder builderForValue) {
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
facetSelections_.set(index, builderForValue.build());
onChanged();
} else {
facetSelectionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder addFacetSelections(com.google.cloud.visionai.v1.FacetGroup value) {
if (facetSelectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetSelectionsIsMutable();
facetSelections_.add(value);
onChanged();
} else {
facetSelectionsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder addFacetSelections(int index, com.google.cloud.visionai.v1.FacetGroup value) {
if (facetSelectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetSelectionsIsMutable();
facetSelections_.add(index, value);
onChanged();
} else {
facetSelectionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder addFacetSelections(
com.google.cloud.visionai.v1.FacetGroup.Builder builderForValue) {
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
facetSelections_.add(builderForValue.build());
onChanged();
} else {
facetSelectionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder addFacetSelections(
int index, com.google.cloud.visionai.v1.FacetGroup.Builder builderForValue) {
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
facetSelections_.add(index, builderForValue.build());
onChanged();
} else {
facetSelectionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder addAllFacetSelections(
java.lang.Iterable extends com.google.cloud.visionai.v1.FacetGroup> values) {
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetSelections_);
onChanged();
} else {
facetSelectionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder clearFacetSelections() {
if (facetSelectionsBuilder_ == null) {
facetSelections_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
facetSelectionsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public Builder removeFacetSelections(int index) {
if (facetSelectionsBuilder_ == null) {
ensureFacetSelectionsIsMutable();
facetSelections_.remove(index);
onChanged();
} else {
facetSelectionsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public com.google.cloud.visionai.v1.FacetGroup.Builder getFacetSelectionsBuilder(int index) {
return getFacetSelectionsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public com.google.cloud.visionai.v1.FacetGroupOrBuilder getFacetSelectionsOrBuilder(int index) {
if (facetSelectionsBuilder_ == null) {
return facetSelections_.get(index);
} else {
return facetSelectionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public java.util.List extends com.google.cloud.visionai.v1.FacetGroupOrBuilder>
getFacetSelectionsOrBuilderList() {
if (facetSelectionsBuilder_ != null) {
return facetSelectionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(facetSelections_);
}
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public com.google.cloud.visionai.v1.FacetGroup.Builder addFacetSelectionsBuilder() {
return getFacetSelectionsFieldBuilder()
.addBuilder(com.google.cloud.visionai.v1.FacetGroup.getDefaultInstance());
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public com.google.cloud.visionai.v1.FacetGroup.Builder addFacetSelectionsBuilder(int index) {
return getFacetSelectionsFieldBuilder()
.addBuilder(index, com.google.cloud.visionai.v1.FacetGroup.getDefaultInstance());
}
/**
*
*
*
* Stores most recent facet selection state. Only facet groups with user's
* selection will be presented here. Selection state is either selected or
* unselected. Only selected facet buckets will be used as search criteria.
*
*
* repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6;
*/
public java.util.List
getFacetSelectionsBuilderList() {
return getFacetSelectionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.FacetGroup,
com.google.cloud.visionai.v1.FacetGroup.Builder,
com.google.cloud.visionai.v1.FacetGroupOrBuilder>
getFacetSelectionsFieldBuilder() {
if (facetSelectionsBuilder_ == null) {
facetSelectionsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.FacetGroup,
com.google.cloud.visionai.v1.FacetGroup.Builder,
com.google.cloud.visionai.v1.FacetGroupOrBuilder>(
facetSelections_,
((bitField0_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
facetSelections_ = null;
}
return facetSelectionsBuilder_;
}
private com.google.protobuf.LazyStringArrayList resultAnnotationKeys_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureResultAnnotationKeysIsMutable() {
if (!resultAnnotationKeys_.isModifiable()) {
resultAnnotationKeys_ = new com.google.protobuf.LazyStringArrayList(resultAnnotationKeys_);
}
bitField0_ |= 0x00000080;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @return A list containing the resultAnnotationKeys.
*/
public com.google.protobuf.ProtocolStringList getResultAnnotationKeysList() {
resultAnnotationKeys_.makeImmutable();
return resultAnnotationKeys_;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @return The count of resultAnnotationKeys.
*/
public int getResultAnnotationKeysCount() {
return resultAnnotationKeys_.size();
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param index The index of the element to return.
* @return The resultAnnotationKeys at the given index.
*/
public java.lang.String getResultAnnotationKeys(int index) {
return resultAnnotationKeys_.get(index);
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param index The index of the value to return.
* @return The bytes of the resultAnnotationKeys at the given index.
*/
public com.google.protobuf.ByteString getResultAnnotationKeysBytes(int index) {
return resultAnnotationKeys_.getByteString(index);
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param index The index to set the value at.
* @param value The resultAnnotationKeys to set.
* @return This builder for chaining.
*/
public Builder setResultAnnotationKeys(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResultAnnotationKeysIsMutable();
resultAnnotationKeys_.set(index, value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param value The resultAnnotationKeys to add.
* @return This builder for chaining.
*/
public Builder addResultAnnotationKeys(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResultAnnotationKeysIsMutable();
resultAnnotationKeys_.add(value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param values The resultAnnotationKeys to add.
* @return This builder for chaining.
*/
public Builder addAllResultAnnotationKeys(java.lang.Iterable values) {
ensureResultAnnotationKeysIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resultAnnotationKeys_);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @return This builder for chaining.
*/
public Builder clearResultAnnotationKeys() {
resultAnnotationKeys_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
;
onChanged();
return this;
}
/**
*
*
*
* A list of annotation keys to specify the annotations to be retrieved and
* returned with each search result.
* Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
* strategy must not be NO_SEARCH.
*
*
* repeated string result_annotation_keys = 8;
*
* @param value The bytes of the resultAnnotationKeys to add.
* @return This builder for chaining.
*/
public Builder addResultAnnotationKeysBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureResultAnnotationKeysIsMutable();
resultAnnotationKeys_.add(value);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private java.lang.Object searchQuery_ = "";
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @return The searchQuery.
*/
public java.lang.String getSearchQuery() {
java.lang.Object ref = searchQuery_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
searchQuery_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @return The bytes for searchQuery.
*/
public com.google.protobuf.ByteString getSearchQueryBytes() {
java.lang.Object ref = searchQuery_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
searchQuery_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @param value The searchQuery to set.
* @return This builder for chaining.
*/
public Builder setSearchQuery(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
searchQuery_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @return This builder for chaining.
*/
public Builder clearSearchQuery() {
searchQuery_ = getDefaultInstance().getSearchQuery();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* Global search query. Allows user to search assets without needing to
* specify which field the value belongs to.
*
*
* string search_query = 10;
*
* @param value The bytes for searchQuery to set.
* @return This builder for chaining.
*/
public Builder setSearchQueryBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
searchQuery_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.SearchAssetsRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.SearchAssetsRequest)
private static final com.google.cloud.visionai.v1.SearchAssetsRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.SearchAssetsRequest();
}
public static com.google.cloud.visionai.v1.SearchAssetsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SearchAssetsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.SearchAssetsRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy