com.google.cloud.dialogflow.cx.v3beta1.Generator 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/generator.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.dialogflow.cx.v3beta1;
/**
*
*
*
* Generators contain prompt to be sent to the LLM model to generate text. The
* prompt can contain parameters which will be resolved before calling the
* model. It can optionally contain banned phrases to ensure the model responses
* are safe.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Generator}
*/
public final class Generator extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Generator)
GeneratorOrBuilder {
private static final long serialVersionUID = 0L;
// Use Generator.newBuilder() to construct.
private Generator(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Generator() {
name_ = "";
displayName_ = "";
placeholders_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Generator();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Generator.class,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Builder.class);
}
public interface PlaceholderOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
}
/**
*
*
*
* Represents a custom placeholder in the prompt text.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder}
*/
public static final class Placeholder extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder)
PlaceholderOrBuilder {
private static final long serialVersionUID = 0L;
// Use Placeholder.newBuilder() to construct.
private Placeholder(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Placeholder() {
id_ = "";
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Placeholder();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_Placeholder_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_Placeholder_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.class,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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;
}
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
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(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
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.Generator.Placeholder)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder other =
(com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder) obj;
if (!getId().equals(other.getId())) return false;
if (!getName().equals(other.getName())) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder 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.Generator.Placeholder parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder 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.Generator.Placeholder parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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.Generator.Placeholder 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;
}
/**
*
*
*
* Represents a custom placeholder in the prompt text.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder)
com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_Placeholder_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_Placeholder_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.class,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_Placeholder_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder build() {
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder result =
new com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.name_ = name_;
}
}
@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.Generator.Placeholder) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.getDefaultInstance())
return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000002;
onChanged();
}
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:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Unique ID used to map custom placeholder to parameters in fulfillment.
*
*
* string id = 1;
*
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Custom placeholder value in the prompt text.
*
*
* string name = 2;
*
* @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_ |= 0x00000002;
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.Generator.Placeholder)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder)
private static final com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Placeholder 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.Generator.Placeholder
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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 = 3;
private com.google.cloud.dialogflow.cx.v3beta1.Phrase promptText_;
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the promptText field is set.
*/
@java.lang.Override
public boolean hasPromptText() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The promptText.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Phrase getPromptText() {
return promptText_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Phrase.getDefaultInstance()
: promptText_;
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.PhraseOrBuilder getPromptTextOrBuilder() {
return promptText_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Phrase.getDefaultInstance()
: promptText_;
}
public static final int PLACEHOLDERS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List
placeholders_;
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getPlaceholdersList() {
return placeholders_;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder>
getPlaceholdersOrBuilderList() {
return placeholders_;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getPlaceholdersCount() {
return placeholders_.size();
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder getPlaceholders(int index) {
return placeholders_.get(index);
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder
getPlaceholdersOrBuilder(int index) {
return placeholders_.get(index);
}
public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 9;
private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_;
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*
* @return Whether the llmModelSettings field is set.
*/
@java.lang.Override
public boolean hasLlmModelSettings() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*
* @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_;
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
@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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getPromptText());
}
for (int i = 0; i < placeholders_.size(); i++) {
output.writeMessage(5, placeholders_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getLlmModelSettings());
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPromptText());
}
for (int i = 0; i < placeholders_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, placeholders_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, 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.Generator)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Generator other =
(com.google.cloud.dialogflow.cx.v3beta1.Generator) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (hasPromptText() != other.hasPromptText()) return false;
if (hasPromptText()) {
if (!getPromptText().equals(other.getPromptText())) return false;
}
if (!getPlaceholdersList().equals(other.getPlaceholdersList())) 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();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
if (hasPromptText()) {
hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getPromptText().hashCode();
}
if (getPlaceholdersCount() > 0) {
hash = (37 * hash) + PLACEHOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getPlaceholdersList().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.Generator parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator 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.Generator parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator 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.Generator parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator 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.Generator 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.Generator 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.Generator 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.Generator 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.Generator 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.Generator 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.Generator 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;
}
/**
*
*
*
* Generators contain prompt to be sent to the LLM model to generate text. The
* prompt can contain parameters which will be resolved before calling the
* model. It can optionally contain banned phrases to ensure the model responses
* are safe.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Generator}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Generator)
com.google.cloud.dialogflow.cx.v3beta1.GeneratorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Generator.class,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Generator.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPromptTextFieldBuilder();
getPlaceholdersFieldBuilder();
getLlmModelSettingsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
promptText_ = null;
if (promptTextBuilder_ != null) {
promptTextBuilder_.dispose();
promptTextBuilder_ = null;
}
if (placeholdersBuilder_ == null) {
placeholders_ = java.util.Collections.emptyList();
} else {
placeholders_ = null;
placeholdersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
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.GeneratorProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Generator_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Generator.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator build() {
com.google.cloud.dialogflow.cx.v3beta1.Generator result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Generator buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Generator result =
new com.google.cloud.dialogflow.cx.v3beta1.Generator(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.cx.v3beta1.Generator result) {
if (placeholdersBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
placeholders_ = java.util.Collections.unmodifiableList(placeholders_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.placeholders_ = placeholders_;
} else {
result.placeholders_ = placeholdersBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Generator result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.promptText_ = promptTextBuilder_ == null ? promptText_ : promptTextBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.llmModelSettings_ =
llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.Generator) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Generator) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Generator other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Generator.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasPromptText()) {
mergePromptText(other.getPromptText());
}
if (placeholdersBuilder_ == null) {
if (!other.placeholders_.isEmpty()) {
if (placeholders_.isEmpty()) {
placeholders_ = other.placeholders_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensurePlaceholdersIsMutable();
placeholders_.addAll(other.placeholders_);
}
onChanged();
}
} else {
if (!other.placeholders_.isEmpty()) {
if (placeholdersBuilder_.isEmpty()) {
placeholdersBuilder_.dispose();
placeholdersBuilder_ = null;
placeholders_ = other.placeholders_;
bitField0_ = (bitField0_ & ~0x00000008);
placeholdersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getPlaceholdersFieldBuilder()
: null;
} else {
placeholdersBuilder_.addAllMessages(other.placeholders_);
}
}
}
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getPromptTextFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 42:
{
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder m =
input.readMessage(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.parser(),
extensionRegistry);
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
placeholders_.add(m);
} else {
placeholdersBuilder_.addMessage(m);
}
break;
} // case 42
case 74:
{
input.readMessage(
getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 74
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_ = "";
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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;
}
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The unique identifier of the generator.
* Must be set for the
* [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
* method. [Generators.CreateGenerate][] populates the name automatically.
* Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
* ID>/generators/<Generator ID>`.
*
*
* string name = 1;
*
* @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 java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The human-readable name of the generator, unique within the
* agent. The prompt contains pre-defined parameters such as $conversation,
* $last-user-utterance, etc. populated by Dialogflow. It can also contain
* custom placeholders which will be resolved during fulfillment.
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.Phrase promptText_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Phrase,
com.google.cloud.dialogflow.cx.v3beta1.Phrase.Builder,
com.google.cloud.dialogflow.cx.v3beta1.PhraseOrBuilder>
promptTextBuilder_;
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the promptText field is set.
*/
public boolean hasPromptText() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The promptText.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Phrase getPromptText() {
if (promptTextBuilder_ == null) {
return promptText_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Phrase.getDefaultInstance()
: promptText_;
} else {
return promptTextBuilder_.getMessage();
}
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setPromptText(com.google.cloud.dialogflow.cx.v3beta1.Phrase value) {
if (promptTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
promptText_ = value;
} else {
promptTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setPromptText(
com.google.cloud.dialogflow.cx.v3beta1.Phrase.Builder builderForValue) {
if (promptTextBuilder_ == null) {
promptText_ = builderForValue.build();
} else {
promptTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergePromptText(com.google.cloud.dialogflow.cx.v3beta1.Phrase value) {
if (promptTextBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& promptText_ != null
&& promptText_ != com.google.cloud.dialogflow.cx.v3beta1.Phrase.getDefaultInstance()) {
getPromptTextBuilder().mergeFrom(value);
} else {
promptText_ = value;
}
} else {
promptTextBuilder_.mergeFrom(value);
}
if (promptText_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearPromptText() {
bitField0_ = (bitField0_ & ~0x00000004);
promptText_ = null;
if (promptTextBuilder_ != null) {
promptTextBuilder_.dispose();
promptTextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Phrase.Builder getPromptTextBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPromptTextFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.PhraseOrBuilder getPromptTextOrBuilder() {
if (promptTextBuilder_ != null) {
return promptTextBuilder_.getMessageOrBuilder();
} else {
return promptText_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Phrase.getDefaultInstance()
: promptText_;
}
}
/**
*
*
*
* Required. Prompt for the LLM model.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Phrase,
com.google.cloud.dialogflow.cx.v3beta1.Phrase.Builder,
com.google.cloud.dialogflow.cx.v3beta1.PhraseOrBuilder>
getPromptTextFieldBuilder() {
if (promptTextBuilder_ == null) {
promptTextBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Phrase,
com.google.cloud.dialogflow.cx.v3beta1.Phrase.Builder,
com.google.cloud.dialogflow.cx.v3beta1.PhraseOrBuilder>(
getPromptText(), getParentForChildren(), isClean());
promptText_ = null;
}
return promptTextBuilder_;
}
private java.util.List
placeholders_ = java.util.Collections.emptyList();
private void ensurePlaceholdersIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
placeholders_ =
new java.util.ArrayList(
placeholders_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder>
placeholdersBuilder_;
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getPlaceholdersList() {
if (placeholdersBuilder_ == null) {
return java.util.Collections.unmodifiableList(placeholders_);
} else {
return placeholdersBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getPlaceholdersCount() {
if (placeholdersBuilder_ == null) {
return placeholders_.size();
} else {
return placeholdersBuilder_.getCount();
}
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder getPlaceholders(int index) {
if (placeholdersBuilder_ == null) {
return placeholders_.get(index);
} else {
return placeholdersBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setPlaceholders(
int index, com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder value) {
if (placeholdersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePlaceholdersIsMutable();
placeholders_.set(index, value);
onChanged();
} else {
placeholdersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setPlaceholders(
int index,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder builderForValue) {
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
placeholders_.set(index, builderForValue.build());
onChanged();
} else {
placeholdersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addPlaceholders(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder value) {
if (placeholdersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePlaceholdersIsMutable();
placeholders_.add(value);
onChanged();
} else {
placeholdersBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addPlaceholders(
int index, com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder value) {
if (placeholdersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePlaceholdersIsMutable();
placeholders_.add(index, value);
onChanged();
} else {
placeholdersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addPlaceholders(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder builderForValue) {
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
placeholders_.add(builderForValue.build());
onChanged();
} else {
placeholdersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addPlaceholders(
int index,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder builderForValue) {
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
placeholders_.add(index, builderForValue.build());
onChanged();
} else {
placeholdersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllPlaceholders(
java.lang.Iterable extends com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder>
values) {
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, placeholders_);
onChanged();
} else {
placeholdersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearPlaceholders() {
if (placeholdersBuilder_ == null) {
placeholders_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
placeholdersBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removePlaceholders(int index) {
if (placeholdersBuilder_ == null) {
ensurePlaceholdersIsMutable();
placeholders_.remove(index);
onChanged();
} else {
placeholdersBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder
getPlaceholdersBuilder(int index) {
return getPlaceholdersFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder
getPlaceholdersOrBuilder(int index) {
if (placeholdersBuilder_ == null) {
return placeholders_.get(index);
} else {
return placeholdersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder>
getPlaceholdersOrBuilderList() {
if (placeholdersBuilder_ != null) {
return placeholdersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(placeholders_);
}
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder
addPlaceholdersBuilder() {
return getPlaceholdersFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.getDefaultInstance());
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder
addPlaceholdersBuilder(int index) {
return getPlaceholdersFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.getDefaultInstance());
}
/**
*
*
*
* Optional. List of custom placeholders in the prompt text.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getPlaceholdersBuilderList() {
return getPlaceholdersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder>
getPlaceholdersFieldBuilder() {
if (placeholdersBuilder_ == null) {
placeholdersBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder>(
placeholders_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
placeholders_ = null;
}
return placeholdersBuilder_;
}
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_;
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*
* @return Whether the llmModelSettings field is set.
*/
public boolean hasLlmModelSettings() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*
* @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();
}
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
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_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
public Builder setLlmModelSettings(
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) {
if (llmModelSettingsBuilder_ == null) {
llmModelSettings_ = builderForValue.build();
} else {
llmModelSettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
public Builder mergeLlmModelSettings(
com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) {
if (llmModelSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 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_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
public Builder clearLlmModelSettings() {
bitField0_ = (bitField0_ & ~0x00000010);
llmModelSettings_ = null;
if (llmModelSettingsBuilder_ != null) {
llmModelSettingsBuilder_.dispose();
llmModelSettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder
getLlmModelSettingsBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getLlmModelSettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
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_;
}
}
/**
*
*
*
* The LLM model settings.
*
*
* .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
*/
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.Generator)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Generator)
private static final com.google.cloud.dialogflow.cx.v3beta1.Generator DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Generator();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Generator getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Generator 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.Generator getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}