com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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
/*
* 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/generative_settings.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.cx.v3beta1;
/**
*
*
*
* Settings for Generative AI.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings}
*/
public final class GenerativeSettings extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings)
GenerativeSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use GenerativeSettings.newBuilder() to construct.
private GenerativeSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GenerativeSettings() {
name_ = "";
languageCode_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new GenerativeSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder.class);
}
public interface FallbackSettingsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The selectedPrompt.
*/
java.lang.String getSelectedPrompt();
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The bytes for selectedPrompt.
*/
com.google.protobuf.ByteString getSelectedPromptBytes();
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
getPromptTemplatesList();
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
getPromptTemplates(int index);
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
int getPromptTemplatesCount();
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
java.util.List<
? extends
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>
getPromptTemplatesOrBuilderList();
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder
getPromptTemplatesOrBuilder(int index);
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings}
*/
public static final class FallbackSettings extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings)
FallbackSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use FallbackSettings.newBuilder() to construct.
private FallbackSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FallbackSettings() {
selectedPrompt_ = "";
promptTemplates_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new FallbackSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder
.class);
}
public interface PromptTemplateOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The promptText.
*/
java.lang.String getPromptText();
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The bytes for promptText.
*/
com.google.protobuf.ByteString getPromptTextBytes();
/**
*
*
*
* If the flag is true, the prompt is frozen and cannot be modified by
* users.
*
*
* bool frozen = 3;
*
* @return The frozen.
*/
boolean getFrozen();
}
/**
*
*
*
* Prompt template.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate}
*/
public static final class PromptTemplate extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate)
PromptTemplateOrBuilder {
private static final long serialVersionUID = 0L;
// Use PromptTemplate.newBuilder() to construct.
private PromptTemplate(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PromptTemplate() {
displayName_ = "";
promptText_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new PromptTemplate();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder.class);
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROMPT_TEXT_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object promptText_ = "";
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The promptText.
*/
@java.lang.Override
public java.lang.String getPromptText() {
java.lang.Object ref = promptText_;
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();
promptText_ = s;
return s;
}
}
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The bytes for promptText.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPromptTextBytes() {
java.lang.Object ref = promptText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
promptText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FROZEN_FIELD_NUMBER = 3;
private boolean frozen_ = false;
/**
*
*
*
* If the flag is true, the prompt is frozen and cannot be modified by
* users.
*
*
* bool frozen = 3;
*
* @return The frozen.
*/
@java.lang.Override
public boolean getFrozen() {
return frozen_;
}
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(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_);
}
if (frozen_ != false) {
output.writeBool(3, frozen_);
}
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(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_);
}
if (frozen_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, frozen_);
}
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.GenerativeSettings.FallbackSettings
.PromptTemplate)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
other =
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate)
obj;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getPromptText().equals(other.getPromptText())) return false;
if (getFrozen() != other.getFrozen()) 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();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getPromptText().hashCode();
hash = (37 * hash) + FROZEN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFrozen());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings
.PromptTemplate
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.GenerativeSettings.FallbackSettings.PromptTemplate
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;
}
/**
*
*
*
* Prompt template.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate)
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
displayName_ = "";
promptText_ = "";
frozen_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
build() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
result =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.promptText_ = promptText_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.frozen_ = frozen_;
}
}
@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.GenerativeSettings.FallbackSettings
.PromptTemplate) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.getDefaultInstance()) return this;
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getPromptText().isEmpty()) {
promptText_ = other.promptText_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getFrozen() != false) {
setFrozen(other.getFrozen());
}
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:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
promptText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
frozen_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
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 java.lang.Object displayName_ = "";
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Prompt name.
*
*
* string display_name = 1;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object promptText_ = "";
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The promptText.
*/
public java.lang.String getPromptText() {
java.lang.Object ref = promptText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
promptText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return The bytes for promptText.
*/
public com.google.protobuf.ByteString getPromptTextBytes() {
java.lang.Object ref = promptText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
promptText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @param value The promptText to set.
* @return This builder for chaining.
*/
public Builder setPromptText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
promptText_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @return This builder for chaining.
*/
public Builder clearPromptText() {
promptText_ = getDefaultInstance().getPromptText();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Prompt text that is sent to a LLM on no-match default, placeholders are
* filled downstream. For example: "Here is a conversation $conversation,
* a response is: "
*
*
* string prompt_text = 2;
*
* @param value The bytes for promptText to set.
* @return This builder for chaining.
*/
public Builder setPromptTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
promptText_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private boolean frozen_;
/**
*
*
*
* If the flag is true, the prompt is frozen and cannot be modified by
* users.
*
*
* bool frozen = 3;
*
* @return The frozen.
*/
@java.lang.Override
public boolean getFrozen() {
return frozen_;
}
/**
*
*
*
* If the flag is true, the prompt is frozen and cannot be modified by
* users.
*
*
* bool frozen = 3;
*
* @param value The frozen to set.
* @return This builder for chaining.
*/
public Builder setFrozen(boolean value) {
frozen_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* If the flag is true, the prompt is frozen and cannot be modified by
* users.
*
*
* bool frozen = 3;
*
* @return This builder for chaining.
*/
public Builder clearFrozen() {
bitField0_ = (bitField0_ & ~0x00000004);
frozen_ = false;
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.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate)
private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.FallbackSettings.PromptTemplate
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate();
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PromptTemplate 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.GenerativeSettings.FallbackSettings
.PromptTemplate
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int SELECTED_PROMPT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object selectedPrompt_ = "";
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The selectedPrompt.
*/
@java.lang.Override
public java.lang.String getSelectedPrompt() {
java.lang.Object ref = selectedPrompt_;
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();
selectedPrompt_ = s;
return s;
}
}
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The bytes for selectedPrompt.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSelectedPromptBytes() {
java.lang.Object ref = selectedPrompt_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selectedPrompt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROMPT_TEMPLATES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
promptTemplates_;
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
getPromptTemplatesList() {
return promptTemplates_;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>
getPromptTemplatesOrBuilderList() {
return promptTemplates_;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
@java.lang.Override
public int getPromptTemplatesCount() {
return promptTemplates_.size();
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
getPromptTemplates(int index) {
return promptTemplates_.get(index);
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder
getPromptTemplatesOrBuilder(int index) {
return promptTemplates_.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 {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedPrompt_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, selectedPrompt_);
}
for (int i = 0; i < promptTemplates_.size(); i++) {
output.writeMessage(4, promptTemplates_.get(i));
}
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(selectedPrompt_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, selectedPrompt_);
}
for (int i = 0; i < promptTemplates_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(4, promptTemplates_.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.GenerativeSettings.FallbackSettings)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings other =
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) obj;
if (!getSelectedPrompt().equals(other.getSelectedPrompt())) return false;
if (!getPromptTemplatesList().equals(other.getPromptTemplatesList())) 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();
hash = (37 * hash) + SELECTED_PROMPT_FIELD_NUMBER;
hash = (53 * hash) + getSelectedPrompt().hashCode();
if (getPromptTemplatesCount() > 0) {
hash = (37 * hash) + PROMPT_TEMPLATES_FIELD_NUMBER;
hash = (53 * hash) + getPromptTemplatesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings
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.GenerativeSettings.FallbackSettings 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;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings)
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
selectedPrompt_ = "";
if (promptTemplatesBuilder_ == null) {
promptTemplates_ = java.util.Collections.emptyList();
} else {
promptTemplates_ = null;
promptTemplatesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings build() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result) {
if (promptTemplatesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
promptTemplates_ = java.util.Collections.unmodifiableList(promptTemplates_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.promptTemplates_ = promptTemplates_;
} else {
result.promptTemplates_ = promptTemplatesBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.selectedPrompt_ = selectedPrompt_;
}
}
@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.GenerativeSettings.FallbackSettings) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()) return this;
if (!other.getSelectedPrompt().isEmpty()) {
selectedPrompt_ = other.selectedPrompt_;
bitField0_ |= 0x00000001;
onChanged();
}
if (promptTemplatesBuilder_ == null) {
if (!other.promptTemplates_.isEmpty()) {
if (promptTemplates_.isEmpty()) {
promptTemplates_ = other.promptTemplates_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensurePromptTemplatesIsMutable();
promptTemplates_.addAll(other.promptTemplates_);
}
onChanged();
}
} else {
if (!other.promptTemplates_.isEmpty()) {
if (promptTemplatesBuilder_.isEmpty()) {
promptTemplatesBuilder_.dispose();
promptTemplatesBuilder_ = null;
promptTemplates_ = other.promptTemplates_;
bitField0_ = (bitField0_ & ~0x00000002);
promptTemplatesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getPromptTemplatesFieldBuilder()
: null;
} else {
promptTemplatesBuilder_.addAllMessages(other.promptTemplates_);
}
}
}
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 26:
{
selectedPrompt_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 26
case 34:
{
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
m =
input.readMessage(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.FallbackSettings.PromptTemplate.parser(),
extensionRegistry);
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
promptTemplates_.add(m);
} else {
promptTemplatesBuilder_.addMessage(m);
}
break;
} // case 34
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 java.lang.Object selectedPrompt_ = "";
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The selectedPrompt.
*/
public java.lang.String getSelectedPrompt() {
java.lang.Object ref = selectedPrompt_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selectedPrompt_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return The bytes for selectedPrompt.
*/
public com.google.protobuf.ByteString getSelectedPromptBytes() {
java.lang.Object ref = selectedPrompt_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selectedPrompt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @param value The selectedPrompt to set.
* @return This builder for chaining.
*/
public Builder setSelectedPrompt(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
selectedPrompt_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @return This builder for chaining.
*/
public Builder clearSelectedPrompt() {
selectedPrompt_ = getDefaultInstance().getSelectedPrompt();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Display name of the selected prompt.
*
*
* string selected_prompt = 3;
*
* @param value The bytes for selectedPrompt to set.
* @return This builder for chaining.
*/
public Builder setSelectedPromptBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
selectedPrompt_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
promptTemplates_ = java.util.Collections.emptyList();
private void ensurePromptTemplatesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
promptTemplates_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>(promptTemplates_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>
promptTemplatesBuilder_;
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
getPromptTemplatesList() {
if (promptTemplatesBuilder_ == null) {
return java.util.Collections.unmodifiableList(promptTemplates_);
} else {
return promptTemplatesBuilder_.getMessageList();
}
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public int getPromptTemplatesCount() {
if (promptTemplatesBuilder_ == null) {
return promptTemplates_.size();
} else {
return promptTemplatesBuilder_.getCount();
}
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate
getPromptTemplates(int index) {
if (promptTemplatesBuilder_ == null) {
return promptTemplates_.get(index);
} else {
return promptTemplatesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder setPromptTemplates(
int index,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
value) {
if (promptTemplatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptTemplatesIsMutable();
promptTemplates_.set(index, value);
onChanged();
} else {
promptTemplatesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder setPromptTemplates(
int index,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
.Builder
builderForValue) {
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
promptTemplates_.set(index, builderForValue.build());
onChanged();
} else {
promptTemplatesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder addPromptTemplates(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
value) {
if (promptTemplatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptTemplatesIsMutable();
promptTemplates_.add(value);
onChanged();
} else {
promptTemplatesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder addPromptTemplates(
int index,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
value) {
if (promptTemplatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptTemplatesIsMutable();
promptTemplates_.add(index, value);
onChanged();
} else {
promptTemplatesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder addPromptTemplates(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
.Builder
builderForValue) {
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
promptTemplates_.add(builderForValue.build());
onChanged();
} else {
promptTemplatesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder addPromptTemplates(
int index,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate
.Builder
builderForValue) {
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
promptTemplates_.add(index, builderForValue.build());
onChanged();
} else {
promptTemplatesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder addAllPromptTemplates(
java.lang.Iterable<
? extends
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate>
values) {
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTemplates_);
onChanged();
} else {
promptTemplatesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder clearPromptTemplates() {
if (promptTemplatesBuilder_ == null) {
promptTemplates_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
promptTemplatesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public Builder removePromptTemplates(int index) {
if (promptTemplatesBuilder_ == null) {
ensurePromptTemplatesIsMutable();
promptTemplates_.remove(index);
onChanged();
} else {
promptTemplatesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder
getPromptTemplatesBuilder(int index) {
return getPromptTemplatesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder
getPromptTemplatesOrBuilder(int index) {
if (promptTemplatesBuilder_ == null) {
return promptTemplates_.get(index);
} else {
return promptTemplatesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public java.util.List<
? extends
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>
getPromptTemplatesOrBuilderList() {
if (promptTemplatesBuilder_ != null) {
return promptTemplatesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(promptTemplates_);
}
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder
addPromptTemplatesBuilder() {
return getPromptTemplatesFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.getDefaultInstance());
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder
addPromptTemplatesBuilder(int index) {
return getPromptTemplatesFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.getDefaultInstance());
}
/**
*
*
*
* Stored prompts that can be selected, for example default templates like
* "conservative" or "chatty", or user defined ones.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
*
*/
public java.util.List<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder>
getPromptTemplatesBuilderList() {
return getPromptTemplatesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>
getPromptTemplatesFieldBuilder() {
if (promptTemplatesBuilder_ == null) {
promptTemplatesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplate.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.PromptTemplateOrBuilder>(
promptTemplates_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
promptTemplates_ = null;
}
return promptTemplatesBuilder_;
}
@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.GenerativeSettings.FallbackSettings)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings)
private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings();
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FallbackSettings 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.GenerativeSettings.FallbackSettings
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface KnowledgeConnectorSettingsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The business.
*/
java.lang.String getBusiness();
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The bytes for business.
*/
com.google.protobuf.ByteString getBusinessBytes();
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The agent.
*/
java.lang.String getAgent();
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The bytes for agent.
*/
com.google.protobuf.ByteString getAgentBytes();
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The agentIdentity.
*/
java.lang.String getAgentIdentity();
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The bytes for agentIdentity.
*/
com.google.protobuf.ByteString getAgentIdentityBytes();
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The businessDescription.
*/
java.lang.String getBusinessDescription();
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The bytes for businessDescription.
*/
com.google.protobuf.ByteString getBusinessDescriptionBytes();
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The agentScope.
*/
java.lang.String getAgentScope();
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The bytes for agentScope.
*/
com.google.protobuf.ByteString getAgentScopeBytes();
/**
*
*
*
* Whether to disable fallback to Data Store search results (in case the LLM
* couldn't pick a proper answer). Per default the feature is enabled.
*
*
* bool disable_data_store_fallback = 8;
*
* @return The disableDataStoreFallback.
*/
boolean getDisableDataStoreFallback();
}
/**
*
*
*
* Settings for knowledge connector. These parameters are used for LLM prompt
* like "You are <agent>. You are a helpful and verbose <agent_identity> at
* <business>, <business_description>. Your task is to help humans on
* <agent_scope>".
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings}
*/
public static final class KnowledgeConnectorSettings
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
KnowledgeConnectorSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use KnowledgeConnectorSettings.newBuilder() to construct.
private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KnowledgeConnectorSettings() {
business_ = "";
agent_ = "";
agentIdentity_ = "";
businessDescription_ = "";
agentScope_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new KnowledgeConnectorSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder.class);
}
public static final int BUSINESS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object business_ = "";
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The business.
*/
@java.lang.Override
public java.lang.String getBusiness() {
java.lang.Object ref = business_;
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();
business_ = s;
return s;
}
}
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The bytes for business.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBusinessBytes() {
java.lang.Object ref = business_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
business_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AGENT_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object agent_ = "";
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The agent.
*/
@java.lang.Override
public java.lang.String getAgent() {
java.lang.Object ref = agent_;
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();
agent_ = s;
return s;
}
}
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The bytes for agent.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAgentBytes() {
java.lang.Object ref = agent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AGENT_IDENTITY_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object agentIdentity_ = "";
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The agentIdentity.
*/
@java.lang.Override
public java.lang.String getAgentIdentity() {
java.lang.Object ref = agentIdentity_;
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();
agentIdentity_ = s;
return s;
}
}
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The bytes for agentIdentity.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAgentIdentityBytes() {
java.lang.Object ref = agentIdentity_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agentIdentity_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUSINESS_DESCRIPTION_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object businessDescription_ = "";
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The businessDescription.
*/
@java.lang.Override
public java.lang.String getBusinessDescription() {
java.lang.Object ref = businessDescription_;
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();
businessDescription_ = s;
return s;
}
}
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The bytes for businessDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBusinessDescriptionBytes() {
java.lang.Object ref = businessDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
businessDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AGENT_SCOPE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object agentScope_ = "";
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The agentScope.
*/
@java.lang.Override
public java.lang.String getAgentScope() {
java.lang.Object ref = agentScope_;
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();
agentScope_ = s;
return s;
}
}
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The bytes for agentScope.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAgentScopeBytes() {
java.lang.Object ref = agentScope_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agentScope_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER = 8;
private boolean disableDataStoreFallback_ = false;
/**
*
*
*
* Whether to disable fallback to Data Store search results (in case the LLM
* couldn't pick a proper answer). Per default the feature is enabled.
*
*
* bool disable_data_store_fallback = 8;
*
* @return The disableDataStoreFallback.
*/
@java.lang.Override
public boolean getDisableDataStoreFallback() {
return disableDataStoreFallback_;
}
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(business_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, business_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentIdentity_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, businessDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_);
}
if (disableDataStoreFallback_ != false) {
output.writeBool(8, disableDataStoreFallback_);
}
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(business_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, business_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentIdentity_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, businessDescription_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_);
}
if (disableDataStoreFallback_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, disableDataStoreFallback_);
}
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.GenerativeSettings.KnowledgeConnectorSettings)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings other =
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
obj;
if (!getBusiness().equals(other.getBusiness())) return false;
if (!getAgent().equals(other.getAgent())) return false;
if (!getAgentIdentity().equals(other.getAgentIdentity())) return false;
if (!getBusinessDescription().equals(other.getBusinessDescription())) return false;
if (!getAgentScope().equals(other.getAgentScope())) return false;
if (getDisableDataStoreFallback() != other.getDisableDataStoreFallback()) 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();
hash = (37 * hash) + BUSINESS_FIELD_NUMBER;
hash = (53 * hash) + getBusiness().hashCode();
hash = (37 * hash) + AGENT_FIELD_NUMBER;
hash = (53 * hash) + getAgent().hashCode();
hash = (37 * hash) + AGENT_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getAgentIdentity().hashCode();
hash = (37 * hash) + BUSINESS_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getBusinessDescription().hashCode();
hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER;
hash = (53 * hash) + getAgentScope().hashCode();
hash = (37 * hash) + DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDataStoreFallback());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings
.KnowledgeConnectorSettings
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.GenerativeSettings.KnowledgeConnectorSettings
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;
}
/**
*
*
*
* Settings for knowledge connector. These parameters are used for LLM prompt
* like "You are <agent>. You are a helpful and verbose <agent_identity> at
* <business>, <business_description>. Your task is to help humans on
* <agent_scope>".
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
business_ = "";
agent_ = "";
agentIdentity_ = "";
businessDescription_ = "";
agentScope_ = "";
disableDataStoreFallback_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
build() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
result =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.business_ = business_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.agent_ = agent_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.agentIdentity_ = agentIdentity_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.businessDescription_ = businessDescription_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.agentScope_ = agentScope_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.disableDataStoreFallback_ = disableDataStoreFallback_;
}
}
@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.GenerativeSettings.KnowledgeConnectorSettings) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance()) return this;
if (!other.getBusiness().isEmpty()) {
business_ = other.business_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAgent().isEmpty()) {
agent_ = other.agent_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getAgentIdentity().isEmpty()) {
agentIdentity_ = other.agentIdentity_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getBusinessDescription().isEmpty()) {
businessDescription_ = other.businessDescription_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getAgentScope().isEmpty()) {
agentScope_ = other.agentScope_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.getDisableDataStoreFallback() != false) {
setDisableDataStoreFallback(other.getDisableDataStoreFallback());
}
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:
{
business_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
agent_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
agentIdentity_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
businessDescription_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
agentScope_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 64:
{
disableDataStoreFallback_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 64
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 java.lang.Object business_ = "";
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The business.
*/
public java.lang.String getBusiness() {
java.lang.Object ref = business_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
business_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return The bytes for business.
*/
public com.google.protobuf.ByteString getBusinessBytes() {
java.lang.Object ref = business_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
business_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @param value The business to set.
* @return This builder for chaining.
*/
public Builder setBusiness(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
business_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @return This builder for chaining.
*/
public Builder clearBusiness() {
business_ = getDefaultInstance().getBusiness();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Name of the company, organization or other entity that the agent
* represents. Used for knowledge connector LLM prompt and for knowledge
* search.
*
*
* string business = 1;
*
* @param value The bytes for business to set.
* @return This builder for chaining.
*/
public Builder setBusinessBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
business_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object agent_ = "";
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The agent.
*/
public java.lang.String getAgent() {
java.lang.Object ref = agent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
agent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return The bytes for agent.
*/
public com.google.protobuf.ByteString getAgentBytes() {
java.lang.Object ref = agent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @param value The agent to set.
* @return This builder for chaining.
*/
public Builder setAgent(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
agent_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @return This builder for chaining.
*/
public Builder clearAgent() {
agent_ = getDefaultInstance().getAgent();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Name of the virtual agent. Used for LLM prompt. Can be left empty.
*
*
* string agent = 2;
*
* @param value The bytes for agent to set.
* @return This builder for chaining.
*/
public Builder setAgentBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
agent_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object agentIdentity_ = "";
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The agentIdentity.
*/
public java.lang.String getAgentIdentity() {
java.lang.Object ref = agentIdentity_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
agentIdentity_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return The bytes for agentIdentity.
*/
public com.google.protobuf.ByteString getAgentIdentityBytes() {
java.lang.Object ref = agentIdentity_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agentIdentity_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @param value The agentIdentity to set.
* @return This builder for chaining.
*/
public Builder setAgentIdentity(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
agentIdentity_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @return This builder for chaining.
*/
public Builder clearAgentIdentity() {
agentIdentity_ = getDefaultInstance().getAgentIdentity();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Identity of the agent, e.g. "virtual agent", "AI assistant".
*
*
* string agent_identity = 3;
*
* @param value The bytes for agentIdentity to set.
* @return This builder for chaining.
*/
public Builder setAgentIdentityBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
agentIdentity_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object businessDescription_ = "";
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The businessDescription.
*/
public java.lang.String getBusinessDescription() {
java.lang.Object ref = businessDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
businessDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return The bytes for businessDescription.
*/
public com.google.protobuf.ByteString getBusinessDescriptionBytes() {
java.lang.Object ref = businessDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
businessDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @param value The businessDescription to set.
* @return This builder for chaining.
*/
public Builder setBusinessDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
businessDescription_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @return This builder for chaining.
*/
public Builder clearBusinessDescription() {
businessDescription_ = getDefaultInstance().getBusinessDescription();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Company description, used for LLM prompt, e.g. "a family company selling
* freshly roasted coffee beans".
*
*
* string business_description = 4;
*
* @param value The bytes for businessDescription to set.
* @return This builder for chaining.
*/
public Builder setBusinessDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
businessDescription_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object agentScope_ = "";
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The agentScope.
*/
public java.lang.String getAgentScope() {
java.lang.Object ref = agentScope_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
agentScope_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return The bytes for agentScope.
*/
public com.google.protobuf.ByteString getAgentScopeBytes() {
java.lang.Object ref = agentScope_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
agentScope_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @param value The agentScope to set.
* @return This builder for chaining.
*/
public Builder setAgentScope(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
agentScope_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @return This builder for chaining.
*/
public Builder clearAgentScope() {
agentScope_ = getDefaultInstance().getAgentScope();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Agent scope, e.g. "Example company website", "internal Example
* company website for employees", "manual of car owner".
*
*
* string agent_scope = 5;
*
* @param value The bytes for agentScope to set.
* @return This builder for chaining.
*/
public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
agentScope_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private boolean disableDataStoreFallback_;
/**
*
*
*
* Whether to disable fallback to Data Store search results (in case the LLM
* couldn't pick a proper answer). Per default the feature is enabled.
*
*
* bool disable_data_store_fallback = 8;
*
* @return The disableDataStoreFallback.
*/
@java.lang.Override
public boolean getDisableDataStoreFallback() {
return disableDataStoreFallback_;
}
/**
*
*
*
* Whether to disable fallback to Data Store search results (in case the LLM
* couldn't pick a proper answer). Per default the feature is enabled.
*
*
* bool disable_data_store_fallback = 8;
*
* @param value The disableDataStoreFallback to set.
* @return This builder for chaining.
*/
public Builder setDisableDataStoreFallback(boolean value) {
disableDataStoreFallback_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Whether to disable fallback to Data Store search results (in case the LLM
* couldn't pick a proper answer). Per default the feature is enabled.
*
*
* bool disable_data_store_fallback = 8;
*
* @return This builder for chaining.
*/
public Builder clearDisableDataStoreFallback() {
bitField0_ = (bitField0_ & ~0x00000020);
disableDataStoreFallback_ = false;
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.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings)
private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings();
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public KnowledgeConnectorSettings 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.GenerativeSettings.KnowledgeConnectorSettings
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FALLBACK_SETTINGS_FIELD_NUMBER = 1;
private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
fallbackSettings_;
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*
* @return Whether the fallbackSettings field is set.
*/
@java.lang.Override
public boolean hasFallbackSettings() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*
* @return The fallbackSettings.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
getFallbackSettings() {
return fallbackSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()
: fallbackSettings_;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder
getFallbackSettingsOrBuilder() {
return fallbackSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()
: fallbackSettings_;
}
public static final int GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER = 3;
private com.google.cloud.dialogflow.cx.v3beta1.SafetySettings generativeSafetySettings_;
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
* @return Whether the generativeSafetySettings field is set.
*/
@java.lang.Override
public boolean hasGenerativeSafetySettings() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
* @return The generativeSafetySettings.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getGenerativeSafetySettings() {
return generativeSafetySettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()
: generativeSafetySettings_;
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder
getGenerativeSafetySettingsOrBuilder() {
return generativeSafetySettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()
: generativeSafetySettings_;
}
public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 7;
private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
knowledgeConnectorSettings_;
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*
* @return Whether the knowledgeConnectorSettings field is set.
*/
@java.lang.Override
public boolean hasKnowledgeConnectorSettings() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*
* @return The knowledgeConnectorSettings.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
getKnowledgeConnectorSettings() {
return knowledgeConnectorSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance()
: knowledgeConnectorSettings_;
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder
getKnowledgeConnectorSettingsOrBuilder() {
return knowledgeConnectorSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance()
: knowledgeConnectorSettings_;
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object languageCode_ = "";
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @return The languageCode.
*/
@java.lang.Override
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
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();
languageCode_ = s;
return s;
}
}
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @return The bytes for languageCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 8;
private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_;
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*
* @return Whether the llmModelSettings field is set.
*/
@java.lang.Override
public boolean hasLlmModelSettings() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*
* @return The llmModelSettings.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() {
return llmModelSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()
: llmModelSettings_;
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder
getLlmModelSettingsOrBuilder() {
return llmModelSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()
: llmModelSettings_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getFallbackSettings());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getGenerativeSafetySettings());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(7, getKnowledgeConnectorSettings());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(8, getLlmModelSettings());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFallbackSettings());
}
if (((bitField0_ & 0x00000002) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3, getGenerativeSafetySettings());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, getKnowledgeConnectorSettings());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLlmModelSettings());
}
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.GenerativeSettings)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings other =
(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) obj;
if (!getName().equals(other.getName())) return false;
if (hasFallbackSettings() != other.hasFallbackSettings()) return false;
if (hasFallbackSettings()) {
if (!getFallbackSettings().equals(other.getFallbackSettings())) return false;
}
if (hasGenerativeSafetySettings() != other.hasGenerativeSafetySettings()) return false;
if (hasGenerativeSafetySettings()) {
if (!getGenerativeSafetySettings().equals(other.getGenerativeSafetySettings())) return false;
}
if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false;
if (hasKnowledgeConnectorSettings()) {
if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings()))
return false;
}
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false;
if (hasLlmModelSettings()) {
if (!getLlmModelSettings().equals(other.getLlmModelSettings())) 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();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasFallbackSettings()) {
hash = (37 * hash) + FALLBACK_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getFallbackSettings().hashCode();
}
if (hasGenerativeSafetySettings()) {
hash = (37 * hash) + GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getGenerativeSafetySettings().hashCode();
}
if (hasKnowledgeConnectorSettings()) {
hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode();
}
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
if (hasLlmModelSettings()) {
hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getLlmModelSettings().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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;
}
/**
*
*
*
* Settings for Generative AI.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeSettings}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings)
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.class,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getFallbackSettingsFieldBuilder();
getGenerativeSafetySettingsFieldBuilder();
getKnowledgeConnectorSettingsFieldBuilder();
getLlmModelSettingsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
fallbackSettings_ = null;
if (fallbackSettingsBuilder_ != null) {
fallbackSettingsBuilder_.dispose();
fallbackSettingsBuilder_ = null;
}
generativeSafetySettings_ = null;
if (generativeSafetySettingsBuilder_ != null) {
generativeSafetySettingsBuilder_.dispose();
generativeSafetySettingsBuilder_ = null;
}
knowledgeConnectorSettings_ = null;
if (knowledgeConnectorSettingsBuilder_ != null) {
knowledgeConnectorSettingsBuilder_.dispose();
knowledgeConnectorSettingsBuilder_ = null;
}
languageCode_ = "";
llmModelSettings_ = null;
if (llmModelSettingsBuilder_ != null) {
llmModelSettingsBuilder_.dispose();
llmModelSettingsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings build() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result =
new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fallbackSettings_ =
fallbackSettingsBuilder_ == null ? fallbackSettings_ : fallbackSettingsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.generativeSafetySettings_ =
generativeSafetySettingsBuilder_ == null
? generativeSafetySettings_
: generativeSafetySettingsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.knowledgeConnectorSettings_ =
knowledgeConnectorSettingsBuilder_ == null
? knowledgeConnectorSettings_
: knowledgeConnectorSettingsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.languageCode_ = languageCode_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.llmModelSettings_ =
llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@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.GenerativeSettings) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasFallbackSettings()) {
mergeFallbackSettings(other.getFallbackSettings());
}
if (other.hasGenerativeSafetySettings()) {
mergeGenerativeSafetySettings(other.getGenerativeSafetySettings());
}
if (other.hasKnowledgeConnectorSettings()) {
mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings());
}
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasLlmModelSettings()) {
mergeLlmModelSettings(other.getLlmModelSettings());
}
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:
{
input.readMessage(
getFallbackSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 10
case 26:
{
input.readMessage(
getGenerativeSafetySettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
languageCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 34
case 42:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 42
case 58:
{
input.readMessage(
getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 58
case 66:
{
input.readMessage(
getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 66
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 java.lang.Object name_ = "";
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generativeSettings`.
*
*
* string name = 5;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
fallbackSettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder>
fallbackSettingsBuilder_;
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*
* @return Whether the fallbackSettings field is set.
*/
public boolean hasFallbackSettings() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*
* @return The fallbackSettings.
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
getFallbackSettings() {
if (fallbackSettingsBuilder_ == null) {
return fallbackSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()
: fallbackSettings_;
} else {
return fallbackSettingsBuilder_.getMessage();
}
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public Builder setFallbackSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings value) {
if (fallbackSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fallbackSettings_ = value;
} else {
fallbackSettingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public Builder setFallbackSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder
builderForValue) {
if (fallbackSettingsBuilder_ == null) {
fallbackSettings_ = builderForValue.build();
} else {
fallbackSettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public Builder mergeFallbackSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings value) {
if (fallbackSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& fallbackSettings_ != null
&& fallbackSettings_
!= com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()) {
getFallbackSettingsBuilder().mergeFrom(value);
} else {
fallbackSettings_ = value;
}
} else {
fallbackSettingsBuilder_.mergeFrom(value);
}
if (fallbackSettings_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public Builder clearFallbackSettings() {
bitField0_ = (bitField0_ & ~0x00000002);
fallbackSettings_ = null;
if (fallbackSettingsBuilder_ != null) {
fallbackSettingsBuilder_.dispose();
fallbackSettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder
getFallbackSettingsBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getFallbackSettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder
getFallbackSettingsOrBuilder() {
if (fallbackSettingsBuilder_ != null) {
return fallbackSettingsBuilder_.getMessageOrBuilder();
} else {
return fallbackSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings
.getDefaultInstance()
: fallbackSettings_;
}
}
/**
*
*
*
* Settings for Generative Fallback.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings fallback_settings = 1;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettingsOrBuilder>
getFallbackSettingsFieldBuilder() {
if (fallbackSettingsBuilder_ == null) {
fallbackSettingsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.FallbackSettingsOrBuilder>(
getFallbackSettings(), getParentForChildren(), isClean());
fallbackSettings_ = null;
}
return fallbackSettingsBuilder_;
}
private com.google.cloud.dialogflow.cx.v3beta1.SafetySettings generativeSafetySettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder>
generativeSafetySettingsBuilder_;
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*
* @return Whether the generativeSafetySettings field is set.
*/
public boolean hasGenerativeSafetySettings() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*
* @return The generativeSafetySettings.
*/
public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings getGenerativeSafetySettings() {
if (generativeSafetySettingsBuilder_ == null) {
return generativeSafetySettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()
: generativeSafetySettings_;
} else {
return generativeSafetySettingsBuilder_.getMessage();
}
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public Builder setGenerativeSafetySettings(
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings value) {
if (generativeSafetySettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
generativeSafetySettings_ = value;
} else {
generativeSafetySettingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public Builder setGenerativeSafetySettings(
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder builderForValue) {
if (generativeSafetySettingsBuilder_ == null) {
generativeSafetySettings_ = builderForValue.build();
} else {
generativeSafetySettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public Builder mergeGenerativeSafetySettings(
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings value) {
if (generativeSafetySettingsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& generativeSafetySettings_ != null
&& generativeSafetySettings_
!= com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()) {
getGenerativeSafetySettingsBuilder().mergeFrom(value);
} else {
generativeSafetySettings_ = value;
}
} else {
generativeSafetySettingsBuilder_.mergeFrom(value);
}
if (generativeSafetySettings_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public Builder clearGenerativeSafetySettings() {
bitField0_ = (bitField0_ & ~0x00000004);
generativeSafetySettings_ = null;
if (generativeSafetySettingsBuilder_ != null) {
generativeSafetySettingsBuilder_.dispose();
generativeSafetySettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder
getGenerativeSafetySettingsBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getGenerativeSafetySettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder
getGenerativeSafetySettingsOrBuilder() {
if (generativeSafetySettingsBuilder_ != null) {
return generativeSafetySettingsBuilder_.getMessageOrBuilder();
} else {
return generativeSafetySettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.getDefaultInstance()
: generativeSafetySettings_;
}
}
/**
*
*
*
* Settings for Generative Safety.
*
*
* .google.cloud.dialogflow.cx.v3beta1.SafetySettings generative_safety_settings = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder>
getGenerativeSafetySettingsFieldBuilder() {
if (generativeSafetySettingsBuilder_ == null) {
generativeSafetySettingsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.SafetySettingsOrBuilder>(
getGenerativeSafetySettings(), getParentForChildren(), isClean());
generativeSafetySettings_ = null;
}
return generativeSafetySettingsBuilder_;
}
private com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
knowledgeConnectorSettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder>
knowledgeConnectorSettingsBuilder_;
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*
* @return Whether the knowledgeConnectorSettings field is set.
*/
public boolean hasKnowledgeConnectorSettings() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*
* @return The knowledgeConnectorSettings.
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
getKnowledgeConnectorSettings() {
if (knowledgeConnectorSettingsBuilder_ == null) {
return knowledgeConnectorSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance()
: knowledgeConnectorSettings_;
} else {
return knowledgeConnectorSettingsBuilder_.getMessage();
}
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public Builder setKnowledgeConnectorSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
value) {
if (knowledgeConnectorSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
knowledgeConnectorSettings_ = value;
} else {
knowledgeConnectorSettingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public Builder setKnowledgeConnectorSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.Builder
builderForValue) {
if (knowledgeConnectorSettingsBuilder_ == null) {
knowledgeConnectorSettings_ = builderForValue.build();
} else {
knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public Builder mergeKnowledgeConnectorSettings(
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
value) {
if (knowledgeConnectorSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& knowledgeConnectorSettings_ != null
&& knowledgeConnectorSettings_
!= com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings.getDefaultInstance()) {
getKnowledgeConnectorSettingsBuilder().mergeFrom(value);
} else {
knowledgeConnectorSettings_ = value;
}
} else {
knowledgeConnectorSettingsBuilder_.mergeFrom(value);
}
if (knowledgeConnectorSettings_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public Builder clearKnowledgeConnectorSettings() {
bitField0_ = (bitField0_ & ~0x00000008);
knowledgeConnectorSettings_ = null;
if (knowledgeConnectorSettingsBuilder_ != null) {
knowledgeConnectorSettingsBuilder_.dispose();
knowledgeConnectorSettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder
getKnowledgeConnectorSettingsBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getKnowledgeConnectorSettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder
getKnowledgeConnectorSettingsOrBuilder() {
if (knowledgeConnectorSettingsBuilder_ != null) {
return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder();
} else {
return knowledgeConnectorSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.getDefaultInstance()
: knowledgeConnectorSettings_;
}
}
/**
*
*
*
* Settings for knowledge connector.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder>
getKnowledgeConnectorSettingsFieldBuilder() {
if (knowledgeConnectorSettingsBuilder_ == null) {
knowledgeConnectorSettingsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettings,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings
.KnowledgeConnectorSettingsOrBuilder>(
getKnowledgeConnectorSettings(), getParentForChildren(), isClean());
knowledgeConnectorSettings_ = null;
}
return knowledgeConnectorSettingsBuilder_;
}
private java.lang.Object languageCode_ = "";
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Language for this settings.
*
*
* string language_code = 4;
*
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>
llmModelSettingsBuilder_;
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*
* @return Whether the llmModelSettings field is set.
*/
public boolean hasLlmModelSettings() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*
* @return The llmModelSettings.
*/
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() {
if (llmModelSettingsBuilder_ == null) {
return llmModelSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()
: llmModelSettings_;
} else {
return llmModelSettingsBuilder_.getMessage();
}
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public Builder setLlmModelSettings(
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) {
if (llmModelSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
llmModelSettings_ = value;
} else {
llmModelSettingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public Builder setLlmModelSettings(
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) {
if (llmModelSettingsBuilder_ == null) {
llmModelSettings_ = builderForValue.build();
} else {
llmModelSettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public Builder mergeLlmModelSettings(
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) {
if (llmModelSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& llmModelSettings_ != null
&& llmModelSettings_
!= com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) {
getLlmModelSettingsBuilder().mergeFrom(value);
} else {
llmModelSettings_ = value;
}
} else {
llmModelSettingsBuilder_.mergeFrom(value);
}
if (llmModelSettings_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public Builder clearLlmModelSettings() {
bitField0_ = (bitField0_ & ~0x00000020);
llmModelSettings_ = null;
if (llmModelSettingsBuilder_ != null) {
llmModelSettingsBuilder_.dispose();
llmModelSettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder
getLlmModelSettingsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getLlmModelSettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder
getLlmModelSettingsOrBuilder() {
if (llmModelSettingsBuilder_ != null) {
return llmModelSettingsBuilder_.getMessageOrBuilder();
} else {
return llmModelSettings_ == null
? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()
: llmModelSettings_;
}
}
/**
*
*
*
* LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>
getLlmModelSettingsFieldBuilder() {
if (llmModelSettingsBuilder_ == null) {
llmModelSettingsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder,
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>(
getLlmModelSettings(), getParentForChildren(), isClean());
llmModelSettings_ = null;
}
return llmModelSettingsBuilder_;
}
@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.GenerativeSettings)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeSettings)
private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings();
}
public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GenerativeSettings 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.GenerativeSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}