com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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-v2 Show documentation
Show all versions of proto-google-cloud-dialogflow-v2 Show documentation
PROTO library for proto-google-cloud-dialogflow-v2
/*
* 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/v2/document.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dialogflow.v2;
/**
*
*
*
* Metadata in google::longrunning::Operation for Knowledge operations.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.KnowledgeOperationMetadata}
*/
public final class KnowledgeOperationMetadata extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.KnowledgeOperationMetadata)
KnowledgeOperationMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use KnowledgeOperationMetadata.newBuilder() to construct.
private KnowledgeOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KnowledgeOperationMetadata() {
state_ = 0;
knowledgeBase_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new KnowledgeOperationMetadata();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.DocumentProto
.internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.DocumentProto
.internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.class,
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.Builder.class);
}
/**
*
*
*
* States of the operation.
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* State unspecified.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* The operation has been created.
*
*
* PENDING = 1;
*/
PENDING(1),
/**
*
*
*
* The operation is currently running.
*
*
* RUNNING = 2;
*/
RUNNING(2),
/**
*
*
*
* The operation is done, either cancelled or completed.
*
*
* DONE = 3;
*/
DONE(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* State unspecified.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The operation has been created.
*
*
* PENDING = 1;
*/
public static final int PENDING_VALUE = 1;
/**
*
*
*
* The operation is currently running.
*
*
* RUNNING = 2;
*/
public static final int RUNNING_VALUE = 2;
/**
*
*
*
* The operation is done, either cancelled or completed.
*
*
* DONE = 3;
*/
public static final int DONE_VALUE = 3;
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 State 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 State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return PENDING;
case 2:
return RUNNING;
case 3:
return DONE;
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 State findValueByNumber(int number) {
return State.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.v2.KnowledgeOperationMetadata.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final State[] VALUES = values();
public static State 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 State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State)
}
private int operationMetadataCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object operationMetadata_;
public enum OperationMetadataCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
EXPORT_OPERATION_METADATA(4),
OPERATIONMETADATA_NOT_SET(0);
private final int value;
private OperationMetadataCase(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 OperationMetadataCase valueOf(int value) {
return forNumber(value);
}
public static OperationMetadataCase forNumber(int value) {
switch (value) {
case 4:
return EXPORT_OPERATION_METADATA;
case 0:
return OPERATIONMETADATA_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public OperationMetadataCase getOperationMetadataCase() {
return OperationMetadataCase.forNumber(operationMetadataCase_);
}
public static final int STATE_FIELD_NUMBER = 1;
private int state_ = 0;
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State getState() {
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State result =
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.forNumber(state_);
return result == null
? com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.UNRECOGNIZED
: result;
}
public static final int KNOWLEDGE_BASE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object knowledgeBase_ = "";
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @return The knowledgeBase.
*/
@java.lang.Override
public java.lang.String getKnowledgeBase() {
java.lang.Object ref = knowledgeBase_;
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();
knowledgeBase_ = s;
return s;
}
}
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @return The bytes for knowledgeBase.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKnowledgeBaseBytes() {
java.lang.Object ref = knowledgeBase_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
knowledgeBase_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXPORT_OPERATION_METADATA_FIELD_NUMBER = 4;
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
* @return Whether the exportOperationMetadata field is set.
*/
@java.lang.Override
public boolean hasExportOperationMetadata() {
return operationMetadataCase_ == 4;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
* @return The exportOperationMetadata.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.ExportOperationMetadata getExportOperationMetadata() {
if (operationMetadataCase_ == 4) {
return (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_;
}
return com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance();
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.ExportOperationMetadataOrBuilder
getExportOperationMetadataOrBuilder() {
if (operationMetadataCase_ == 4) {
return (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_;
}
return com.google.cloud.dialogflow.v2.ExportOperationMetadata.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 (state_
!= com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(knowledgeBase_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, knowledgeBase_);
}
if (operationMetadataCase_ == 4) {
output.writeMessage(
4, (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (state_
!= com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(knowledgeBase_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, knowledgeBase_);
}
if (operationMetadataCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_);
}
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.v2.KnowledgeOperationMetadata)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata other =
(com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata) obj;
if (state_ != other.state_) return false;
if (!getKnowledgeBase().equals(other.getKnowledgeBase())) return false;
if (!getOperationMetadataCase().equals(other.getOperationMetadataCase())) return false;
switch (operationMetadataCase_) {
case 4:
if (!getExportOperationMetadata().equals(other.getExportOperationMetadata())) 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) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + KNOWLEDGE_BASE_FIELD_NUMBER;
hash = (53 * hash) + getKnowledgeBase().hashCode();
switch (operationMetadataCase_) {
case 4:
hash = (37 * hash) + EXPORT_OPERATION_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getExportOperationMetadata().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata 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;
}
/**
*
*
*
* Metadata in google::longrunning::Operation for Knowledge operations.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.KnowledgeOperationMetadata}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.KnowledgeOperationMetadata)
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.DocumentProto
.internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.DocumentProto
.internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.class,
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
state_ = 0;
knowledgeBase_ = "";
if (exportOperationMetadataBuilder_ != null) {
exportOperationMetadataBuilder_.clear();
}
operationMetadataCase_ = 0;
operationMetadata_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.DocumentProto
.internal_static_google_cloud_dialogflow_v2_KnowledgeOperationMetadata_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata build() {
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata buildPartial() {
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata result =
new com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.knowledgeBase_ = knowledgeBase_;
}
}
private void buildPartialOneofs(
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata result) {
result.operationMetadataCase_ = operationMetadataCase_;
result.operationMetadata_ = this.operationMetadata_;
if (operationMetadataCase_ == 4 && exportOperationMetadataBuilder_ != null) {
result.operationMetadata_ = exportOperationMetadataBuilder_.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.v2.KnowledgeOperationMetadata) {
return mergeFrom((com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata other) {
if (other == com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.getDefaultInstance())
return this;
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getKnowledgeBase().isEmpty()) {
knowledgeBase_ = other.knowledgeBase_;
bitField0_ |= 0x00000002;
onChanged();
}
switch (other.getOperationMetadataCase()) {
case EXPORT_OPERATION_METADATA:
{
mergeExportOperationMetadata(other.getExportOperationMetadata());
break;
}
case OPERATIONMETADATA_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 8:
{
state_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 26:
{
knowledgeBase_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26
case 34:
{
input.readMessage(
getExportOperationMetadataFieldBuilder().getBuilder(), extensionRegistry);
operationMetadataCase_ = 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 operationMetadataCase_ = 0;
private java.lang.Object operationMetadata_;
public OperationMetadataCase getOperationMetadataCase() {
return OperationMetadataCase.forNumber(operationMetadataCase_);
}
public Builder clearOperationMetadata() {
operationMetadataCase_ = 0;
operationMetadata_ = null;
onChanged();
return this;
}
private int bitField0_;
private int state_ = 0;
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State getState() {
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State result =
com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.forNumber(state_);
return result == null
? com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The current state of this operation.
*
*
*
* .google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000001);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object knowledgeBase_ = "";
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @return The knowledgeBase.
*/
public java.lang.String getKnowledgeBase() {
java.lang.Object ref = knowledgeBase_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
knowledgeBase_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @return The bytes for knowledgeBase.
*/
public com.google.protobuf.ByteString getKnowledgeBaseBytes() {
java.lang.Object ref = knowledgeBase_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
knowledgeBase_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @param value The knowledgeBase to set.
* @return This builder for chaining.
*/
public Builder setKnowledgeBase(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
knowledgeBase_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @return This builder for chaining.
*/
public Builder clearKnowledgeBase() {
knowledgeBase_ = getDefaultInstance().getKnowledgeBase();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The name of the knowledge base interacted with during the operation.
*
*
* string knowledge_base = 3;
*
* @param value The bytes for knowledgeBase to set.
* @return This builder for chaining.
*/
public Builder setKnowledgeBaseBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
knowledgeBase_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.ExportOperationMetadata,
com.google.cloud.dialogflow.v2.ExportOperationMetadata.Builder,
com.google.cloud.dialogflow.v2.ExportOperationMetadataOrBuilder>
exportOperationMetadataBuilder_;
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*
* @return Whether the exportOperationMetadata field is set.
*/
@java.lang.Override
public boolean hasExportOperationMetadata() {
return operationMetadataCase_ == 4;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*
* @return The exportOperationMetadata.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.ExportOperationMetadata getExportOperationMetadata() {
if (exportOperationMetadataBuilder_ == null) {
if (operationMetadataCase_ == 4) {
return (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_;
}
return com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance();
} else {
if (operationMetadataCase_ == 4) {
return exportOperationMetadataBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance();
}
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
public Builder setExportOperationMetadata(
com.google.cloud.dialogflow.v2.ExportOperationMetadata value) {
if (exportOperationMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
operationMetadata_ = value;
onChanged();
} else {
exportOperationMetadataBuilder_.setMessage(value);
}
operationMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
public Builder setExportOperationMetadata(
com.google.cloud.dialogflow.v2.ExportOperationMetadata.Builder builderForValue) {
if (exportOperationMetadataBuilder_ == null) {
operationMetadata_ = builderForValue.build();
onChanged();
} else {
exportOperationMetadataBuilder_.setMessage(builderForValue.build());
}
operationMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
public Builder mergeExportOperationMetadata(
com.google.cloud.dialogflow.v2.ExportOperationMetadata value) {
if (exportOperationMetadataBuilder_ == null) {
if (operationMetadataCase_ == 4
&& operationMetadata_
!= com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance()) {
operationMetadata_ =
com.google.cloud.dialogflow.v2.ExportOperationMetadata.newBuilder(
(com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_)
.mergeFrom(value)
.buildPartial();
} else {
operationMetadata_ = value;
}
onChanged();
} else {
if (operationMetadataCase_ == 4) {
exportOperationMetadataBuilder_.mergeFrom(value);
} else {
exportOperationMetadataBuilder_.setMessage(value);
}
}
operationMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
public Builder clearExportOperationMetadata() {
if (exportOperationMetadataBuilder_ == null) {
if (operationMetadataCase_ == 4) {
operationMetadataCase_ = 0;
operationMetadata_ = null;
onChanged();
}
} else {
if (operationMetadataCase_ == 4) {
operationMetadataCase_ = 0;
operationMetadata_ = null;
}
exportOperationMetadataBuilder_.clear();
}
return this;
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
public com.google.cloud.dialogflow.v2.ExportOperationMetadata.Builder
getExportOperationMetadataBuilder() {
return getExportOperationMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.ExportOperationMetadataOrBuilder
getExportOperationMetadataOrBuilder() {
if ((operationMetadataCase_ == 4) && (exportOperationMetadataBuilder_ != null)) {
return exportOperationMetadataBuilder_.getMessageOrBuilder();
} else {
if (operationMetadataCase_ == 4) {
return (com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_;
}
return com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance();
}
}
/**
*
*
*
* Metadata for the Export Data Operation such as the destination of export.
*
*
* .google.cloud.dialogflow.v2.ExportOperationMetadata export_operation_metadata = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.ExportOperationMetadata,
com.google.cloud.dialogflow.v2.ExportOperationMetadata.Builder,
com.google.cloud.dialogflow.v2.ExportOperationMetadataOrBuilder>
getExportOperationMetadataFieldBuilder() {
if (exportOperationMetadataBuilder_ == null) {
if (!(operationMetadataCase_ == 4)) {
operationMetadata_ =
com.google.cloud.dialogflow.v2.ExportOperationMetadata.getDefaultInstance();
}
exportOperationMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.ExportOperationMetadata,
com.google.cloud.dialogflow.v2.ExportOperationMetadata.Builder,
com.google.cloud.dialogflow.v2.ExportOperationMetadataOrBuilder>(
(com.google.cloud.dialogflow.v2.ExportOperationMetadata) operationMetadata_,
getParentForChildren(),
isClean());
operationMetadata_ = null;
}
operationMetadataCase_ = 4;
onChanged();
return exportOperationMetadataBuilder_;
}
@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.v2.KnowledgeOperationMetadata)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.KnowledgeOperationMetadata)
private static final com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata();
}
public static com.google.cloud.dialogflow.v2.KnowledgeOperationMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public KnowledgeOperationMetadata 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.v2.KnowledgeOperationMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy