com.google.cloud.dialogflow.cx.v3beta1.Tool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
Show all versions of proto-google-cloud-dialogflow-cx-v3beta1 Show documentation
PROTO library for proto-google-cloud-dialogflow-cx-v3beta1
The newest version!
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3beta1/tool.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.cx.v3beta1;
/**
*
*
*
* A tool provides a list of actions which are available to the
* [Playbook][google.cloud.dialogflow.cx.v3beta1.Playbook] to attain its goal. A
* Tool consists of a description of the tool's usage and a specification of the
* tool which contains the schema and authentication information.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool}
*/
public final class Tool extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool)
ToolOrBuilder {
private static final long serialVersionUID = 0L;
// Use Tool.newBuilder() to construct.
private Tool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Tool() {
name_ = "";
displayName_ = "";
description_ = "";
toolType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Tool();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder.class);
}
/**
*
*
*
* Represents the type of the tool.
*
*
* Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Tool.ToolType}
*/
public enum ToolType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default value. This value is unused.
*
*
* TOOL_TYPE_UNSPECIFIED = 0;
*/
TOOL_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Customer provided tool.
*
*
* CUSTOMIZED_TOOL = 1;
*/
CUSTOMIZED_TOOL(1),
/**
*
*
*
* First party built-in tool created by Dialogflow which cannot be modified.
*
*
* BUILTIN_TOOL = 2;
*/
BUILTIN_TOOL(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default value. This value is unused.
*
*
* TOOL_TYPE_UNSPECIFIED = 0;
*/
public static final int TOOL_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Customer provided tool.
*
*
* CUSTOMIZED_TOOL = 1;
*/
public static final int CUSTOMIZED_TOOL_VALUE = 1;
/**
*
*
*
* First party built-in tool created by Dialogflow which cannot be modified.
*
*
* BUILTIN_TOOL = 2;
*/
public static final int BUILTIN_TOOL_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ToolType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ToolType forNumber(int value) {
switch (value) {
case 0:
return TOOL_TYPE_UNSPECIFIED;
case 1:
return CUSTOMIZED_TOOL;
case 2:
return BUILTIN_TOOL;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ToolType findValueByNumber(int number) {
return ToolType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.getDescriptor().getEnumTypes().get(0);
}
private static final ToolType[] VALUES = values();
public static ToolType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ToolType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ToolType)
}
public interface OpenApiToolOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the textSchema field is set.
*/
boolean hasTextSchema();
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The textSchema.
*/
java.lang.String getTextSchema();
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for textSchema.
*/
com.google.protobuf.ByteString getTextSchemaBytes();
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the authentication field is set.
*/
boolean hasAuthentication();
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The authentication.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication();
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder
getAuthenticationOrBuilder();
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the tlsConfig field is set.
*/
boolean hasTlsConfig();
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The tlsConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig();
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder();
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the serviceDirectoryConfig field is set.
*/
boolean hasServiceDirectoryConfig();
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceDirectoryConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig getServiceDirectoryConfig();
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder
getServiceDirectoryConfigOrBuilder();
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.SchemaCase getSchemaCase();
}
/**
*
*
*
* An OpenAPI tool is a way to provide the Tool specifications in the Open API
* schema format.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool}
*/
public static final class OpenApiTool extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool)
OpenApiToolOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpenApiTool.newBuilder() to construct.
private OpenApiTool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpenApiTool() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OpenApiTool();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder.class);
}
private int bitField0_;
private int schemaCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object schema_;
public enum SchemaCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TEXT_SCHEMA(1),
SCHEMA_NOT_SET(0);
private final int value;
private SchemaCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SchemaCase valueOf(int value) {
return forNumber(value);
}
public static SchemaCase forNumber(int value) {
switch (value) {
case 1:
return TEXT_SCHEMA;
case 0:
return SCHEMA_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public SchemaCase getSchemaCase() {
return SchemaCase.forNumber(schemaCase_);
}
public static final int TEXT_SCHEMA_FIELD_NUMBER = 1;
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the textSchema field is set.
*/
public boolean hasTextSchema() {
return schemaCase_ == 1;
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The textSchema.
*/
public java.lang.String getTextSchema() {
java.lang.Object ref = "";
if (schemaCase_ == 1) {
ref = schema_;
}
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();
if (schemaCase_ == 1) {
schema_ = s;
}
return s;
}
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for textSchema.
*/
public com.google.protobuf.ByteString getTextSchemaBytes() {
java.lang.Object ref = "";
if (schemaCase_ == 1) {
ref = schema_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (schemaCase_ == 1) {
schema_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTHENTICATION_FIELD_NUMBER = 2;
private com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication_;
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the authentication field is set.
*/
@java.lang.Override
public boolean hasAuthentication() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The authentication.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication() {
return authentication_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance()
: authentication_;
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder
getAuthenticationOrBuilder() {
return authentication_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance()
: authentication_;
}
public static final int TLS_CONFIG_FIELD_NUMBER = 3;
private com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tlsConfig_;
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the tlsConfig field is set.
*/
@java.lang.Override
public boolean hasTlsConfig() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The tlsConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig() {
return tlsConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()
: tlsConfig_;
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder() {
return tlsConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()
: tlsConfig_;
}
public static final int SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER = 4;
private com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
serviceDirectoryConfig_;
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the serviceDirectoryConfig field is set.
*/
@java.lang.Override
public boolean hasServiceDirectoryConfig() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceDirectoryConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
getServiceDirectoryConfig() {
return serviceDirectoryConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.getDefaultInstance()
: serviceDirectoryConfig_;
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder
getServiceDirectoryConfigOrBuilder() {
return serviceDirectoryConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.getDefaultInstance()
: serviceDirectoryConfig_;
}
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 (schemaCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getAuthentication());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getTlsConfig());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(4, getServiceDirectoryConfig());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (schemaCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAuthentication());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTlsConfig());
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, getServiceDirectoryConfig());
}
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.Tool.OpenApiTool)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) obj;
if (hasAuthentication() != other.hasAuthentication()) return false;
if (hasAuthentication()) {
if (!getAuthentication().equals(other.getAuthentication())) return false;
}
if (hasTlsConfig() != other.hasTlsConfig()) return false;
if (hasTlsConfig()) {
if (!getTlsConfig().equals(other.getTlsConfig())) return false;
}
if (hasServiceDirectoryConfig() != other.hasServiceDirectoryConfig()) return false;
if (hasServiceDirectoryConfig()) {
if (!getServiceDirectoryConfig().equals(other.getServiceDirectoryConfig())) return false;
}
if (!getSchemaCase().equals(other.getSchemaCase())) return false;
switch (schemaCase_) {
case 1:
if (!getTextSchema().equals(other.getTextSchema())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasAuthentication()) {
hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER;
hash = (53 * hash) + getAuthentication().hashCode();
}
if (hasTlsConfig()) {
hash = (37 * hash) + TLS_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getTlsConfig().hashCode();
}
if (hasServiceDirectoryConfig()) {
hash = (37 * hash) + SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getServiceDirectoryConfig().hashCode();
}
switch (schemaCase_) {
case 1:
hash = (37 * hash) + TEXT_SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getTextSchema().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool 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.Tool.OpenApiTool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool 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.Tool.OpenApiTool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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.Tool.OpenApiTool 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;
}
/**
*
*
*
* An OpenAPI tool is a way to provide the Tool specifications in the Open API
* schema format.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool)
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAuthenticationFieldBuilder();
getTlsConfigFieldBuilder();
getServiceDirectoryConfigFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
authentication_ = null;
if (authenticationBuilder_ != null) {
authenticationBuilder_.dispose();
authenticationBuilder_ = null;
}
tlsConfig_ = null;
if (tlsConfigBuilder_ != null) {
tlsConfigBuilder_.dispose();
tlsConfigBuilder_ = null;
}
serviceDirectoryConfig_ = null;
if (serviceDirectoryConfigBuilder_ != null) {
serviceDirectoryConfigBuilder_.dispose();
serviceDirectoryConfigBuilder_ = null;
}
schemaCase_ = 0;
schema_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.authentication_ =
authenticationBuilder_ == null ? authentication_ : authenticationBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.tlsConfig_ = tlsConfigBuilder_ == null ? tlsConfig_ : tlsConfigBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.serviceDirectoryConfig_ =
serviceDirectoryConfigBuilder_ == null
? serviceDirectoryConfig_
: serviceDirectoryConfigBuilder_.build();
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result) {
result.schemaCase_ = schemaCase_;
result.schema_ = this.schema_;
}
@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.Tool.OpenApiTool) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance())
return this;
if (other.hasAuthentication()) {
mergeAuthentication(other.getAuthentication());
}
if (other.hasTlsConfig()) {
mergeTlsConfig(other.getTlsConfig());
}
if (other.hasServiceDirectoryConfig()) {
mergeServiceDirectoryConfig(other.getServiceDirectoryConfig());
}
switch (other.getSchemaCase()) {
case TEXT_SCHEMA:
{
schemaCase_ = 1;
schema_ = other.schema_;
onChanged();
break;
}
case SCHEMA_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
schemaCase_ = 1;
schema_ = s;
break;
} // case 10
case 18:
{
input.readMessage(
getAuthenticationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getTlsConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(
getServiceDirectoryConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
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 schemaCase_ = 0;
private java.lang.Object schema_;
public SchemaCase getSchemaCase() {
return SchemaCase.forNumber(schemaCase_);
}
public Builder clearSchema() {
schemaCase_ = 0;
schema_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the textSchema field is set.
*/
@java.lang.Override
public boolean hasTextSchema() {
return schemaCase_ == 1;
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The textSchema.
*/
@java.lang.Override
public java.lang.String getTextSchema() {
java.lang.Object ref = "";
if (schemaCase_ == 1) {
ref = schema_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (schemaCase_ == 1) {
schema_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for textSchema.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTextSchemaBytes() {
java.lang.Object ref = "";
if (schemaCase_ == 1) {
ref = schema_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (schemaCase_ == 1) {
schema_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The textSchema to set.
* @return This builder for chaining.
*/
public Builder setTextSchema(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
schemaCase_ = 1;
schema_ = value;
onChanged();
return this;
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTextSchema() {
if (schemaCase_ == 1) {
schemaCase_ = 0;
schema_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Required. The OpenAPI schema specified as a text.
*
*
* string text_schema = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for textSchema to set.
* @return This builder for chaining.
*/
public Builder setTextSchemaBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
schemaCase_ = 1;
schema_ = value;
onChanged();
return this;
}
private com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder>
authenticationBuilder_;
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the authentication field is set.
*/
public boolean hasAuthentication() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The authentication.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication() {
if (authenticationBuilder_ == null) {
return authentication_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance()
: authentication_;
} else {
return authenticationBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAuthentication(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication value) {
if (authenticationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authentication_ = value;
} else {
authenticationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAuthentication(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder builderForValue) {
if (authenticationBuilder_ == null) {
authentication_ = builderForValue.build();
} else {
authenticationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeAuthentication(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication value) {
if (authenticationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& authentication_ != null
&& authentication_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.getDefaultInstance()) {
getAuthenticationBuilder().mergeFrom(value);
} else {
authentication_ = value;
}
} else {
authenticationBuilder_.mergeFrom(value);
}
if (authentication_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearAuthentication() {
bitField0_ = (bitField0_ & ~0x00000002);
authentication_ = null;
if (authenticationBuilder_ != null) {
authenticationBuilder_.dispose();
authenticationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder
getAuthenticationBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getAuthenticationFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder
getAuthenticationOrBuilder() {
if (authenticationBuilder_ != null) {
return authenticationBuilder_.getMessageOrBuilder();
} else {
return authentication_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance()
: authentication_;
}
}
/**
*
*
*
* Optional. Authentication information required by the API.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder>
getAuthenticationFieldBuilder() {
if (authenticationBuilder_ == null) {
authenticationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder>(
getAuthentication(), getParentForChildren(), isClean());
authentication_ = null;
}
return authenticationBuilder_;
}
private com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tlsConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder>
tlsConfigBuilder_;
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the tlsConfig field is set.
*/
public boolean hasTlsConfig() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The tlsConfig.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig() {
if (tlsConfigBuilder_ == null) {
return tlsConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()
: tlsConfig_;
} else {
return tlsConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTlsConfig(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig value) {
if (tlsConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tlsConfig_ = value;
} else {
tlsConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTlsConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder builderForValue) {
if (tlsConfigBuilder_ == null) {
tlsConfig_ = builderForValue.build();
} else {
tlsConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeTlsConfig(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig value) {
if (tlsConfigBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& tlsConfig_ != null
&& tlsConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()) {
getTlsConfigBuilder().mergeFrom(value);
} else {
tlsConfig_ = value;
}
} else {
tlsConfigBuilder_.mergeFrom(value);
}
if (tlsConfig_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearTlsConfig() {
bitField0_ = (bitField0_ & ~0x00000004);
tlsConfig_ = null;
if (tlsConfigBuilder_ != null) {
tlsConfigBuilder_.dispose();
tlsConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder getTlsConfigBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTlsConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder
getTlsConfigOrBuilder() {
if (tlsConfigBuilder_ != null) {
return tlsConfigBuilder_.getMessageOrBuilder();
} else {
return tlsConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()
: tlsConfig_;
}
}
/**
*
*
*
* Optional. TLS configuration for the HTTPS verification.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder>
getTlsConfigFieldBuilder() {
if (tlsConfigBuilder_ == null) {
tlsConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder>(
getTlsConfig(), getParentForChildren(), isClean());
tlsConfig_ = null;
}
return tlsConfigBuilder_;
}
private com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
serviceDirectoryConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder>
serviceDirectoryConfigBuilder_;
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the serviceDirectoryConfig field is set.
*/
public boolean hasServiceDirectoryConfig() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceDirectoryConfig.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
getServiceDirectoryConfig() {
if (serviceDirectoryConfigBuilder_ == null) {
return serviceDirectoryConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
.getDefaultInstance()
: serviceDirectoryConfig_;
} else {
return serviceDirectoryConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setServiceDirectoryConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig value) {
if (serviceDirectoryConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
serviceDirectoryConfig_ = value;
} else {
serviceDirectoryConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setServiceDirectoryConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder
builderForValue) {
if (serviceDirectoryConfigBuilder_ == null) {
serviceDirectoryConfig_ = builderForValue.build();
} else {
serviceDirectoryConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeServiceDirectoryConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig value) {
if (serviceDirectoryConfigBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& serviceDirectoryConfig_ != null
&& serviceDirectoryConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
.getDefaultInstance()) {
getServiceDirectoryConfigBuilder().mergeFrom(value);
} else {
serviceDirectoryConfig_ = value;
}
} else {
serviceDirectoryConfigBuilder_.mergeFrom(value);
}
if (serviceDirectoryConfig_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearServiceDirectoryConfig() {
bitField0_ = (bitField0_ & ~0x00000008);
serviceDirectoryConfig_ = null;
if (serviceDirectoryConfigBuilder_ != null) {
serviceDirectoryConfigBuilder_.dispose();
serviceDirectoryConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder
getServiceDirectoryConfigBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getServiceDirectoryConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder
getServiceDirectoryConfigOrBuilder() {
if (serviceDirectoryConfigBuilder_ != null) {
return serviceDirectoryConfigBuilder_.getMessageOrBuilder();
} else {
return serviceDirectoryConfig_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
.getDefaultInstance()
: serviceDirectoryConfig_;
}
}
/**
*
*
*
* Optional. Service Directory configuration.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig service_directory_config = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder>
getServiceDirectoryConfigFieldBuilder() {
if (serviceDirectoryConfigBuilder_ == null) {
serviceDirectoryConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder>(
getServiceDirectoryConfig(), getParentForChildren(), isClean());
serviceDirectoryConfig_ = null;
}
return serviceDirectoryConfigBuilder_;
}
@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.Tool.OpenApiTool)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpenApiTool 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.Tool.OpenApiTool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataStoreToolOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List
getDataStoreConnectionsList();
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections(int index);
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getDataStoreConnectionsCount();
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>
getDataStoreConnectionsOrBuilderList();
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder
getDataStoreConnectionsOrBuilder(int index);
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the fallbackPrompt field is set.
*/
boolean hasFallbackPrompt();
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The fallbackPrompt.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt getFallbackPrompt();
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder
getFallbackPromptOrBuilder();
}
/**
*
*
*
* A DataStoreTool is a way to provide specifications needed to search a
* list of data stores.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool}
*/
public static final class DataStoreTool extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool)
DataStoreToolOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataStoreTool.newBuilder() to construct.
private DataStoreTool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataStoreTool() {
dataStoreConnections_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new DataStoreTool();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder.class);
}
public interface FallbackPromptOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt)
com.google.protobuf.MessageOrBuilder {}
/**
*
*
*
* A FallbackPrompt is a way to provide specifications for the Data Store
* fallback prompt when generating responses.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt}
*/
public static final class FallbackPrompt extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt)
FallbackPromptOrBuilder {
private static final long serialVersionUID = 0L;
// Use FallbackPrompt.newBuilder() to construct.
private FallbackPrompt(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FallbackPrompt() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new FallbackPrompt();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder
.class);
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.Tool.DataStoreTool.FallbackPrompt)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) obj;
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 = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt
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.Tool.DataStoreTool.FallbackPrompt 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;
}
/**
*
*
*
* A FallbackPrompt is a way to provide specifications for the Data Store
* fallback prompt when generating responses.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt)
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt(this);
onBuilt();
return result;
}
@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.Tool.DataStoreTool.FallbackPrompt) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()) return this;
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;
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;
}
@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.Tool.DataStoreTool.FallbackPrompt)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FallbackPrompt 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.Tool.DataStoreTool.FallbackPrompt
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int DATA_STORE_CONNECTIONS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
dataStoreConnections_;
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getDataStoreConnectionsList() {
return dataStoreConnections_;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>
getDataStoreConnectionsOrBuilderList() {
return dataStoreConnections_;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getDataStoreConnectionsCount() {
return dataStoreConnections_.size();
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections(
int index) {
return dataStoreConnections_.get(index);
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder
getDataStoreConnectionsOrBuilder(int index) {
return dataStoreConnections_.get(index);
}
public static final int FALLBACK_PROMPT_FIELD_NUMBER = 3;
private com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
fallbackPrompt_;
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the fallbackPrompt field is set.
*/
@java.lang.Override
public boolean hasFallbackPrompt() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The fallbackPrompt.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
getFallbackPrompt() {
return fallbackPrompt_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()
: fallbackPrompt_;
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder
getFallbackPromptOrBuilder() {
return fallbackPrompt_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()
: fallbackPrompt_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < dataStoreConnections_.size(); i++) {
output.writeMessage(1, dataStoreConnections_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getFallbackPrompt());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < dataStoreConnections_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, dataStoreConnections_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFallbackPrompt());
}
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.Tool.DataStoreTool)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) obj;
if (!getDataStoreConnectionsList().equals(other.getDataStoreConnectionsList())) return false;
if (hasFallbackPrompt() != other.hasFallbackPrompt()) return false;
if (hasFallbackPrompt()) {
if (!getFallbackPrompt().equals(other.getFallbackPrompt())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDataStoreConnectionsCount() > 0) {
hash = (37 * hash) + DATA_STORE_CONNECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getDataStoreConnectionsList().hashCode();
}
if (hasFallbackPrompt()) {
hash = (37 * hash) + FALLBACK_PROMPT_FIELD_NUMBER;
hash = (53 * hash) + getFallbackPrompt().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool 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.Tool.DataStoreTool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool 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.Tool.DataStoreTool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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.Tool.DataStoreTool 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;
}
/**
*
*
*
* A DataStoreTool is a way to provide specifications needed to search a
* list of data stores.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool)
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDataStoreConnectionsFieldBuilder();
getFallbackPromptFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (dataStoreConnectionsBuilder_ == null) {
dataStoreConnections_ = java.util.Collections.emptyList();
} else {
dataStoreConnections_ = null;
dataStoreConnectionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
fallbackPrompt_ = null;
if (fallbackPromptBuilder_ != null) {
fallbackPromptBuilder_.dispose();
fallbackPromptBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result) {
if (dataStoreConnectionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
dataStoreConnections_ = java.util.Collections.unmodifiableList(dataStoreConnections_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.dataStoreConnections_ = dataStoreConnections_;
} else {
result.dataStoreConnections_ = dataStoreConnectionsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fallbackPrompt_ =
fallbackPromptBuilder_ == null ? fallbackPrompt_ : fallbackPromptBuilder_.build();
to_bitField0_ |= 0x00000001;
}
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.Tool.DataStoreTool) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance())
return this;
if (dataStoreConnectionsBuilder_ == null) {
if (!other.dataStoreConnections_.isEmpty()) {
if (dataStoreConnections_.isEmpty()) {
dataStoreConnections_ = other.dataStoreConnections_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.addAll(other.dataStoreConnections_);
}
onChanged();
}
} else {
if (!other.dataStoreConnections_.isEmpty()) {
if (dataStoreConnectionsBuilder_.isEmpty()) {
dataStoreConnectionsBuilder_.dispose();
dataStoreConnectionsBuilder_ = null;
dataStoreConnections_ = other.dataStoreConnections_;
bitField0_ = (bitField0_ & ~0x00000001);
dataStoreConnectionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getDataStoreConnectionsFieldBuilder()
: null;
} else {
dataStoreConnectionsBuilder_.addAllMessages(other.dataStoreConnections_);
}
}
}
if (other.hasFallbackPrompt()) {
mergeFallbackPrompt(other.getFallbackPrompt());
}
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:
{
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection m =
input.readMessage(
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.parser(),
extensionRegistry);
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.add(m);
} else {
dataStoreConnectionsBuilder_.addMessage(m);
}
break;
} // case 10
case 26:
{
input.readMessage(
getFallbackPromptFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
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.util.List
dataStoreConnections_ = java.util.Collections.emptyList();
private void ensureDataStoreConnectionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
dataStoreConnections_ =
new java.util.ArrayList(
dataStoreConnections_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>
dataStoreConnectionsBuilder_;
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getDataStoreConnectionsList() {
if (dataStoreConnectionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(dataStoreConnections_);
} else {
return dataStoreConnectionsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public int getDataStoreConnectionsCount() {
if (dataStoreConnectionsBuilder_ == null) {
return dataStoreConnections_.size();
} else {
return dataStoreConnectionsBuilder_.getCount();
}
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections(
int index) {
if (dataStoreConnectionsBuilder_ == null) {
return dataStoreConnections_.get(index);
} else {
return dataStoreConnectionsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setDataStoreConnections(
int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) {
if (dataStoreConnectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.set(index, value);
onChanged();
} else {
dataStoreConnectionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setDataStoreConnections(
int index,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) {
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.set(index, builderForValue.build());
onChanged();
} else {
dataStoreConnectionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addDataStoreConnections(
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) {
if (dataStoreConnectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.add(value);
onChanged();
} else {
dataStoreConnectionsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addDataStoreConnections(
int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) {
if (dataStoreConnectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.add(index, value);
onChanged();
} else {
dataStoreConnectionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addDataStoreConnections(
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) {
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.add(builderForValue.build());
onChanged();
} else {
dataStoreConnectionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addDataStoreConnections(
int index,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) {
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.add(index, builderForValue.build());
onChanged();
} else {
dataStoreConnectionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addAllDataStoreConnections(
java.lang.Iterable extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection>
values) {
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreConnections_);
onChanged();
} else {
dataStoreConnectionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearDataStoreConnections() {
if (dataStoreConnectionsBuilder_ == null) {
dataStoreConnections_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
dataStoreConnectionsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder removeDataStoreConnections(int index) {
if (dataStoreConnectionsBuilder_ == null) {
ensureDataStoreConnectionsIsMutable();
dataStoreConnections_.remove(index);
onChanged();
} else {
dataStoreConnectionsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder
getDataStoreConnectionsBuilder(int index) {
return getDataStoreConnectionsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder
getDataStoreConnectionsOrBuilder(int index) {
if (dataStoreConnectionsBuilder_ == null) {
return dataStoreConnections_.get(index);
} else {
return dataStoreConnectionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>
getDataStoreConnectionsOrBuilderList() {
if (dataStoreConnectionsBuilder_ != null) {
return dataStoreConnectionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(dataStoreConnections_);
}
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder
addDataStoreConnectionsBuilder() {
return getDataStoreConnectionsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance());
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder
addDataStoreConnectionsBuilder(int index) {
return getDataStoreConnectionsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance());
}
/**
*
*
*
* Required. List of data stores to search.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getDataStoreConnectionsBuilderList() {
return getDataStoreConnectionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>
getDataStoreConnectionsFieldBuilder() {
if (dataStoreConnectionsBuilder_ == null) {
dataStoreConnectionsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder,
com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>(
dataStoreConnections_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
dataStoreConnections_ = null;
}
return dataStoreConnectionsBuilder_;
}
private com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
fallbackPrompt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder>
fallbackPromptBuilder_;
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the fallbackPrompt field is set.
*/
public boolean hasFallbackPrompt() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The fallbackPrompt.
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
getFallbackPrompt() {
if (fallbackPromptBuilder_ == null) {
return fallbackPrompt_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()
: fallbackPrompt_;
} else {
return fallbackPromptBuilder_.getMessage();
}
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setFallbackPrompt(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt value) {
if (fallbackPromptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fallbackPrompt_ = value;
} else {
fallbackPromptBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setFallbackPrompt(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder
builderForValue) {
if (fallbackPromptBuilder_ == null) {
fallbackPrompt_ = builderForValue.build();
} else {
fallbackPromptBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeFallbackPrompt(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt value) {
if (fallbackPromptBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& fallbackPrompt_ != null
&& fallbackPrompt_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()) {
getFallbackPromptBuilder().mergeFrom(value);
} else {
fallbackPrompt_ = value;
}
} else {
fallbackPromptBuilder_.mergeFrom(value);
}
if (fallbackPrompt_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearFallbackPrompt() {
bitField0_ = (bitField0_ & ~0x00000002);
fallbackPrompt_ = null;
if (fallbackPromptBuilder_ != null) {
fallbackPromptBuilder_.dispose();
fallbackPromptBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder
getFallbackPromptBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getFallbackPromptFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder
getFallbackPromptOrBuilder() {
if (fallbackPromptBuilder_ != null) {
return fallbackPromptBuilder_.getMessageOrBuilder();
} else {
return fallbackPrompt_ == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt
.getDefaultInstance()
: fallbackPrompt_;
}
}
/**
*
*
*
* Required. Fallback prompt configurations to use.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder>
getFallbackPromptFieldBuilder() {
if (fallbackPromptBuilder_ == null) {
fallbackPromptBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool
.FallbackPromptOrBuilder>(
getFallbackPrompt(), getParentForChildren(), isClean());
fallbackPrompt_ = null;
}
return fallbackPromptBuilder_;
}
@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.Tool.DataStoreTool)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataStoreTool 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.Tool.DataStoreTool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExtensionToolOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
}
/**
*
*
*
* An ExtensionTool is a way to use Vertex Extensions as a tool.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool}
*/
public static final class ExtensionTool extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool)
ExtensionToolOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExtensionTool.newBuilder() to construct.
private ExtensionTool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExtensionTool() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ExtensionTool();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, 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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.Tool.ExtensionTool)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) obj;
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) + 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.Tool.ExtensionTool parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool 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.Tool.ExtensionTool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool 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.Tool.ExtensionTool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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.Tool.ExtensionTool 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;
}
/**
*
*
*
* An ExtensionTool is a way to use Vertex Extensions as a tool.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool)
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 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.Tool.ExtensionTool) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
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_ = "";
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The full name of the referenced vertex extension.
* Formats:
* `projects/{project}/locations/{location}/extensions/{extension}`
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
@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.Tool.ExtensionTool)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExtensionTool 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.Tool.ExtensionTool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FunctionToolOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the inputSchema field is set.
*/
boolean hasInputSchema();
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The inputSchema.
*/
com.google.protobuf.Struct getInputSchema();
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder();
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the outputSchema field is set.
*/
boolean hasOutputSchema();
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The outputSchema.
*/
com.google.protobuf.Struct getOutputSchema();
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder();
}
/**
*
*
*
* A Function tool describes the functions to be invoked on the client side.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool}
*/
public static final class FunctionTool extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool)
FunctionToolOrBuilder {
private static final long serialVersionUID = 0L;
// Use FunctionTool.newBuilder() to construct.
private FunctionTool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FunctionTool() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new FunctionTool();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder.class);
}
private int bitField0_;
public static final int INPUT_SCHEMA_FIELD_NUMBER = 1;
private com.google.protobuf.Struct inputSchema_;
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the inputSchema field is set.
*/
@java.lang.Override
public boolean hasInputSchema() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The inputSchema.
*/
@java.lang.Override
public com.google.protobuf.Struct getInputSchema() {
return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() {
return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_;
}
public static final int OUTPUT_SCHEMA_FIELD_NUMBER = 2;
private com.google.protobuf.Struct outputSchema_;
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the outputSchema field is set.
*/
@java.lang.Override
public boolean hasOutputSchema() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The outputSchema.
*/
@java.lang.Override
public com.google.protobuf.Struct getOutputSchema() {
return outputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: outputSchema_;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() {
return outputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: outputSchema_;
}
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, getInputSchema());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getOutputSchema());
}
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, getInputSchema());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputSchema());
}
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.Tool.FunctionTool)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) obj;
if (hasInputSchema() != other.hasInputSchema()) return false;
if (hasInputSchema()) {
if (!getInputSchema().equals(other.getInputSchema())) return false;
}
if (hasOutputSchema() != other.hasOutputSchema()) return false;
if (hasOutputSchema()) {
if (!getOutputSchema().equals(other.getOutputSchema())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasInputSchema()) {
hash = (37 * hash) + INPUT_SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getInputSchema().hashCode();
}
if (hasOutputSchema()) {
hash = (37 * hash) + OUTPUT_SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getOutputSchema().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool 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.Tool.FunctionTool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool 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.Tool.FunctionTool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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.Tool.FunctionTool 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;
}
/**
*
*
*
* A Function tool describes the functions to be invoked on the client side.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool)
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getInputSchemaFieldBuilder();
getOutputSchemaFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
inputSchema_ = null;
if (inputSchemaBuilder_ != null) {
inputSchemaBuilder_.dispose();
inputSchemaBuilder_ = null;
}
outputSchema_ = null;
if (outputSchemaBuilder_ != null) {
outputSchemaBuilder_.dispose();
outputSchemaBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.inputSchema_ =
inputSchemaBuilder_ == null ? inputSchema_ : inputSchemaBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.outputSchema_ =
outputSchemaBuilder_ == null ? outputSchema_ : outputSchemaBuilder_.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.Tool.FunctionTool) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance())
return this;
if (other.hasInputSchema()) {
mergeInputSchema(other.getInputSchema());
}
if (other.hasOutputSchema()) {
mergeOutputSchema(other.getOutputSchema());
}
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(getInputSchemaFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getOutputSchemaFieldBuilder().getBuilder(), extensionRegistry);
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 com.google.protobuf.Struct inputSchema_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
inputSchemaBuilder_;
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the inputSchema field is set.
*/
public boolean hasInputSchema() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The inputSchema.
*/
public com.google.protobuf.Struct getInputSchema() {
if (inputSchemaBuilder_ == null) {
return inputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: inputSchema_;
} else {
return inputSchemaBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setInputSchema(com.google.protobuf.Struct value) {
if (inputSchemaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputSchema_ = value;
} else {
inputSchemaBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setInputSchema(com.google.protobuf.Struct.Builder builderForValue) {
if (inputSchemaBuilder_ == null) {
inputSchema_ = builderForValue.build();
} else {
inputSchemaBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeInputSchema(com.google.protobuf.Struct value) {
if (inputSchemaBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& inputSchema_ != null
&& inputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) {
getInputSchemaBuilder().mergeFrom(value);
} else {
inputSchema_ = value;
}
} else {
inputSchemaBuilder_.mergeFrom(value);
}
if (inputSchema_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearInputSchema() {
bitField0_ = (bitField0_ & ~0x00000001);
inputSchema_ = null;
if (inputSchemaBuilder_ != null) {
inputSchemaBuilder_.dispose();
inputSchemaBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.Struct.Builder getInputSchemaBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getInputSchemaFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() {
if (inputSchemaBuilder_ != null) {
return inputSchemaBuilder_.getMessageOrBuilder();
} else {
return inputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: inputSchema_;
}
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
* the function. This input is a JSON object that contains the function's
* parameters as properties of the object.
*
*
* .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getInputSchemaFieldBuilder() {
if (inputSchemaBuilder_ == null) {
inputSchemaBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getInputSchema(), getParentForChildren(), isClean());
inputSchema_ = null;
}
return inputSchemaBuilder_;
}
private com.google.protobuf.Struct outputSchema_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
outputSchemaBuilder_;
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the outputSchema field is set.
*/
public boolean hasOutputSchema() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The outputSchema.
*/
public com.google.protobuf.Struct getOutputSchema() {
if (outputSchemaBuilder_ == null) {
return outputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: outputSchema_;
} else {
return outputSchemaBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setOutputSchema(com.google.protobuf.Struct value) {
if (outputSchemaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outputSchema_ = value;
} else {
outputSchemaBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setOutputSchema(com.google.protobuf.Struct.Builder builderForValue) {
if (outputSchemaBuilder_ == null) {
outputSchema_ = builderForValue.build();
} else {
outputSchemaBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeOutputSchema(com.google.protobuf.Struct value) {
if (outputSchemaBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& outputSchema_ != null
&& outputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) {
getOutputSchemaBuilder().mergeFrom(value);
} else {
outputSchema_ = value;
}
} else {
outputSchemaBuilder_.mergeFrom(value);
}
if (outputSchema_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearOutputSchema() {
bitField0_ = (bitField0_ & ~0x00000002);
outputSchema_ = null;
if (outputSchemaBuilder_ != null) {
outputSchemaBuilder_.dispose();
outputSchemaBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.Struct.Builder getOutputSchemaBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getOutputSchemaFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() {
if (outputSchemaBuilder_ != null) {
return outputSchemaBuilder_.getMessageOrBuilder();
} else {
return outputSchema_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: outputSchema_;
}
}
/**
*
*
*
* Optional. The JSON schema is encapsulated in a
* [google.protobuf.Struct][google.protobuf.Struct] to describe the output
* of the function. This output is a JSON object that contains the
* function's parameters as properties of the object.
*
*
* .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getOutputSchemaFieldBuilder() {
if (outputSchemaBuilder_ == null) {
outputSchemaBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getOutputSchema(), getParentForChildren(), isClean());
outputSchema_ = null;
}
return outputSchemaBuilder_;
}
@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.Tool.FunctionTool)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FunctionTool 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.Tool.FunctionTool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AuthenticationOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return Whether the apiKeyConfig field is set.
*/
boolean hasApiKeyConfig();
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return The apiKeyConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig getApiKeyConfig();
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder
getApiKeyConfigOrBuilder();
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return Whether the oauthConfig field is set.
*/
boolean hasOauthConfig();
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return The oauthConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig getOauthConfig();
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder
getOauthConfigOrBuilder();
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return Whether the serviceAgentAuthConfig field is set.
*/
boolean hasServiceAgentAuthConfig();
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return The serviceAgentAuthConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
getServiceAgentAuthConfig();
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfigOrBuilder
getServiceAgentAuthConfigOrBuilder();
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return Whether the bearerTokenConfig field is set.
*/
boolean hasBearerTokenConfig();
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return The bearerTokenConfig.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
getBearerTokenConfig();
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder
getBearerTokenConfigOrBuilder();
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.AuthConfigCase getAuthConfigCase();
}
/**
*
*
*
* Authentication information required for API calls
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication}
*/
public static final class Authentication extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication)
AuthenticationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Authentication.newBuilder() to construct.
private Authentication(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Authentication() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Authentication();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder.class);
}
/**
*
*
*
* The location of the API key in the request.
*
*
* Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation}
*/
public enum RequestLocation implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default value. This value is unused.
*
*
* REQUEST_LOCATION_UNSPECIFIED = 0;
*/
REQUEST_LOCATION_UNSPECIFIED(0),
/**
*
*
*
* Represents the key in http header.
*
*
* HEADER = 1;
*/
HEADER(1),
/**
*
*
*
* Represents the key in query string.
*
*
* QUERY_STRING = 2;
*/
QUERY_STRING(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default value. This value is unused.
*
*
* REQUEST_LOCATION_UNSPECIFIED = 0;
*/
public static final int REQUEST_LOCATION_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Represents the key in http header.
*
*
* HEADER = 1;
*/
public static final int HEADER_VALUE = 1;
/**
*
*
*
* Represents the key in query string.
*
*
* QUERY_STRING = 2;
*/
public static final int QUERY_STRING_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static RequestLocation valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static RequestLocation forNumber(int value) {
switch (value) {
case 0:
return REQUEST_LOCATION_UNSPECIFIED;
case 1:
return HEADER;
case 2:
return QUERY_STRING;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public RequestLocation findValueByNumber(int number) {
return RequestLocation.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final RequestLocation[] VALUES = values();
public static RequestLocation valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private RequestLocation(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation)
}
public interface ApiKeyConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The keyName.
*/
java.lang.String getKeyName();
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for keyName.
*/
com.google.protobuf.ByteString getKeyNameBytes();
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The apiKey.
*/
java.lang.String getApiKey();
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for apiKey.
*/
com.google.protobuf.ByteString getApiKeyBytes();
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for requestLocation.
*/
int getRequestLocationValue();
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requestLocation.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
getRequestLocation();
}
/**
*
*
*
* Config for authentication with API key.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig}
*/
public static final class ApiKeyConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
ApiKeyConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ApiKeyConfig.newBuilder() to construct.
private ApiKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ApiKeyConfig() {
keyName_ = "";
apiKey_ = "";
requestLocation_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ApiKeyConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder
.class);
}
public static final int KEY_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object keyName_ = "";
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The keyName.
*/
@java.lang.Override
public java.lang.String getKeyName() {
java.lang.Object ref = keyName_;
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();
keyName_ = s;
return s;
}
}
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for keyName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKeyNameBytes() {
java.lang.Object ref = keyName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
keyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int API_KEY_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object apiKey_ = "";
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The apiKey.
*/
@java.lang.Override
public java.lang.String getApiKey() {
java.lang.Object ref = apiKey_;
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();
apiKey_ = s;
return s;
}
}
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for apiKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString getApiKeyBytes() {
java.lang.Object ref = apiKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
apiKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUEST_LOCATION_FIELD_NUMBER = 3;
private int requestLocation_ = 0;
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for requestLocation.
*/
@java.lang.Override
public int getRequestLocationValue() {
return requestLocation_;
}
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requestLocation.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
getRequestLocation() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation.forNumber(
requestLocation_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
.UNRECOGNIZED
: result;
}
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(keyName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, apiKey_);
}
if (requestLocation_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
.REQUEST_LOCATION_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, requestLocation_);
}
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(keyName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, apiKey_);
}
if (requestLocation_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
.REQUEST_LOCATION_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, requestLocation_);
}
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.Tool.Authentication.ApiKeyConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) obj;
if (!getKeyName().equals(other.getKeyName())) return false;
if (!getApiKey().equals(other.getApiKey())) return false;
if (requestLocation_ != other.requestLocation_) 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) + KEY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getKeyName().hashCode();
hash = (37 * hash) + API_KEY_FIELD_NUMBER;
hash = (53 * hash) + getApiKey().hashCode();
hash = (37 * hash) + REQUEST_LOCATION_FIELD_NUMBER;
hash = (53 * hash) + requestLocation_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig
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.Tool.Authentication.ApiKeyConfig 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;
}
/**
*
*
*
* Config for authentication with API key.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
keyName_ = "";
apiKey_ = "";
requestLocation_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.keyName_ = keyName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.apiKey_ = apiKey_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.requestLocation_ = requestLocation_;
}
}
@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.Tool.Authentication.ApiKeyConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance()) return this;
if (!other.getKeyName().isEmpty()) {
keyName_ = other.keyName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getApiKey().isEmpty()) {
apiKey_ = other.apiKey_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.requestLocation_ != 0) {
setRequestLocationValue(other.getRequestLocationValue());
}
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:
{
keyName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
apiKey_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
requestLocation_ = input.readEnum();
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 keyName_ = "";
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The keyName.
*/
public java.lang.String getKeyName() {
java.lang.Object ref = keyName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for keyName.
*/
public com.google.protobuf.ByteString getKeyNameBytes() {
java.lang.Object ref = keyName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
keyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The keyName to set.
* @return This builder for chaining.
*/
public Builder setKeyName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
keyName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearKeyName() {
keyName_ = getDefaultInstance().getKeyName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The parameter name or the header name of the API key.
* E.g., If the API request is "https://example.com/act?X-Api-Key=<API
* KEY>", "X-Api-Key" would be the parameter name.
*
*
* string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for keyName to set.
* @return This builder for chaining.
*/
public Builder setKeyNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
keyName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object apiKey_ = "";
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The apiKey.
*/
public java.lang.String getApiKey() {
java.lang.Object ref = apiKey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
apiKey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for apiKey.
*/
public com.google.protobuf.ByteString getApiKeyBytes() {
java.lang.Object ref = apiKey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
apiKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The apiKey to set.
* @return This builder for chaining.
*/
public Builder setApiKey(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
apiKey_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearApiKey() {
apiKey_ = getDefaultInstance().getApiKey();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The API key.
*
*
* string api_key = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for apiKey to set.
* @return This builder for chaining.
*/
public Builder setApiKeyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
apiKey_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int requestLocation_ = 0;
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for requestLocation.
*/
@java.lang.Override
public int getRequestLocationValue() {
return requestLocation_;
}
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for requestLocation to set.
* @return This builder for chaining.
*/
public Builder setRequestLocationValue(int value) {
requestLocation_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requestLocation.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
getRequestLocation() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation.forNumber(
requestLocation_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The requestLocation to set.
* @return This builder for chaining.
*/
public Builder setRequestLocation(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
requestLocation_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. Key location in the request.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearRequestLocation() {
bitField0_ = (bitField0_ & ~0x00000004);
requestLocation_ = 0;
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.Tool.Authentication.ApiKeyConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ApiKeyConfig 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.Tool.Authentication.ApiKeyConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OAuthConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for oauthGrantType.
*/
int getOauthGrantTypeValue();
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The oauthGrantType.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
getOauthGrantType();
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
java.lang.String getClientId();
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
com.google.protobuf.ByteString getClientIdBytes();
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
java.lang.String getClientSecret();
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
com.google.protobuf.ByteString getClientSecretBytes();
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
java.lang.String getTokenEndpoint();
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
com.google.protobuf.ByteString getTokenEndpointBytes();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
java.util.List getScopesList();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
int getScopesCount();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
java.lang.String getScopes(int index);
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
com.google.protobuf.ByteString getScopesBytes(int index);
}
/**
*
*
*
* Config for authentication with OAuth.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig}
*/
public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
OAuthConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use OAuthConfig.newBuilder() to construct.
private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OAuthConfig() {
oauthGrantType_ = 0;
clientId_ = "";
clientSecret_ = "";
tokenEndpoint_ = "";
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OAuthConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder
.class);
}
/**
*
*
*
* OAuth grant types. Only [client credential
* grant](https://oauth.net/2/grant-types/client-credentials) is
* supported.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType}
*/
public enum OauthGrantType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default value. This value is unused.
*
*
* OAUTH_GRANT_TYPE_UNSPECIFIED = 0;
*/
OAUTH_GRANT_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Represents the [client credential
* flow](https://oauth.net/2/grant-types/client-credentials).
*
*
* CLIENT_CREDENTIAL = 1;
*/
CLIENT_CREDENTIAL(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default value. This value is unused.
*
*
* OAUTH_GRANT_TYPE_UNSPECIFIED = 0;
*/
public static final int OAUTH_GRANT_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Represents the [client credential
* flow](https://oauth.net/2/grant-types/client-credentials).
*
*
* CLIENT_CREDENTIAL = 1;
*/
public static final int CLIENT_CREDENTIAL_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OauthGrantType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static OauthGrantType forNumber(int value) {
switch (value) {
case 0:
return OAUTH_GRANT_TYPE_UNSPECIFIED;
case 1:
return CLIENT_CREDENTIAL;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public OauthGrantType findValueByNumber(int number) {
return OauthGrantType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final OauthGrantType[] VALUES = values();
public static OauthGrantType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private OauthGrantType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType)
}
public static final int OAUTH_GRANT_TYPE_FIELD_NUMBER = 1;
private int oauthGrantType_ = 0;
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for oauthGrantType.
*/
@java.lang.Override
public int getOauthGrantTypeValue() {
return oauthGrantType_;
}
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The oauthGrantType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
getOauthGrantType() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.OauthGrantType.forNumber(oauthGrantType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
.UNRECOGNIZED
: result;
}
public static final int CLIENT_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object clientId_ = "";
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
@java.lang.Override
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
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();
clientId_ = s;
return s;
}
}
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLIENT_SECRET_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object clientSecret_ = "";
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
@java.lang.Override
public java.lang.String getClientSecret() {
java.lang.Object ref = clientSecret_;
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();
clientSecret_ = s;
return s;
}
}
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
@java.lang.Override
public com.google.protobuf.ByteString getClientSecretBytes() {
java.lang.Object ref = clientSecret_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientSecret_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object tokenEndpoint_ = "";
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
@java.lang.Override
public java.lang.String getTokenEndpoint() {
java.lang.Object ref = tokenEndpoint_;
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();
tokenEndpoint_ = s;
return s;
}
}
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTokenEndpointBytes() {
java.lang.Object ref = tokenEndpoint_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
tokenEndpoint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCOPES_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList scopes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList getScopesList() {
return scopes_;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString getScopesBytes(int index) {
return scopes_.getByteString(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 (oauthGrantType_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
.OAUTH_GRANT_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, oauthGrantType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clientSecret_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tokenEndpoint_);
}
for (int i = 0; i < scopes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, scopes_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (oauthGrantType_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
.OAUTH_GRANT_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, oauthGrantType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clientSecret_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tokenEndpoint_);
}
{
int dataSize = 0;
for (int i = 0; i < scopes_.size(); i++) {
dataSize += computeStringSizeNoTag(scopes_.getRaw(i));
}
size += dataSize;
size += 1 * getScopesList().size();
}
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.Tool.Authentication.OAuthConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) obj;
if (oauthGrantType_ != other.oauthGrantType_) return false;
if (!getClientId().equals(other.getClientId())) return false;
if (!getClientSecret().equals(other.getClientSecret())) return false;
if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false;
if (!getScopesList().equals(other.getScopesList())) 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) + OAUTH_GRANT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + oauthGrantType_;
hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
hash = (53 * hash) + getClientId().hashCode();
hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER;
hash = (53 * hash) + getClientSecret().hashCode();
hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getTokenEndpoint().hashCode();
if (getScopesCount() > 0) {
hash = (37 * hash) + SCOPES_FIELD_NUMBER;
hash = (53 * hash) + getScopesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig
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.Tool.Authentication.OAuthConfig 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;
}
/**
*
*
*
* Config for authentication with OAuth.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
oauthGrantType_ = 0;
clientId_ = "";
clientSecret_ = "";
tokenEndpoint_ = "";
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.oauthGrantType_ = oauthGrantType_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.clientId_ = clientId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.clientSecret_ = clientSecret_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.tokenEndpoint_ = tokenEndpoint_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
scopes_.makeImmutable();
result.scopes_ = scopes_;
}
}
@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.Tool.Authentication.OAuthConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance()) return this;
if (other.oauthGrantType_ != 0) {
setOauthGrantTypeValue(other.getOauthGrantTypeValue());
}
if (!other.getClientId().isEmpty()) {
clientId_ = other.clientId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getClientSecret().isEmpty()) {
clientSecret_ = other.clientSecret_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getTokenEndpoint().isEmpty()) {
tokenEndpoint_ = other.tokenEndpoint_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.scopes_.isEmpty()) {
if (scopes_.isEmpty()) {
scopes_ = other.scopes_;
bitField0_ |= 0x00000010;
} else {
ensureScopesIsMutable();
scopes_.addAll(other.scopes_);
}
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 8:
{
oauthGrantType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
clientId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
clientSecret_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
tokenEndpoint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
java.lang.String s = input.readStringRequireUtf8();
ensureScopesIsMutable();
scopes_.add(s);
break;
} // case 42
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 int oauthGrantType_ = 0;
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for oauthGrantType.
*/
@java.lang.Override
public int getOauthGrantTypeValue() {
return oauthGrantType_;
}
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for oauthGrantType to set.
* @return This builder for chaining.
*/
public Builder setOauthGrantTypeValue(int value) {
oauthGrantType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The oauthGrantType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
getOauthGrantType() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.OauthGrantType.forNumber(oauthGrantType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.OauthGrantType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The oauthGrantType to set.
* @return This builder for chaining.
*/
public Builder setOauthGrantType(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
oauthGrantType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. OAuth grant types.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearOauthGrantType() {
bitField0_ = (bitField0_ & ~0x00000001);
oauthGrantType_ = 0;
onChanged();
return this;
}
private java.lang.Object clientId_ = "";
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientId.
*/
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientId.
*/
public com.google.protobuf.ByteString getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The clientId to set.
* @return This builder for chaining.
*/
public Builder setClientId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearClientId() {
clientId_ = getDefaultInstance().getClientId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The client ID from the OAuth provider.
*
*
* string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for clientId to set.
* @return This builder for chaining.
*/
public Builder setClientIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object clientSecret_ = "";
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The clientSecret.
*/
public java.lang.String getClientSecret() {
java.lang.Object ref = clientSecret_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientSecret_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for clientSecret.
*/
public com.google.protobuf.ByteString getClientSecretBytes() {
java.lang.Object ref = clientSecret_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
clientSecret_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The clientSecret to set.
* @return This builder for chaining.
*/
public Builder setClientSecret(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientSecret_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearClientSecret() {
clientSecret_ = getDefaultInstance().getClientSecret();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. The client secret from the OAuth provider.
*
*
* string client_secret = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for clientSecret to set.
* @return This builder for chaining.
*/
public Builder setClientSecretBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientSecret_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object tokenEndpoint_ = "";
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The tokenEndpoint.
*/
public java.lang.String getTokenEndpoint() {
java.lang.Object ref = tokenEndpoint_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tokenEndpoint_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for tokenEndpoint.
*/
public com.google.protobuf.ByteString getTokenEndpointBytes() {
java.lang.Object ref = tokenEndpoint_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
tokenEndpoint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The tokenEndpoint to set.
* @return This builder for chaining.
*/
public Builder setTokenEndpoint(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
tokenEndpoint_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTokenEndpoint() {
tokenEndpoint_ = getDefaultInstance().getTokenEndpoint();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Required. The token endpoint in the OAuth provider to exchange for an
* access token.
*
*
* string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for tokenEndpoint to set.
* @return This builder for chaining.
*/
public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
tokenEndpoint_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList scopes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureScopesIsMutable() {
if (!scopes_.isModifiable()) {
scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_);
}
bitField0_ |= 0x00000010;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList getScopesList() {
scopes_.makeImmutable();
return scopes_;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString getScopesBytes(int index) {
return scopes_.getByteString(index);
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The scopes to set.
* @return This builder for chaining.
*/
public Builder setScopes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The scopes to add.
* @return This builder for chaining.
*/
public Builder addScopes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The scopes to add.
* @return This builder for chaining.
*/
public Builder addAllScopes(java.lang.Iterable values) {
ensureScopesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearScopes() {
scopes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. The OAuth scopes to grant.
*
*
* repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the scopes to add.
* @return This builder for chaining.
*/
public Builder addScopesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureScopesIsMutable();
scopes_.add(value);
bitField0_ |= 0x00000010;
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.Tool.Authentication.OAuthConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OAuthConfig 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.Tool.Authentication.OAuthConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ServiceAgentAuthConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
int getServiceAgentAuthValue();
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
getServiceAgentAuth();
}
/**
*
*
*
* Config for auth using [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig}
*/
public static final class ServiceAgentAuthConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
ServiceAgentAuthConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ServiceAgentAuthConfig.newBuilder() to construct.
private ServiceAgentAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServiceAgentAuthConfig() {
serviceAgentAuth_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ServiceAgentAuthConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder.class);
}
/**
*
*
*
* Indicate the auth token type generated from the [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth}
*/
public enum ServiceAgentAuth implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Service agent auth type unspecified. Default to ID_TOKEN.
*
*
* SERVICE_AGENT_AUTH_UNSPECIFIED = 0;
*/
SERVICE_AGENT_AUTH_UNSPECIFIED(0),
/**
*
*
*
* Use [ID
* token](https://cloud.google.com/docs/authentication/token-types#id)
* generated from service agent. This can be used to access Cloud
* Function and Cloud Run after you grant Invoker role to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ID_TOKEN = 1;
*/
ID_TOKEN(1),
/**
*
*
*
* Use [access
* token](https://cloud.google.com/docs/authentication/token-types#access)
* generated from service agent. This can be used to access other Google
* Cloud APIs after you grant required roles to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ACCESS_TOKEN = 2;
*/
ACCESS_TOKEN(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Service agent auth type unspecified. Default to ID_TOKEN.
*
*
* SERVICE_AGENT_AUTH_UNSPECIFIED = 0;
*/
public static final int SERVICE_AGENT_AUTH_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Use [ID
* token](https://cloud.google.com/docs/authentication/token-types#id)
* generated from service agent. This can be used to access Cloud
* Function and Cloud Run after you grant Invoker role to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ID_TOKEN = 1;
*/
public static final int ID_TOKEN_VALUE = 1;
/**
*
*
*
* Use [access
* token](https://cloud.google.com/docs/authentication/token-types#access)
* generated from service agent. This can be used to access other Google
* Cloud APIs after you grant required roles to
* `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
*
*
* ACCESS_TOKEN = 2;
*/
public static final int ACCESS_TOKEN_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ServiceAgentAuth valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ServiceAgentAuth forNumber(int value) {
switch (value) {
case 0:
return SERVICE_AGENT_AUTH_UNSPECIFIED;
case 1:
return ID_TOKEN;
case 2:
return ACCESS_TOKEN;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ServiceAgentAuth findValueByNumber(int number) {
return ServiceAgentAuth.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final ServiceAgentAuth[] VALUES = values();
public static ServiceAgentAuth valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ServiceAgentAuth(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth)
}
public static final int SERVICE_AGENT_AUTH_FIELD_NUMBER = 1;
private int serviceAgentAuth_ = 0;
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
@java.lang.Override
public int getServiceAgentAuthValue() {
return serviceAgentAuth_;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
getServiceAgentAuth() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.forNumber(serviceAgentAuth_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.UNRECOGNIZED
: result;
}
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 (serviceAgentAuth_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.SERVICE_AGENT_AUTH_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, serviceAgentAuth_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (serviceAgentAuth_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.SERVICE_AGENT_AUTH_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceAgentAuth_);
}
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.Tool.Authentication.ServiceAgentAuthConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) obj;
if (serviceAgentAuth_ != other.serviceAgentAuth_) 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) + SERVICE_AGENT_AUTH_FIELD_NUMBER;
hash = (53 * hash) + serviceAgentAuth_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication
.ServiceAgentAuthConfig
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.Tool.Authentication.ServiceAgentAuthConfig
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;
}
/**
*
*
*
* Config for auth using [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
serviceAgentAuth_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.serviceAgentAuth_ = serviceAgentAuth_;
}
}
@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.Tool.Authentication.ServiceAgentAuthConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance()) return this;
if (other.serviceAgentAuth_ != 0) {
setServiceAgentAuthValue(other.getServiceAgentAuthValue());
}
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 8:
{
serviceAgentAuth_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
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 int serviceAgentAuth_ = 0;
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for serviceAgentAuth.
*/
@java.lang.Override
public int getServiceAgentAuthValue() {
return serviceAgentAuth_;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for serviceAgentAuth to set.
* @return This builder for chaining.
*/
public Builder setServiceAgentAuthValue(int value) {
serviceAgentAuth_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The serviceAgentAuth.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
getServiceAgentAuth() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.forNumber(serviceAgentAuth_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The serviceAgentAuth to set.
* @return This builder for chaining.
*/
public Builder setServiceAgentAuth(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.ServiceAgentAuth
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
serviceAgentAuth_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicate the auth token type generated from the [Diglogflow
* service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
* The generated token is sent in the Authorization header.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth service_agent_auth = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearServiceAgentAuth() {
bitField0_ = (bitField0_ & ~0x00000001);
serviceAgentAuth_ = 0;
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.Tool.Authentication.ServiceAgentAuthConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServiceAgentAuthConfig 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.Tool.Authentication.ServiceAgentAuthConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BearerTokenConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The token.
*/
java.lang.String getToken();
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for token.
*/
com.google.protobuf.ByteString getTokenBytes();
}
/**
*
*
*
* Config for authentication using bearer token.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig}
*/
public static final class BearerTokenConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
BearerTokenConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use BearerTokenConfig.newBuilder() to construct.
private BearerTokenConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BearerTokenConfig() {
token_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BearerTokenConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_BearerTokenConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_BearerTokenConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.Builder
.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
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();
token_ = s;
return s;
}
}
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
token_ = 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(token_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_);
}
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(token_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_);
}
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.Tool.Authentication.BearerTokenConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig) obj;
if (!getToken().equals(other.getToken())) 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) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig
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.Tool.Authentication.BearerTokenConfig 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;
}
/**
*
*
*
* Config for authentication using bearer token.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_BearerTokenConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_BearerTokenConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_BearerTokenConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
}
@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.Tool.Authentication.BearerTokenConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
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:
{
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
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 token_ = "";
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for token.
*/
public com.google.protobuf.ByteString getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The text token appended to the text `Bearer` to the request
* Authorization header.
* [Session parameters
* reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
* can be used to pass the token dynamically, e.g.
* `$session.params.parameter-id`.
*
*
* string token = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
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.Tool.Authentication.BearerTokenConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.BearerTokenConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BearerTokenConfig 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.Tool.Authentication.BearerTokenConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int authConfigCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object authConfig_;
public enum AuthConfigCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
API_KEY_CONFIG(1),
OAUTH_CONFIG(2),
SERVICE_AGENT_AUTH_CONFIG(3),
BEARER_TOKEN_CONFIG(4),
AUTHCONFIG_NOT_SET(0);
private final int value;
private AuthConfigCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AuthConfigCase valueOf(int value) {
return forNumber(value);
}
public static AuthConfigCase forNumber(int value) {
switch (value) {
case 1:
return API_KEY_CONFIG;
case 2:
return OAUTH_CONFIG;
case 3:
return SERVICE_AGENT_AUTH_CONFIG;
case 4:
return BEARER_TOKEN_CONFIG;
case 0:
return AUTHCONFIG_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public AuthConfigCase getAuthConfigCase() {
return AuthConfigCase.forNumber(authConfigCase_);
}
public static final int API_KEY_CONFIG_FIELD_NUMBER = 1;
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return Whether the apiKeyConfig field is set.
*/
@java.lang.Override
public boolean hasApiKeyConfig() {
return authConfigCase_ == 1;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return The apiKeyConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
getApiKeyConfig() {
if (authConfigCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder
getApiKeyConfigOrBuilder() {
if (authConfigCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
public static final int OAUTH_CONFIG_FIELD_NUMBER = 2;
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return Whether the oauthConfig field is set.
*/
@java.lang.Override
public boolean hasOauthConfig() {
return authConfigCase_ == 2;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return The oauthConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig getOauthConfig() {
if (authConfigCase_ == 2) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder
getOauthConfigOrBuilder() {
if (authConfigCase_ == 2) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
public static final int SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER = 3;
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return Whether the serviceAgentAuthConfig field is set.
*/
@java.lang.Override
public boolean hasServiceAgentAuthConfig() {
return authConfigCase_ == 3;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return The serviceAgentAuthConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
getServiceAgentAuthConfig() {
if (authConfigCase_ == 3) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder
getServiceAgentAuthConfigOrBuilder() {
if (authConfigCase_ == 3) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
public static final int BEARER_TOKEN_CONFIG_FIELD_NUMBER = 4;
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return Whether the bearerTokenConfig field is set.
*/
@java.lang.Override
public boolean hasBearerTokenConfig() {
return authConfigCase_ == 4;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return The bearerTokenConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
getBearerTokenConfig() {
if (authConfigCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder
getBearerTokenConfigOrBuilder() {
if (authConfigCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
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 (authConfigCase_ == 1) {
output.writeMessage(
1,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) authConfig_);
}
if (authConfigCase_ == 2) {
output.writeMessage(
2,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_);
}
if (authConfigCase_ == 3) {
output.writeMessage(
3,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
authConfig_);
}
if (authConfigCase_ == 4) {
output.writeMessage(
4,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (authConfigCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_);
}
if (authConfigCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
authConfig_);
}
if (authConfigCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)
authConfig_);
}
if (authConfigCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4,
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_);
}
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.Tool.Authentication)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) obj;
if (!getAuthConfigCase().equals(other.getAuthConfigCase())) return false;
switch (authConfigCase_) {
case 1:
if (!getApiKeyConfig().equals(other.getApiKeyConfig())) return false;
break;
case 2:
if (!getOauthConfig().equals(other.getOauthConfig())) return false;
break;
case 3:
if (!getServiceAgentAuthConfig().equals(other.getServiceAgentAuthConfig())) return false;
break;
case 4:
if (!getBearerTokenConfig().equals(other.getBearerTokenConfig())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (authConfigCase_) {
case 1:
hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getApiKeyConfig().hashCode();
break;
case 2:
hash = (37 * hash) + OAUTH_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getOauthConfig().hashCode();
break;
case 3:
hash = (37 * hash) + SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getServiceAgentAuthConfig().hashCode();
break;
case 4:
hash = (37 * hash) + BEARER_TOKEN_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getBearerTokenConfig().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication 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.Tool.Authentication parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication 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.Tool.Authentication parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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.Tool.Authentication 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;
}
/**
*
*
*
* Authentication information required for API calls
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication)
com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (apiKeyConfigBuilder_ != null) {
apiKeyConfigBuilder_.clear();
}
if (oauthConfigBuilder_ != null) {
oauthConfigBuilder_.clear();
}
if (serviceAgentAuthConfigBuilder_ != null) {
serviceAgentAuthConfigBuilder_.clear();
}
if (bearerTokenConfigBuilder_ != null) {
bearerTokenConfigBuilder_.clear();
}
authConfigCase_ = 0;
authConfig_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result) {
result.authConfigCase_ = authConfigCase_;
result.authConfig_ = this.authConfig_;
if (authConfigCase_ == 1 && apiKeyConfigBuilder_ != null) {
result.authConfig_ = apiKeyConfigBuilder_.build();
}
if (authConfigCase_ == 2 && oauthConfigBuilder_ != null) {
result.authConfig_ = oauthConfigBuilder_.build();
}
if (authConfigCase_ == 3 && serviceAgentAuthConfigBuilder_ != null) {
result.authConfig_ = serviceAgentAuthConfigBuilder_.build();
}
if (authConfigCase_ == 4 && bearerTokenConfigBuilder_ != null) {
result.authConfig_ = bearerTokenConfigBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance())
return this;
switch (other.getAuthConfigCase()) {
case API_KEY_CONFIG:
{
mergeApiKeyConfig(other.getApiKeyConfig());
break;
}
case OAUTH_CONFIG:
{
mergeOauthConfig(other.getOauthConfig());
break;
}
case SERVICE_AGENT_AUTH_CONFIG:
{
mergeServiceAgentAuthConfig(other.getServiceAgentAuthConfig());
break;
}
case BEARER_TOKEN_CONFIG:
{
mergeBearerTokenConfig(other.getBearerTokenConfig());
break;
}
case AUTHCONFIG_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(getApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry);
authConfigCase_ = 1;
break;
} // case 10
case 18:
{
input.readMessage(getOauthConfigFieldBuilder().getBuilder(), extensionRegistry);
authConfigCase_ = 2;
break;
} // case 18
case 26:
{
input.readMessage(
getServiceAgentAuthConfigFieldBuilder().getBuilder(), extensionRegistry);
authConfigCase_ = 3;
break;
} // case 26
case 34:
{
input.readMessage(
getBearerTokenConfigFieldBuilder().getBuilder(), extensionRegistry);
authConfigCase_ = 4;
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 authConfigCase_ = 0;
private java.lang.Object authConfig_;
public AuthConfigCase getAuthConfigCase() {
return AuthConfigCase.forNumber(authConfigCase_);
}
public Builder clearAuthConfig() {
authConfigCase_ = 0;
authConfig_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder>
apiKeyConfigBuilder_;
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return Whether the apiKeyConfig field is set.
*/
@java.lang.Override
public boolean hasApiKeyConfig() {
return authConfigCase_ == 1;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*
* @return The apiKeyConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
getApiKeyConfig() {
if (apiKeyConfigBuilder_ == null) {
if (authConfigCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
} else {
if (authConfigCase_ == 1) {
return apiKeyConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
public Builder setApiKeyConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig value) {
if (apiKeyConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authConfig_ = value;
onChanged();
} else {
apiKeyConfigBuilder_.setMessage(value);
}
authConfigCase_ = 1;
return this;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
public Builder setApiKeyConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder
builderForValue) {
if (apiKeyConfigBuilder_ == null) {
authConfig_ = builderForValue.build();
onChanged();
} else {
apiKeyConfigBuilder_.setMessage(builderForValue.build());
}
authConfigCase_ = 1;
return this;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
public Builder mergeApiKeyConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig value) {
if (apiKeyConfigBuilder_ == null) {
if (authConfigCase_ == 1
&& authConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance()) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_)
.mergeFrom(value)
.buildPartial();
} else {
authConfig_ = value;
}
onChanged();
} else {
if (authConfigCase_ == 1) {
apiKeyConfigBuilder_.mergeFrom(value);
} else {
apiKeyConfigBuilder_.setMessage(value);
}
}
authConfigCase_ = 1;
return this;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
public Builder clearApiKeyConfig() {
if (apiKeyConfigBuilder_ == null) {
if (authConfigCase_ == 1) {
authConfigCase_ = 0;
authConfig_ = null;
onChanged();
}
} else {
if (authConfigCase_ == 1) {
authConfigCase_ = 0;
authConfig_ = null;
}
apiKeyConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder
getApiKeyConfigBuilder() {
return getApiKeyConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder
getApiKeyConfigOrBuilder() {
if ((authConfigCase_ == 1) && (apiKeyConfigBuilder_ != null)) {
return apiKeyConfigBuilder_.getMessageOrBuilder();
} else {
if (authConfigCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for API key auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder>
getApiKeyConfigFieldBuilder() {
if (apiKeyConfigBuilder_ == null) {
if (!(authConfigCase_ == 1)) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig
.getDefaultInstance();
}
apiKeyConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)
authConfig_,
getParentForChildren(),
isClean());
authConfig_ = null;
}
authConfigCase_ = 1;
onChanged();
return apiKeyConfigBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder>
oauthConfigBuilder_;
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return Whether the oauthConfig field is set.
*/
@java.lang.Override
public boolean hasOauthConfig() {
return authConfigCase_ == 2;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*
* @return The oauthConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
getOauthConfig() {
if (oauthConfigBuilder_ == null) {
if (authConfigCase_ == 2) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
} else {
if (authConfigCase_ == 2) {
return oauthConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
public Builder setOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig value) {
if (oauthConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authConfig_ = value;
onChanged();
} else {
oauthConfigBuilder_.setMessage(value);
}
authConfigCase_ = 2;
return this;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
public Builder setOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder
builderForValue) {
if (oauthConfigBuilder_ == null) {
authConfig_ = builderForValue.build();
onChanged();
} else {
oauthConfigBuilder_.setMessage(builderForValue.build());
}
authConfigCase_ = 2;
return this;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
public Builder mergeOauthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig value) {
if (oauthConfigBuilder_ == null) {
if (authConfigCase_ == 2
&& authConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance()) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
authConfig_)
.mergeFrom(value)
.buildPartial();
} else {
authConfig_ = value;
}
onChanged();
} else {
if (authConfigCase_ == 2) {
oauthConfigBuilder_.mergeFrom(value);
} else {
oauthConfigBuilder_.setMessage(value);
}
}
authConfigCase_ = 2;
return this;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
public Builder clearOauthConfig() {
if (oauthConfigBuilder_ == null) {
if (authConfigCase_ == 2) {
authConfigCase_ = 0;
authConfig_ = null;
onChanged();
}
} else {
if (authConfigCase_ == 2) {
authConfigCase_ = 0;
authConfig_ = null;
}
oauthConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder
getOauthConfigBuilder() {
return getOauthConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder
getOauthConfigOrBuilder() {
if ((authConfigCase_ == 2) && (oauthConfigBuilder_ != null)) {
return oauthConfigBuilder_.getMessageOrBuilder();
} else {
if (authConfigCase_ == 2) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for OAuth.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder>
getOauthConfigFieldBuilder() {
if (oauthConfigBuilder_ == null) {
if (!(authConfigCase_ == 2)) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig
.getDefaultInstance();
}
oauthConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)
authConfig_,
getParentForChildren(),
isClean());
authConfig_ = null;
}
authConfigCase_ = 2;
onChanged();
return oauthConfigBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder>
serviceAgentAuthConfigBuilder_;
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return Whether the serviceAgentAuthConfig field is set.
*/
@java.lang.Override
public boolean hasServiceAgentAuthConfig() {
return authConfigCase_ == 3;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*
* @return The serviceAgentAuthConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
getServiceAgentAuthConfig() {
if (serviceAgentAuthConfigBuilder_ == null) {
if (authConfigCase_ == 3) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
} else {
if (authConfigCase_ == 3) {
return serviceAgentAuthConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
public Builder setServiceAgentAuthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig value) {
if (serviceAgentAuthConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authConfig_ = value;
onChanged();
} else {
serviceAgentAuthConfigBuilder_.setMessage(value);
}
authConfigCase_ = 3;
return this;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
public Builder setServiceAgentAuthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.Builder
builderForValue) {
if (serviceAgentAuthConfigBuilder_ == null) {
authConfig_ = builderForValue.build();
onChanged();
} else {
serviceAgentAuthConfigBuilder_.setMessage(builderForValue.build());
}
authConfigCase_ = 3;
return this;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
public Builder mergeServiceAgentAuthConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig value) {
if (serviceAgentAuthConfigBuilder_ == null) {
if (authConfigCase_ == 3
&& authConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig.getDefaultInstance()) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig)
authConfig_)
.mergeFrom(value)
.buildPartial();
} else {
authConfig_ = value;
}
onChanged();
} else {
if (authConfigCase_ == 3) {
serviceAgentAuthConfigBuilder_.mergeFrom(value);
} else {
serviceAgentAuthConfigBuilder_.setMessage(value);
}
}
authConfigCase_ = 3;
return this;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
public Builder clearServiceAgentAuthConfig() {
if (serviceAgentAuthConfigBuilder_ == null) {
if (authConfigCase_ == 3) {
authConfigCase_ = 0;
authConfig_ = null;
onChanged();
}
} else {
if (authConfigCase_ == 3) {
authConfigCase_ = 0;
authConfig_ = null;
}
serviceAgentAuthConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder
getServiceAgentAuthConfigBuilder() {
return getServiceAgentAuthConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder
getServiceAgentAuthConfigOrBuilder() {
if ((authConfigCase_ == 3) && (serviceAgentAuthConfigBuilder_ != null)) {
return serviceAgentAuthConfigBuilder_.getMessageOrBuilder();
} else {
if (authConfigCase_ == 3) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for [Diglogflow service
* agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
* auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder>
getServiceAgentAuthConfigFieldBuilder() {
if (serviceAgentAuthConfigBuilder_ == null) {
if (!(authConfigCase_ == 3)) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.getDefaultInstance();
}
serviceAgentAuthConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfigOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.ServiceAgentAuthConfig)
authConfig_,
getParentForChildren(),
isClean());
authConfig_ = null;
}
authConfigCase_ = 3;
onChanged();
return serviceAgentAuthConfigBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder>
bearerTokenConfigBuilder_;
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return Whether the bearerTokenConfig field is set.
*/
@java.lang.Override
public boolean hasBearerTokenConfig() {
return authConfigCase_ == 4;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*
* @return The bearerTokenConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
getBearerTokenConfig() {
if (bearerTokenConfigBuilder_ == null) {
if (authConfigCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
} else {
if (authConfigCase_ == 4) {
return bearerTokenConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
public Builder setBearerTokenConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig value) {
if (bearerTokenConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authConfig_ = value;
onChanged();
} else {
bearerTokenConfigBuilder_.setMessage(value);
}
authConfigCase_ = 4;
return this;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
public Builder setBearerTokenConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.Builder
builderForValue) {
if (bearerTokenConfigBuilder_ == null) {
authConfig_ = builderForValue.build();
onChanged();
} else {
bearerTokenConfigBuilder_.setMessage(builderForValue.build());
}
authConfigCase_ = 4;
return this;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
public Builder mergeBearerTokenConfig(
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig value) {
if (bearerTokenConfigBuilder_ == null) {
if (authConfigCase_ == 4
&& authConfig_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance()) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.BearerTokenConfig)
authConfig_)
.mergeFrom(value)
.buildPartial();
} else {
authConfig_ = value;
}
onChanged();
} else {
if (authConfigCase_ == 4) {
bearerTokenConfigBuilder_.mergeFrom(value);
} else {
bearerTokenConfigBuilder_.setMessage(value);
}
}
authConfigCase_ = 4;
return this;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
public Builder clearBearerTokenConfig() {
if (bearerTokenConfigBuilder_ == null) {
if (authConfigCase_ == 4) {
authConfigCase_ = 0;
authConfig_ = null;
onChanged();
}
} else {
if (authConfigCase_ == 4) {
authConfigCase_ = 0;
authConfig_ = null;
}
bearerTokenConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.Builder
getBearerTokenConfigBuilder() {
return getBearerTokenConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder
getBearerTokenConfigOrBuilder() {
if ((authConfigCase_ == 4) && (bearerTokenConfigBuilder_ != null)) {
return bearerTokenConfigBuilder_.getMessageOrBuilder();
} else {
if (authConfigCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
}
/**
*
*
*
* Config for bearer token auth.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig bearer_token_config = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfigOrBuilder>
getBearerTokenConfigFieldBuilder() {
if (bearerTokenConfigBuilder_ == null) {
if (!(authConfigCase_ == 4)) {
authConfig_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.getDefaultInstance();
}
bearerTokenConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig
.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
.BearerTokenConfigOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.BearerTokenConfig)
authConfig_,
getParentForChildren(),
isClean());
authConfig_ = null;
}
authConfigCase_ = 4;
onChanged();
return bearerTokenConfigBuilder_;
}
@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.Tool.Authentication)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Authentication 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.Tool.Authentication getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TLSConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List getCaCertsList();
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index);
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getCaCertsCount();
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>
getCaCertsOrBuilderList();
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder getCaCertsOrBuilder(
int index);
}
/**
*
*
*
* The TLS configuration.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig}
*/
public static final class TLSConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig)
TLSConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use TLSConfig.newBuilder() to construct.
private TLSConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TLSConfig() {
caCerts_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TLSConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder.class);
}
public interface CACertOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();
/**
*
*
*
* Required. The allowed custom CA certificates (in DER format) for
* HTTPS verification. This overrides the default SSL trust store. If this
* is empty or unspecified, Dialogflow will use Google's default trust
* store to verify certificates. N.B. Make sure the HTTPS server
* certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
*
*
* bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The cert.
*/
com.google.protobuf.ByteString getCert();
}
/**
*
*
*
* The CA certificate.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert}
*/
public static final class CACert extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert)
CACertOrBuilder {
private static final long serialVersionUID = 0L;
// Use CACert.newBuilder() to construct.
private CACert(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CACert() {
displayName_ = "";
cert_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new CACert();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder.class);
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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 name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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 CERT_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*
*
* Required. The allowed custom CA certificates (in DER format) for
* HTTPS verification. This overrides the default SSL trust store. If this
* is empty or unspecified, Dialogflow will use Google's default trust
* store to verify certificates. N.B. Make sure the HTTPS server
* certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
*
*
* bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The cert.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCert() {
return cert_;
}
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 (!cert_.isEmpty()) {
output.writeBytes(2, cert_);
}
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 (!cert_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, cert_);
}
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.Tool.TLSConfig.CACert)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) obj;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getCert().equals(other.getCert())) 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) + CERT_FIELD_NUMBER;
hash = (53 * hash) + getCert().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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.Tool.TLSConfig.CACert 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;
}
/**
*
*
*
* The CA certificate.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert)
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
displayName_ = "";
cert_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.cert_ = cert_;
}
}
@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.Tool.TLSConfig.CACert) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance())
return this;
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getCert() != com.google.protobuf.ByteString.EMPTY) {
setCert(other.getCert());
}
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:
{
cert_ = input.readBytes();
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 displayName_ = "";
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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 name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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 name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the allowed custom CA certificates. This
* can be used to disambiguate the custom CA certificates.
*
*
* string display_name = 1 [(.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_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY;
/**
*
*
*
* Required. The allowed custom CA certificates (in DER format) for
* HTTPS verification. This overrides the default SSL trust store. If this
* is empty or unspecified, Dialogflow will use Google's default trust
* store to verify certificates. N.B. Make sure the HTTPS server
* certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
*
*
* bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The cert.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCert() {
return cert_;
}
/**
*
*
*
* Required. The allowed custom CA certificates (in DER format) for
* HTTPS verification. This overrides the default SSL trust store. If this
* is empty or unspecified, Dialogflow will use Google's default trust
* store to verify certificates. N.B. Make sure the HTTPS server
* certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
*
*
* bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The cert to set.
* @return This builder for chaining.
*/
public Builder setCert(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
cert_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The allowed custom CA certificates (in DER format) for
* HTTPS verification. This overrides the default SSL trust store. If this
* is empty or unspecified, Dialogflow will use Google's default trust
* store to verify certificates. N.B. Make sure the HTTPS server
* certificates are signed with "subject alt name". For instance a
* certificate can be self-signed using the following command,
* openssl x509 -req -days 200 -in example.com.csr \
* -signkey example.com.key \
* -out example.com.crt \
* -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
*
*
* bytes cert = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearCert() {
bitField0_ = (bitField0_ & ~0x00000002);
cert_ = getDefaultInstance().getCert();
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.Tool.TLSConfig.CACert)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CACert 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.Tool.TLSConfig.CACert
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CA_CERTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List caCerts_;
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getCaCertsList() {
return caCerts_;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>
getCaCertsOrBuilderList() {
return caCerts_;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getCaCertsCount() {
return caCerts_.size();
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index) {
return caCerts_.get(index);
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder
getCaCertsOrBuilder(int index) {
return caCerts_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < caCerts_.size(); i++) {
output.writeMessage(1, caCerts_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < caCerts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, caCerts_.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.Tool.TLSConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) obj;
if (!getCaCertsList().equals(other.getCaCertsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getCaCertsCount() > 0) {
hash = (37 * hash) + CA_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getCaCertsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig 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.Tool.TLSConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig 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.Tool.TLSConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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.Tool.TLSConfig 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;
}
/**
*
*
*
* The TLS configuration.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (caCertsBuilder_ == null) {
caCerts_ = java.util.Collections.emptyList();
} else {
caCerts_ = null;
caCertsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result) {
if (caCertsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
caCerts_ = java.util.Collections.unmodifiableList(caCerts_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.caCerts_ = caCerts_;
} else {
result.caCerts_ = caCertsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result) {
int from_bitField0_ = 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.Tool.TLSConfig) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance())
return this;
if (caCertsBuilder_ == null) {
if (!other.caCerts_.isEmpty()) {
if (caCerts_.isEmpty()) {
caCerts_ = other.caCerts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCaCertsIsMutable();
caCerts_.addAll(other.caCerts_);
}
onChanged();
}
} else {
if (!other.caCerts_.isEmpty()) {
if (caCertsBuilder_.isEmpty()) {
caCertsBuilder_.dispose();
caCertsBuilder_ = null;
caCerts_ = other.caCerts_;
bitField0_ = (bitField0_ & ~0x00000001);
caCertsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getCaCertsFieldBuilder()
: null;
} else {
caCertsBuilder_.addAllMessages(other.caCerts_);
}
}
}
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:
{
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert m =
input.readMessage(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.parser(),
extensionRegistry);
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
caCerts_.add(m);
} else {
caCertsBuilder_.addMessage(m);
}
break;
} // case 10
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.util.List
caCerts_ = java.util.Collections.emptyList();
private void ensureCaCertsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
caCerts_ =
new java.util.ArrayList(
caCerts_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>
caCertsBuilder_;
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getCaCertsList() {
if (caCertsBuilder_ == null) {
return java.util.Collections.unmodifiableList(caCerts_);
} else {
return caCertsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public int getCaCertsCount() {
if (caCertsBuilder_ == null) {
return caCerts_.size();
} else {
return caCertsBuilder_.getCount();
}
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index) {
if (caCertsBuilder_ == null) {
return caCerts_.get(index);
} else {
return caCertsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setCaCerts(
int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) {
if (caCertsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCaCertsIsMutable();
caCerts_.set(index, value);
onChanged();
} else {
caCertsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setCaCerts(
int index,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) {
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
caCerts_.set(index, builderForValue.build());
onChanged();
} else {
caCertsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addCaCerts(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) {
if (caCertsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCaCertsIsMutable();
caCerts_.add(value);
onChanged();
} else {
caCertsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addCaCerts(
int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) {
if (caCertsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCaCertsIsMutable();
caCerts_.add(index, value);
onChanged();
} else {
caCertsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addCaCerts(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) {
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
caCerts_.add(builderForValue.build());
onChanged();
} else {
caCertsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addCaCerts(
int index,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) {
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
caCerts_.add(index, builderForValue.build());
onChanged();
} else {
caCertsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addAllCaCerts(
java.lang.Iterable extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert>
values) {
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCerts_);
onChanged();
} else {
caCertsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearCaCerts() {
if (caCertsBuilder_ == null) {
caCerts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
caCertsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder removeCaCerts(int index) {
if (caCertsBuilder_ == null) {
ensureCaCertsIsMutable();
caCerts_.remove(index);
onChanged();
} else {
caCertsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder getCaCertsBuilder(
int index) {
return getCaCertsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder
getCaCertsOrBuilder(int index) {
if (caCertsBuilder_ == null) {
return caCerts_.get(index);
} else {
return caCertsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>
getCaCertsOrBuilderList() {
if (caCertsBuilder_ != null) {
return caCertsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(caCerts_);
}
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder
addCaCertsBuilder() {
return getCaCertsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance());
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder addCaCertsBuilder(
int index) {
return getCaCertsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance());
}
/**
*
*
*
* Required. Specifies a list of allowed custom CA certificates for HTTPS
* verification.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getCaCertsBuilderList() {
return getCaCertsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>
getCaCertsFieldBuilder() {
if (caCertsBuilder_ == null) {
caCertsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>(
caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
caCerts_ = null;
}
return caCertsBuilder_;
}
@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.Tool.TLSConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TLSConfig 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.Tool.TLSConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ServiceDirectoryConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
java.lang.String getService();
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
com.google.protobuf.ByteString getServiceBytes();
}
/**
*
*
*
* Configuration for tools using Service Directory.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig}
*/
public static final class ServiceDirectoryConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig)
ServiceDirectoryConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ServiceDirectoryConfig.newBuilder() to construct.
private ServiceDirectoryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServiceDirectoryConfig() {
service_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ServiceDirectoryConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ServiceDirectoryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder.class);
}
public static final int SERVICE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object service_ = "";
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
java.lang.Object ref = service_;
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();
service_ = s;
return s;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = 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(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_);
}
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(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_);
}
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.Tool.ServiceDirectoryConfig)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig) obj;
if (!getService().equals(other.getService())) 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) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig
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.Tool.ServiceDirectoryConfig
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.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig 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;
}
/**
*
*
*
* Configuration for tools using Service Directory.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig)
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ServiceDirectoryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
service_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ServiceDirectoryConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.service_ = service_;
}
}
@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.Tool.ServiceDirectoryConfig) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig other) {
if (other
== com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
.getDefaultInstance()) return this;
if (!other.getService().isEmpty()) {
service_ = other.service_;
bitField0_ |= 0x00000001;
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:
{
service_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
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 service_ = "";
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The service.
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for service.
*/
public com.google.protobuf.ByteString getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of [Service
* Directory](https://cloud.google.com/service-directory) service.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
* `LocationID` of the service directory must be the same as the location
* of the agent.
*
*
*
* string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = value;
bitField0_ |= 0x00000001;
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.Tool.ServiceDirectoryConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ServiceDirectoryConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServiceDirectoryConfig 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.Tool.ServiceDirectoryConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int specificationCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object specification_;
public enum SpecificationCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
OPEN_API_SPEC(4),
DATA_STORE_SPEC(8),
EXTENSION_SPEC(11),
FUNCTION_SPEC(13),
SPECIFICATION_NOT_SET(0);
private final int value;
private SpecificationCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SpecificationCase valueOf(int value) {
return forNumber(value);
}
public static SpecificationCase forNumber(int value) {
switch (value) {
case 4:
return OPEN_API_SPEC;
case 8:
return DATA_STORE_SPEC;
case 11:
return EXTENSION_SPEC;
case 13:
return FUNCTION_SPEC;
case 0:
return SPECIFICATION_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public SpecificationCase getSpecificationCase() {
return SpecificationCase.forNumber(specificationCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of the Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 DESCRIPTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OPEN_API_SPEC_FIELD_NUMBER = 4;
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*
* @return Whether the openApiSpec field is set.
*/
@java.lang.Override
public boolean hasOpenApiSpec() {
return specificationCase_ == 4;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*
* @return The openApiSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getOpenApiSpec() {
if (specificationCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder
getOpenApiSpecOrBuilder() {
if (specificationCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
public static final int DATA_STORE_SPEC_FIELD_NUMBER = 8;
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*
* @return Whether the dataStoreSpec field is set.
*/
@java.lang.Override
public boolean hasDataStoreSpec() {
return specificationCase_ == 8;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*
* @return The dataStoreSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDataStoreSpec() {
if (specificationCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder
getDataStoreSpecOrBuilder() {
if (specificationCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
public static final int EXTENSION_SPEC_FIELD_NUMBER = 11;
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*
* @return Whether the extensionSpec field is set.
*/
@java.lang.Override
public boolean hasExtensionSpec() {
return specificationCase_ == 11;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*
* @return The extensionSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getExtensionSpec() {
if (specificationCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder
getExtensionSpecOrBuilder() {
if (specificationCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
public static final int FUNCTION_SPEC_FIELD_NUMBER = 13;
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*
* @return Whether the functionSpec field is set.
*/
@java.lang.Override
public boolean hasFunctionSpec() {
return specificationCase_ == 13;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*
* @return The functionSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getFunctionSpec() {
if (specificationCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder
getFunctionSpecOrBuilder() {
if (specificationCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
public static final int TOOL_TYPE_FIELD_NUMBER = 12;
private int toolType_ = 0;
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for toolType.
*/
@java.lang.Override
public int getToolTypeValue() {
return toolType_;
}
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The toolType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType getToolType() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.forNumber(toolType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.UNRECOGNIZED
: result;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (specificationCase_ == 4) {
output.writeMessage(
4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_);
}
if (specificationCase_ == 8) {
output.writeMessage(
8, (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_);
}
if (specificationCase_ == 11) {
output.writeMessage(
11, (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_);
}
if (toolType_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(12, toolType_);
}
if (specificationCase_ == 13) {
output.writeMessage(
13, (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (specificationCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_);
}
if (specificationCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_);
}
if (specificationCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
11, (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_);
}
if (toolType_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, toolType_);
}
if (specificationCase_ == 13) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
13, (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_);
}
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.Tool)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3beta1.Tool other =
(com.google.cloud.dialogflow.cx.v3beta1.Tool) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (toolType_ != other.toolType_) return false;
if (!getSpecificationCase().equals(other.getSpecificationCase())) return false;
switch (specificationCase_) {
case 4:
if (!getOpenApiSpec().equals(other.getOpenApiSpec())) return false;
break;
case 8:
if (!getDataStoreSpec().equals(other.getDataStoreSpec())) return false;
break;
case 11:
if (!getExtensionSpec().equals(other.getExtensionSpec())) return false;
break;
case 13:
if (!getFunctionSpec().equals(other.getFunctionSpec())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + TOOL_TYPE_FIELD_NUMBER;
hash = (53 * hash) + toolType_;
switch (specificationCase_) {
case 4:
hash = (37 * hash) + OPEN_API_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getOpenApiSpec().hashCode();
break;
case 8:
hash = (37 * hash) + DATA_STORE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getDataStoreSpec().hashCode();
break;
case 11:
hash = (37 * hash) + EXTENSION_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getExtensionSpec().hashCode();
break;
case 13:
hash = (37 * hash) + FUNCTION_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getFunctionSpec().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool 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.Tool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool 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.Tool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool 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.Tool 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.Tool 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.Tool 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.Tool 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.Tool 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.Tool 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.Tool 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;
}
/**
*
*
*
* A tool provides a list of actions which are available to the
* [Playbook][google.cloud.dialogflow.cx.v3beta1.Playbook] to attain its goal. A
* Tool consists of a description of the tool's usage and a specification of the
* tool which contains the schema and authentication information.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool)
com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3beta1.Tool.class,
com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
description_ = "";
if (openApiSpecBuilder_ != null) {
openApiSpecBuilder_.clear();
}
if (dataStoreSpecBuilder_ != null) {
dataStoreSpecBuilder_.clear();
}
if (extensionSpecBuilder_ != null) {
extensionSpecBuilder_.clear();
}
if (functionSpecBuilder_ != null) {
functionSpecBuilder_.clear();
}
toolType_ = 0;
specificationCase_ = 0;
specification_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3beta1.ToolProto
.internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool build() {
com.google.cloud.dialogflow.cx.v3beta1.Tool result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool buildPartial() {
com.google.cloud.dialogflow.cx.v3beta1.Tool result =
new com.google.cloud.dialogflow.cx.v3beta1.Tool(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.toolType_ = toolType_;
}
}
private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Tool result) {
result.specificationCase_ = specificationCase_;
result.specification_ = this.specification_;
if (specificationCase_ == 4 && openApiSpecBuilder_ != null) {
result.specification_ = openApiSpecBuilder_.build();
}
if (specificationCase_ == 8 && dataStoreSpecBuilder_ != null) {
result.specification_ = dataStoreSpecBuilder_.build();
}
if (specificationCase_ == 11 && extensionSpecBuilder_ != null) {
result.specification_ = extensionSpecBuilder_.build();
}
if (specificationCase_ == 13 && functionSpecBuilder_ != null) {
result.specification_ = functionSpecBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool other) {
if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.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.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.toolType_ != 0) {
setToolTypeValue(other.getToolTypeValue());
}
switch (other.getSpecificationCase()) {
case OPEN_API_SPEC:
{
mergeOpenApiSpec(other.getOpenApiSpec());
break;
}
case DATA_STORE_SPEC:
{
mergeDataStoreSpec(other.getDataStoreSpec());
break;
}
case EXTENSION_SPEC:
{
mergeExtensionSpec(other.getExtensionSpec());
break;
}
case FUNCTION_SPEC:
{
mergeFunctionSpec(other.getFunctionSpec());
break;
}
case SPECIFICATION_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getOpenApiSpecFieldBuilder().getBuilder(), extensionRegistry);
specificationCase_ = 4;
break;
} // case 34
case 66:
{
input.readMessage(getDataStoreSpecFieldBuilder().getBuilder(), extensionRegistry);
specificationCase_ = 8;
break;
} // case 66
case 90:
{
input.readMessage(getExtensionSpecFieldBuilder().getBuilder(), extensionRegistry);
specificationCase_ = 11;
break;
} // case 90
case 96:
{
toolType_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 96
case 106:
{
input.readMessage(getFunctionSpecFieldBuilder().getBuilder(), extensionRegistry);
specificationCase_ = 13;
break;
} // case 106
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 specificationCase_ = 0;
private java.lang.Object specification_;
public SpecificationCase getSpecificationCase() {
return SpecificationCase.forNumber(specificationCase_);
}
public Builder clearSpecification() {
specificationCase_ = 0;
specification_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of the Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 Tool, unique within an agent.
*
*
* 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 java.lang.Object description_ = "";
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. High level description of the Tool and its usage.
*
*
* string description = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder>
openApiSpecBuilder_;
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*
* @return Whether the openApiSpec field is set.
*/
@java.lang.Override
public boolean hasOpenApiSpec() {
return specificationCase_ == 4;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*
* @return The openApiSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getOpenApiSpec() {
if (openApiSpecBuilder_ == null) {
if (specificationCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
} else {
if (specificationCase_ == 4) {
return openApiSpecBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
public Builder setOpenApiSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool value) {
if (openApiSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
specification_ = value;
onChanged();
} else {
openApiSpecBuilder_.setMessage(value);
}
specificationCase_ = 4;
return this;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
public Builder setOpenApiSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder builderForValue) {
if (openApiSpecBuilder_ == null) {
specification_ = builderForValue.build();
onChanged();
} else {
openApiSpecBuilder_.setMessage(builderForValue.build());
}
specificationCase_ = 4;
return this;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
public Builder mergeOpenApiSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool value) {
if (openApiSpecBuilder_ == null) {
if (specificationCase_ == 4
&& specification_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance()) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_)
.mergeFrom(value)
.buildPartial();
} else {
specification_ = value;
}
onChanged();
} else {
if (specificationCase_ == 4) {
openApiSpecBuilder_.mergeFrom(value);
} else {
openApiSpecBuilder_.setMessage(value);
}
}
specificationCase_ = 4;
return this;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
public Builder clearOpenApiSpec() {
if (openApiSpecBuilder_ == null) {
if (specificationCase_ == 4) {
specificationCase_ = 0;
specification_ = null;
onChanged();
}
} else {
if (specificationCase_ == 4) {
specificationCase_ = 0;
specification_ = null;
}
openApiSpecBuilder_.clear();
}
return this;
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder getOpenApiSpecBuilder() {
return getOpenApiSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder
getOpenApiSpecOrBuilder() {
if ((specificationCase_ == 4) && (openApiSpecBuilder_ != null)) {
return openApiSpecBuilder_.getMessageOrBuilder();
} else {
if (specificationCase_ == 4) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
}
/**
*
*
*
* OpenAPI specification of the Tool.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder>
getOpenApiSpecFieldBuilder() {
if (openApiSpecBuilder_ == null) {
if (!(specificationCase_ == 4)) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance();
}
openApiSpecBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_,
getParentForChildren(),
isClean());
specification_ = null;
}
specificationCase_ = 4;
onChanged();
return openApiSpecBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder>
dataStoreSpecBuilder_;
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*
* @return Whether the dataStoreSpec field is set.
*/
@java.lang.Override
public boolean hasDataStoreSpec() {
return specificationCase_ == 8;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*
* @return The dataStoreSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDataStoreSpec() {
if (dataStoreSpecBuilder_ == null) {
if (specificationCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
} else {
if (specificationCase_ == 8) {
return dataStoreSpecBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
public Builder setDataStoreSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool value) {
if (dataStoreSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
specification_ = value;
onChanged();
} else {
dataStoreSpecBuilder_.setMessage(value);
}
specificationCase_ = 8;
return this;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
public Builder setDataStoreSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder builderForValue) {
if (dataStoreSpecBuilder_ == null) {
specification_ = builderForValue.build();
onChanged();
} else {
dataStoreSpecBuilder_.setMessage(builderForValue.build());
}
specificationCase_ = 8;
return this;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
public Builder mergeDataStoreSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool value) {
if (dataStoreSpecBuilder_ == null) {
if (specificationCase_ == 8
&& specification_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance()) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_)
.mergeFrom(value)
.buildPartial();
} else {
specification_ = value;
}
onChanged();
} else {
if (specificationCase_ == 8) {
dataStoreSpecBuilder_.mergeFrom(value);
} else {
dataStoreSpecBuilder_.setMessage(value);
}
}
specificationCase_ = 8;
return this;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
public Builder clearDataStoreSpec() {
if (dataStoreSpecBuilder_ == null) {
if (specificationCase_ == 8) {
specificationCase_ = 0;
specification_ = null;
onChanged();
}
} else {
if (specificationCase_ == 8) {
specificationCase_ = 0;
specification_ = null;
}
dataStoreSpecBuilder_.clear();
}
return this;
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder
getDataStoreSpecBuilder() {
return getDataStoreSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder
getDataStoreSpecOrBuilder() {
if ((specificationCase_ == 8) && (dataStoreSpecBuilder_ != null)) {
return dataStoreSpecBuilder_.getMessageOrBuilder();
} else {
if (specificationCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
}
/**
*
*
*
* Data store search tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder>
getDataStoreSpecFieldBuilder() {
if (dataStoreSpecBuilder_ == null) {
if (!(specificationCase_ == 8)) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance();
}
dataStoreSpecBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_,
getParentForChildren(),
isClean());
specification_ = null;
}
specificationCase_ = 8;
onChanged();
return dataStoreSpecBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder>
extensionSpecBuilder_;
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*
* @return Whether the extensionSpec field is set.
*/
@java.lang.Override
public boolean hasExtensionSpec() {
return specificationCase_ == 11;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*
* @return The extensionSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getExtensionSpec() {
if (extensionSpecBuilder_ == null) {
if (specificationCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
} else {
if (specificationCase_ == 11) {
return extensionSpecBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
public Builder setExtensionSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool value) {
if (extensionSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
specification_ = value;
onChanged();
} else {
extensionSpecBuilder_.setMessage(value);
}
specificationCase_ = 11;
return this;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
public Builder setExtensionSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder builderForValue) {
if (extensionSpecBuilder_ == null) {
specification_ = builderForValue.build();
onChanged();
} else {
extensionSpecBuilder_.setMessage(builderForValue.build());
}
specificationCase_ = 11;
return this;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
public Builder mergeExtensionSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool value) {
if (extensionSpecBuilder_ == null) {
if (specificationCase_ == 11
&& specification_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance()) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_)
.mergeFrom(value)
.buildPartial();
} else {
specification_ = value;
}
onChanged();
} else {
if (specificationCase_ == 11) {
extensionSpecBuilder_.mergeFrom(value);
} else {
extensionSpecBuilder_.setMessage(value);
}
}
specificationCase_ = 11;
return this;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
public Builder clearExtensionSpec() {
if (extensionSpecBuilder_ == null) {
if (specificationCase_ == 11) {
specificationCase_ = 0;
specification_ = null;
onChanged();
}
} else {
if (specificationCase_ == 11) {
specificationCase_ = 0;
specification_ = null;
}
extensionSpecBuilder_.clear();
}
return this;
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder
getExtensionSpecBuilder() {
return getExtensionSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder
getExtensionSpecOrBuilder() {
if ((specificationCase_ == 11) && (extensionSpecBuilder_ != null)) {
return extensionSpecBuilder_.getMessageOrBuilder();
} else {
if (specificationCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
}
/**
*
*
*
* Vertex extension tool specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder>
getExtensionSpecFieldBuilder() {
if (extensionSpecBuilder_ == null) {
if (!(specificationCase_ == 11)) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance();
}
extensionSpecBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_,
getParentForChildren(),
isClean());
specification_ = null;
}
specificationCase_ = 11;
onChanged();
return extensionSpecBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder>
functionSpecBuilder_;
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*
* @return Whether the functionSpec field is set.
*/
@java.lang.Override
public boolean hasFunctionSpec() {
return specificationCase_ == 13;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*
* @return The functionSpec.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getFunctionSpec() {
if (functionSpecBuilder_ == null) {
if (specificationCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
} else {
if (specificationCase_ == 13) {
return functionSpecBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
public Builder setFunctionSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool value) {
if (functionSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
specification_ = value;
onChanged();
} else {
functionSpecBuilder_.setMessage(value);
}
specificationCase_ = 13;
return this;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
public Builder setFunctionSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder builderForValue) {
if (functionSpecBuilder_ == null) {
specification_ = builderForValue.build();
onChanged();
} else {
functionSpecBuilder_.setMessage(builderForValue.build());
}
specificationCase_ = 13;
return this;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
public Builder mergeFunctionSpec(
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool value) {
if (functionSpecBuilder_ == null) {
if (specificationCase_ == 13
&& specification_
!= com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance()) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.newBuilder(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_)
.mergeFrom(value)
.buildPartial();
} else {
specification_ = value;
}
onChanged();
} else {
if (specificationCase_ == 13) {
functionSpecBuilder_.mergeFrom(value);
} else {
functionSpecBuilder_.setMessage(value);
}
}
specificationCase_ = 13;
return this;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
public Builder clearFunctionSpec() {
if (functionSpecBuilder_ == null) {
if (specificationCase_ == 13) {
specificationCase_ = 0;
specification_ = null;
onChanged();
}
} else {
if (specificationCase_ == 13) {
specificationCase_ = 0;
specification_ = null;
}
functionSpecBuilder_.clear();
}
return this;
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder
getFunctionSpecBuilder() {
return getFunctionSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder
getFunctionSpecOrBuilder() {
if ((specificationCase_ == 13) && (functionSpecBuilder_ != null)) {
return functionSpecBuilder_.getMessageOrBuilder();
} else {
if (specificationCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_;
}
return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
}
/**
*
*
*
* Client side executed function specification.
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder>
getFunctionSpecFieldBuilder() {
if (functionSpecBuilder_ == null) {
if (!(specificationCase_ == 13)) {
specification_ =
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance();
}
functionSpecBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder,
com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder>(
(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_,
getParentForChildren(),
isClean());
specification_ = null;
}
specificationCase_ = 13;
onChanged();
return functionSpecBuilder_;
}
private int toolType_ = 0;
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for toolType.
*/
@java.lang.Override
public int getToolTypeValue() {
return toolType_;
}
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for toolType to set.
* @return This builder for chaining.
*/
public Builder setToolTypeValue(int value) {
toolType_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The toolType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType getToolType() {
com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType result =
com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.forNumber(toolType_);
return result == null
? com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The toolType to set.
* @return This builder for chaining.
*/
public Builder setToolType(com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
toolType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The tool type.
*
*
*
* .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearToolType() {
bitField0_ = (bitField0_ & ~0x00000080);
toolType_ = 0;
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.Tool)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool)
private static final com.google.cloud.dialogflow.cx.v3beta1.Tool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool();
}
public static com.google.cloud.dialogflow.cx.v3beta1.Tool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Tool 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.Tool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}