com.google.assistant.embedded.v1alpha2.DialogStateIn Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: embedded_assistant.proto
package com.google.assistant.embedded.v1alpha2;
/**
*
* Provides information about the current dialog state.
*
*
* Protobuf type {@code google.assistant.embedded.v1alpha2.DialogStateIn}
*/
public final class DialogStateIn extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.assistant.embedded.v1alpha2.DialogStateIn)
DialogStateInOrBuilder {
private static final long serialVersionUID = 0L;
// Use DialogStateIn.newBuilder() to construct.
private DialogStateIn(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DialogStateIn() {
conversationState_ = com.google.protobuf.ByteString.EMPTY;
languageCode_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DialogStateIn();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DialogStateIn(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
conversationState_ = input.readBytes();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
languageCode_ = s;
break;
}
case 42: {
com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder subBuilder = null;
if (deviceLocation_ != null) {
subBuilder = deviceLocation_.toBuilder();
}
deviceLocation_ = input.readMessage(com.google.assistant.embedded.v1alpha2.DeviceLocation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(deviceLocation_);
deviceLocation_ = subBuilder.buildPartial();
}
break;
}
case 56: {
isNewConversation_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.assistant.embedded.v1alpha2.AssistantProto.internal_static_google_assistant_embedded_v1alpha2_DialogStateIn_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.assistant.embedded.v1alpha2.AssistantProto.internal_static_google_assistant_embedded_v1alpha2_DialogStateIn_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.assistant.embedded.v1alpha2.DialogStateIn.class, com.google.assistant.embedded.v1alpha2.DialogStateIn.Builder.class);
}
public static final int CONVERSATION_STATE_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString conversationState_;
/**
*
* *Required* This field must always be set to the
* [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state]
* value that was returned in the prior `Assist` RPC. It should only be
* omitted (field not set) if there was no prior `Assist` RPC because this is
* the first `Assist` RPC made by this device after it was first setup and/or
* a factory-default reset.
*
*
* bytes conversation_state = 1;
* @return The conversationState.
*/
public com.google.protobuf.ByteString getConversationState() {
return conversationState_;
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 2;
private volatile java.lang.Object languageCode_;
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
}
}
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEVICE_LOCATION_FIELD_NUMBER = 5;
private com.google.assistant.embedded.v1alpha2.DeviceLocation deviceLocation_;
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
* @return Whether the deviceLocation field is set.
*/
public boolean hasDeviceLocation() {
return deviceLocation_ != null;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
* @return The deviceLocation.
*/
public com.google.assistant.embedded.v1alpha2.DeviceLocation getDeviceLocation() {
return deviceLocation_ == null ? com.google.assistant.embedded.v1alpha2.DeviceLocation.getDefaultInstance() : deviceLocation_;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public com.google.assistant.embedded.v1alpha2.DeviceLocationOrBuilder getDeviceLocationOrBuilder() {
return getDeviceLocation();
}
public static final int IS_NEW_CONVERSATION_FIELD_NUMBER = 7;
private boolean isNewConversation_;
/**
*
* *Optional* If true, the server will treat the request as a new conversation
* and not use state from the prior request. Set this field to true when the
* conversation should be restarted, such as after a device reboot, or after a
* significant lapse of time since the prior query.
*
*
* bool is_new_conversation = 7;
* @return The isNewConversation.
*/
public boolean getIsNewConversation() {
return isNewConversation_;
}
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 (!conversationState_.isEmpty()) {
output.writeBytes(1, conversationState_);
}
if (!getLanguageCodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_);
}
if (deviceLocation_ != null) {
output.writeMessage(5, getDeviceLocation());
}
if (isNewConversation_ != false) {
output.writeBool(7, isNewConversation_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!conversationState_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, conversationState_);
}
if (!getLanguageCodeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_);
}
if (deviceLocation_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getDeviceLocation());
}
if (isNewConversation_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, isNewConversation_);
}
size += unknownFields.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.assistant.embedded.v1alpha2.DialogStateIn)) {
return super.equals(obj);
}
com.google.assistant.embedded.v1alpha2.DialogStateIn other = (com.google.assistant.embedded.v1alpha2.DialogStateIn) obj;
if (!getConversationState()
.equals(other.getConversationState())) return false;
if (!getLanguageCode()
.equals(other.getLanguageCode())) return false;
if (hasDeviceLocation() != other.hasDeviceLocation()) return false;
if (hasDeviceLocation()) {
if (!getDeviceLocation()
.equals(other.getDeviceLocation())) return false;
}
if (getIsNewConversation()
!= other.getIsNewConversation()) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + CONVERSATION_STATE_FIELD_NUMBER;
hash = (53 * hash) + getConversationState().hashCode();
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
if (hasDeviceLocation()) {
hash = (37 * hash) + DEVICE_LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getDeviceLocation().hashCode();
}
hash = (37 * hash) + IS_NEW_CONVERSATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsNewConversation());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn 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.assistant.embedded.v1alpha2.DialogStateIn parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn 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.assistant.embedded.v1alpha2.DialogStateIn parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn 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.assistant.embedded.v1alpha2.DialogStateIn parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn 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.assistant.embedded.v1alpha2.DialogStateIn 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;
}
/**
*
* Provides information about the current dialog state.
*
*
* Protobuf type {@code google.assistant.embedded.v1alpha2.DialogStateIn}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.assistant.embedded.v1alpha2.DialogStateIn)
com.google.assistant.embedded.v1alpha2.DialogStateInOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.assistant.embedded.v1alpha2.AssistantProto.internal_static_google_assistant_embedded_v1alpha2_DialogStateIn_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.assistant.embedded.v1alpha2.AssistantProto.internal_static_google_assistant_embedded_v1alpha2_DialogStateIn_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.assistant.embedded.v1alpha2.DialogStateIn.class, com.google.assistant.embedded.v1alpha2.DialogStateIn.Builder.class);
}
// Construct using com.google.assistant.embedded.v1alpha2.DialogStateIn.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
conversationState_ = com.google.protobuf.ByteString.EMPTY;
languageCode_ = "";
if (deviceLocationBuilder_ == null) {
deviceLocation_ = null;
} else {
deviceLocation_ = null;
deviceLocationBuilder_ = null;
}
isNewConversation_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.assistant.embedded.v1alpha2.AssistantProto.internal_static_google_assistant_embedded_v1alpha2_DialogStateIn_descriptor;
}
@java.lang.Override
public com.google.assistant.embedded.v1alpha2.DialogStateIn getDefaultInstanceForType() {
return com.google.assistant.embedded.v1alpha2.DialogStateIn.getDefaultInstance();
}
@java.lang.Override
public com.google.assistant.embedded.v1alpha2.DialogStateIn build() {
com.google.assistant.embedded.v1alpha2.DialogStateIn result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.assistant.embedded.v1alpha2.DialogStateIn buildPartial() {
com.google.assistant.embedded.v1alpha2.DialogStateIn result = new com.google.assistant.embedded.v1alpha2.DialogStateIn(this);
result.conversationState_ = conversationState_;
result.languageCode_ = languageCode_;
if (deviceLocationBuilder_ == null) {
result.deviceLocation_ = deviceLocation_;
} else {
result.deviceLocation_ = deviceLocationBuilder_.build();
}
result.isNewConversation_ = isNewConversation_;
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.assistant.embedded.v1alpha2.DialogStateIn) {
return mergeFrom((com.google.assistant.embedded.v1alpha2.DialogStateIn)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.assistant.embedded.v1alpha2.DialogStateIn other) {
if (other == com.google.assistant.embedded.v1alpha2.DialogStateIn.getDefaultInstance()) return this;
if (other.getConversationState() != com.google.protobuf.ByteString.EMPTY) {
setConversationState(other.getConversationState());
}
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
onChanged();
}
if (other.hasDeviceLocation()) {
mergeDeviceLocation(other.getDeviceLocation());
}
if (other.getIsNewConversation() != false) {
setIsNewConversation(other.getIsNewConversation());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.assistant.embedded.v1alpha2.DialogStateIn parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.assistant.embedded.v1alpha2.DialogStateIn) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString conversationState_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* *Required* This field must always be set to the
* [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state]
* value that was returned in the prior `Assist` RPC. It should only be
* omitted (field not set) if there was no prior `Assist` RPC because this is
* the first `Assist` RPC made by this device after it was first setup and/or
* a factory-default reset.
*
*
* bytes conversation_state = 1;
* @return The conversationState.
*/
public com.google.protobuf.ByteString getConversationState() {
return conversationState_;
}
/**
*
* *Required* This field must always be set to the
* [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state]
* value that was returned in the prior `Assist` RPC. It should only be
* omitted (field not set) if there was no prior `Assist` RPC because this is
* the first `Assist` RPC made by this device after it was first setup and/or
* a factory-default reset.
*
*
* bytes conversation_state = 1;
* @param value The conversationState to set.
* @return This builder for chaining.
*/
public Builder setConversationState(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
conversationState_ = value;
onChanged();
return this;
}
/**
*
* *Required* This field must always be set to the
* [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state]
* value that was returned in the prior `Assist` RPC. It should only be
* omitted (field not set) if there was no prior `Assist` RPC because this is
* the first `Assist` RPC made by this device after it was first setup and/or
* a factory-default reset.
*
*
* bytes conversation_state = 1;
* @return This builder for chaining.
*/
public Builder clearConversationState() {
conversationState_ = getDefaultInstance().getConversationState();
onChanged();
return this;
}
private java.lang.Object languageCode_ = "";
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
onChanged();
return this;
}
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
onChanged();
return this;
}
/**
*
* *Required* Language of the request in
* [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example,
* "en-US"). See [Language
* Support](https://developers.google.com/assistant/sdk/reference/rpc/languages)
* for more information. If you have selected a language for this `device_id`
* using the
* [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings)
* menu in your phone's Google Assistant app, that selection will override
* this value.
*
*
* string language_code = 2;
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
onChanged();
return this;
}
private com.google.assistant.embedded.v1alpha2.DeviceLocation deviceLocation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.assistant.embedded.v1alpha2.DeviceLocation, com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder, com.google.assistant.embedded.v1alpha2.DeviceLocationOrBuilder> deviceLocationBuilder_;
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
* @return Whether the deviceLocation field is set.
*/
public boolean hasDeviceLocation() {
return deviceLocationBuilder_ != null || deviceLocation_ != null;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
* @return The deviceLocation.
*/
public com.google.assistant.embedded.v1alpha2.DeviceLocation getDeviceLocation() {
if (deviceLocationBuilder_ == null) {
return deviceLocation_ == null ? com.google.assistant.embedded.v1alpha2.DeviceLocation.getDefaultInstance() : deviceLocation_;
} else {
return deviceLocationBuilder_.getMessage();
}
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public Builder setDeviceLocation(com.google.assistant.embedded.v1alpha2.DeviceLocation value) {
if (deviceLocationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deviceLocation_ = value;
onChanged();
} else {
deviceLocationBuilder_.setMessage(value);
}
return this;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public Builder setDeviceLocation(
com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder builderForValue) {
if (deviceLocationBuilder_ == null) {
deviceLocation_ = builderForValue.build();
onChanged();
} else {
deviceLocationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public Builder mergeDeviceLocation(com.google.assistant.embedded.v1alpha2.DeviceLocation value) {
if (deviceLocationBuilder_ == null) {
if (deviceLocation_ != null) {
deviceLocation_ =
com.google.assistant.embedded.v1alpha2.DeviceLocation.newBuilder(deviceLocation_).mergeFrom(value).buildPartial();
} else {
deviceLocation_ = value;
}
onChanged();
} else {
deviceLocationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public Builder clearDeviceLocation() {
if (deviceLocationBuilder_ == null) {
deviceLocation_ = null;
onChanged();
} else {
deviceLocation_ = null;
deviceLocationBuilder_ = null;
}
return this;
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder getDeviceLocationBuilder() {
onChanged();
return getDeviceLocationFieldBuilder().getBuilder();
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
public com.google.assistant.embedded.v1alpha2.DeviceLocationOrBuilder getDeviceLocationOrBuilder() {
if (deviceLocationBuilder_ != null) {
return deviceLocationBuilder_.getMessageOrBuilder();
} else {
return deviceLocation_ == null ?
com.google.assistant.embedded.v1alpha2.DeviceLocation.getDefaultInstance() : deviceLocation_;
}
}
/**
*
* *Optional* Location of the device where the query originated.
*
*
* .google.assistant.embedded.v1alpha2.DeviceLocation device_location = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.assistant.embedded.v1alpha2.DeviceLocation, com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder, com.google.assistant.embedded.v1alpha2.DeviceLocationOrBuilder>
getDeviceLocationFieldBuilder() {
if (deviceLocationBuilder_ == null) {
deviceLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.assistant.embedded.v1alpha2.DeviceLocation, com.google.assistant.embedded.v1alpha2.DeviceLocation.Builder, com.google.assistant.embedded.v1alpha2.DeviceLocationOrBuilder>(
getDeviceLocation(),
getParentForChildren(),
isClean());
deviceLocation_ = null;
}
return deviceLocationBuilder_;
}
private boolean isNewConversation_ ;
/**
*
* *Optional* If true, the server will treat the request as a new conversation
* and not use state from the prior request. Set this field to true when the
* conversation should be restarted, such as after a device reboot, or after a
* significant lapse of time since the prior query.
*
*
* bool is_new_conversation = 7;
* @return The isNewConversation.
*/
public boolean getIsNewConversation() {
return isNewConversation_;
}
/**
*
* *Optional* If true, the server will treat the request as a new conversation
* and not use state from the prior request. Set this field to true when the
* conversation should be restarted, such as after a device reboot, or after a
* significant lapse of time since the prior query.
*
*
* bool is_new_conversation = 7;
* @param value The isNewConversation to set.
* @return This builder for chaining.
*/
public Builder setIsNewConversation(boolean value) {
isNewConversation_ = value;
onChanged();
return this;
}
/**
*
* *Optional* If true, the server will treat the request as a new conversation
* and not use state from the prior request. Set this field to true when the
* conversation should be restarted, such as after a device reboot, or after a
* significant lapse of time since the prior query.
*
*
* bool is_new_conversation = 7;
* @return This builder for chaining.
*/
public Builder clearIsNewConversation() {
isNewConversation_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.assistant.embedded.v1alpha2.DialogStateIn)
}
// @@protoc_insertion_point(class_scope:google.assistant.embedded.v1alpha2.DialogStateIn)
private static final com.google.assistant.embedded.v1alpha2.DialogStateIn DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.assistant.embedded.v1alpha2.DialogStateIn();
}
public static com.google.assistant.embedded.v1alpha2.DialogStateIn getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DialogStateIn parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DialogStateIn(input, extensionRegistry);
}
};
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.assistant.embedded.v1alpha2.DialogStateIn getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy