com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
PROTO library for proto-google-cloud-dialogflow-cx-v3beta1
The newest version!
/*
* 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/dialogflow/cx/v3beta1/session.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.cx.v3beta1;
/**
*
*
*
* Boost specifications for data stores.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpecs}
*/
public final class BoostSpecs extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpecs)
BoostSpecsOrBuilder {
private static final long serialVersionUID = 0L;
// Use BoostSpecs.newBuilder() to construct.
private BoostSpecs(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BoostSpecs() {
dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList();
spec_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BoostSpecs();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.class,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder.class);
}
public static final int DATA_STORES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList dataStores_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @return A list containing the dataStores.
*/
public com.google.protobuf.ProtocolStringList getDataStoresList() {
return dataStores_;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @return The count of dataStores.
*/
public int getDataStoresCount() {
return dataStores_.size();
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param index The index of the element to return.
* @return The dataStores at the given index.
*/
public java.lang.String getDataStores(int index) {
return dataStores_.get(index);
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param index The index of the value to return.
* @return The bytes of the dataStores at the given index.
*/
public com.google.protobuf.ByteString getDataStoresBytes(int index) {
return dataStores_.getByteString(index);
}
public static final int SPEC_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List spec_;
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List getSpecList() {
return spec_;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>
getSpecOrBuilderList() {
return spec_;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getSpecCount() {
return spec_.size();
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getSpec(int index) {
return spec_.get(index);
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder getSpecOrBuilder(int index) {
return spec_.get(index);
}
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 {
for (int i = 0; i < dataStores_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStores_.getRaw(i));
}
for (int i = 0; i < spec_.size(); i++) {
output.writeMessage(2, spec_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < dataStores_.size(); i++) {
dataSize += computeStringSizeNoTag(dataStores_.getRaw(i));
}
size += dataSize;
size += 1 * getDataStoresList().size();
}
for (int i = 0; i < spec_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spec_.get(i));
}
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.dialogflow.cx.v3beta1.BoostSpecs)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs other =
(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs) obj;
if (!getDataStoresList().equals(other.getDataStoresList())) return false;
if (!getSpecList().equals(other.getSpecList())) return false;
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();
if (getDataStoresCount() > 0) {
hash = (37 * hash) + DATA_STORES_FIELD_NUMBER;
hash = (53 * hash) + getDataStoresList().hashCode();
}
if (getSpecCount() > 0) {
hash = (37 * hash) + SPEC_FIELD_NUMBER;
hash = (53 * hash) + getSpecList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs 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;
}
/**
*
*
*
* Boost specifications for data stores.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.BoostSpecs}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.BoostSpecs)
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.class,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList();
if (specBuilder_ == null) {
spec_ = java.util.Collections.emptyList();
} else {
spec_ = null;
specBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_BoostSpecs_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs build() {
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result =
new com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result) {
if (specBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
spec_ = java.util.Collections.unmodifiableList(spec_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.spec_ = spec_;
} else {
result.spec_ = specBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
dataStores_.makeImmutable();
result.dataStores_ = dataStores_;
}
}
@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.dialogflow.cx.v3beta1.BoostSpecs) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.getDefaultInstance())
return this;
if (!other.dataStores_.isEmpty()) {
if (dataStores_.isEmpty()) {
dataStores_ = other.dataStores_;
bitField0_ |= 0x00000001;
} else {
ensureDataStoresIsMutable();
dataStores_.addAll(other.dataStores_);
}
onChanged();
}
if (specBuilder_ == null) {
if (!other.spec_.isEmpty()) {
if (spec_.isEmpty()) {
spec_ = other.spec_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSpecIsMutable();
spec_.addAll(other.spec_);
}
onChanged();
}
} else {
if (!other.spec_.isEmpty()) {
if (specBuilder_.isEmpty()) {
specBuilder_.dispose();
specBuilder_ = null;
spec_ = other.spec_;
bitField0_ = (bitField0_ & ~0x00000002);
specBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSpecFieldBuilder()
: null;
} else {
specBuilder_.addAllMessages(other.spec_);
}
}
}
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:
{
java.lang.String s = input.readStringRequireUtf8();
ensureDataStoresIsMutable();
dataStores_.add(s);
break;
} // case 10
case 18:
{
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec m =
input.readMessage(
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.parser(),
extensionRegistry);
if (specBuilder_ == null) {
ensureSpecIsMutable();
spec_.add(m);
} else {
specBuilder_.addMessage(m);
}
break;
} // case 18
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 bitField0_;
private com.google.protobuf.LazyStringArrayList dataStores_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDataStoresIsMutable() {
if (!dataStores_.isModifiable()) {
dataStores_ = new com.google.protobuf.LazyStringArrayList(dataStores_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @return A list containing the dataStores.
*/
public com.google.protobuf.ProtocolStringList getDataStoresList() {
dataStores_.makeImmutable();
return dataStores_;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @return The count of dataStores.
*/
public int getDataStoresCount() {
return dataStores_.size();
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param index The index of the element to return.
* @return The dataStores at the given index.
*/
public java.lang.String getDataStores(int index) {
return dataStores_.get(index);
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param index The index of the value to return.
* @return The bytes of the dataStores at the given index.
*/
public com.google.protobuf.ByteString getDataStoresBytes(int index) {
return dataStores_.getByteString(index);
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param index The index to set the value at.
* @param value The dataStores to set.
* @return This builder for chaining.
*/
public Builder setDataStores(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDataStoresIsMutable();
dataStores_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param value The dataStores to add.
* @return This builder for chaining.
*/
public Builder addDataStores(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDataStoresIsMutable();
dataStores_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param values The dataStores to add.
* @return This builder for chaining.
*/
public Builder addAllDataStores(java.lang.Iterable values) {
ensureDataStoresIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStores_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearDataStores() {
dataStores_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. Data Stores where the boosting configuration is applied. The full
* names of the referenced data stores. Formats:
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
* `projects/{project}/locations/{location}/dataStores/{data_store}
*
*
*
* repeated string data_stores = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes of the dataStores to add.
* @return This builder for chaining.
*/
public Builder addDataStoresBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureDataStoresIsMutable();
dataStores_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List spec_ =
java.util.Collections.emptyList();
private void ensureSpecIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
spec_ = new java.util.ArrayList(spec_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>
specBuilder_;
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List getSpecList() {
if (specBuilder_ == null) {
return java.util.Collections.unmodifiableList(spec_);
} else {
return specBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getSpecCount() {
if (specBuilder_ == null) {
return spec_.size();
} else {
return specBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec getSpec(int index) {
if (specBuilder_ == null) {
return spec_.get(index);
} else {
return specBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSpec(int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) {
if (specBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecIsMutable();
spec_.set(index, value);
onChanged();
} else {
specBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSpec(
int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) {
if (specBuilder_ == null) {
ensureSpecIsMutable();
spec_.set(index, builderForValue.build());
onChanged();
} else {
specBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSpec(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) {
if (specBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecIsMutable();
spec_.add(value);
onChanged();
} else {
specBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSpec(int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec value) {
if (specBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecIsMutable();
spec_.add(index, value);
onChanged();
} else {
specBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSpec(
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) {
if (specBuilder_ == null) {
ensureSpecIsMutable();
spec_.add(builderForValue.build());
onChanged();
} else {
specBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSpec(
int index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder builderForValue) {
if (specBuilder_ == null) {
ensureSpecIsMutable();
spec_.add(index, builderForValue.build());
onChanged();
} else {
specBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllSpec(
java.lang.Iterable extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpec> values) {
if (specBuilder_ == null) {
ensureSpecIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spec_);
onChanged();
} else {
specBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearSpec() {
if (specBuilder_ == null) {
spec_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
specBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeSpec(int index) {
if (specBuilder_ == null) {
ensureSpecIsMutable();
spec_.remove(index);
onChanged();
} else {
specBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder getSpecBuilder(int index) {
return getSpecFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder getSpecOrBuilder(int index) {
if (specBuilder_ == null) {
return spec_.get(index);
} else {
return specBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List extends com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>
getSpecOrBuilderList() {
if (specBuilder_ != null) {
return specBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(spec_);
}
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder addSpecBuilder() {
return getSpecFieldBuilder()
.addBuilder(com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder addSpecBuilder(int index) {
return getSpecFieldBuilder()
.addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of boosting specifications.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.BoostSpec spec = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getSpecBuilderList() {
return getSpecFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>
getSpecFieldBuilder() {
if (specBuilder_ == null) {
specBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpec.Builder,
com.google.cloud.dialogflow.cx.v3beta1.BoostSpecOrBuilder>(
spec_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
spec_ = null;
}
return specBuilder_;
}
@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.dialogflow.cx.v3beta1.BoostSpecs)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.BoostSpecs)
private static final com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs();
}
public static com.google.cloud.dialogflow.cx.v3beta1.BoostSpecs getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BoostSpecs 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.dialogflow.cx.v3beta1.BoostSpecs getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}