Skip to content

Commit

Permalink
feat: add new fields for delivering intermediate transcriptions throu…
Browse files Browse the repository at this point in the history
…gh PubSub

PiperOrigin-RevId: 705999588

Source-Link: googleapis/googleapis@35c27e3

Source-Link: googleapis/googleapis-gen@fb8444e
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlhbG9nZmxvdy5WMi8uT3dsQm90LnlhbWwiLCJoIjoiZmI4NDQ0ZWUyZDEzNjRlMmU2YTg0ZTExMjIwNmU4ODZlMDAzYjhlNiJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Dec 14, 2024
1 parent 82c1063 commit b94ea2a
Show file tree
Hide file tree
Showing 2 changed files with 365 additions and 238 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,28 @@ static ConversationEventReflection() {
string.Concat(
"CjNnb29nbGUvY2xvdWQvZGlhbG9nZmxvdy92Mi9jb252ZXJzYXRpb25fZXZl",
"bnQucHJvdG8SGmdvb2dsZS5jbG91ZC5kaWFsb2dmbG93LnYyGixnb29nbGUv",
"Y2xvdWQvZGlhbG9nZmxvdy92Mi9wYXJ0aWNpcGFudC5wcm90bxoXZ29vZ2xl",
"L3JwYy9zdGF0dXMucHJvdG8igQMKEUNvbnZlcnNhdGlvbkV2ZW50EhQKDGNv",
"bnZlcnNhdGlvbhgBIAEoCRJACgR0eXBlGAIgASgOMjIuZ29vZ2xlLmNsb3Vk",
"LmRpYWxvZ2Zsb3cudjIuQ29udmVyc2F0aW9uRXZlbnQuVHlwZRIoCgxlcnJv",
"cl9zdGF0dXMYAyABKAsyEi5nb29nbGUucnBjLlN0YXR1cxJCChNuZXdfbWVz",
"c2FnZV9wYXlsb2FkGAQgASgLMiMuZ29vZ2xlLmNsb3VkLmRpYWxvZ2Zsb3cu",
"djIuTWVzc2FnZUgAIpoBCgRUeXBlEhQKEFRZUEVfVU5TUEVDSUZJRUQQABIY",
"ChRDT05WRVJTQVRJT05fU1RBUlRFRBABEhkKFUNPT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UlNBVElPTl9TVEFSVEVEEAESGQoVQ09OVkVSU0FUSU9O",
"X0ZJTklTSEVEEAISHQoZSFVNQU5fSU5URVJWRU5USU9OX05FRURFRBADEg8K",
"C05FV19NRVNTQUdFEAUSGgoWTkVXX1JFQ09HTklUSU9OX1JFU1VMVBAHEhcK",
"E1VOUkVDT1ZFUkFCTEVfRVJST1IQBEIJCgdwYXlsb2FkQpwBCh5jb20uZ29v",
"Z2xlLmNsb3VkLmRpYWxvZ2Zsb3cudjJCFkNvbnZlcnNhdGlvbkV2ZW50UHJv",
"dG9QAVo+Y2xvdWQuZ29vZ2xlLmNvbS9nby9kaWFsb2dmbG93L2FwaXYyL2Rp",
"YWxvZ2Zsb3dwYjtkaWFsb2dmbG93cGKiAgJERqoCGkdvb2dsZS5DbG91ZC5E",
"aWFsb2dmbG93LlYyYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Cloud.Dialogflow.V2.ParticipantReflection.Descriptor, global::Google.Rpc.StatusReflection.Descriptor, },
new pbr::FileDescriptor[] { global::Google.Cloud.Dialogflow.V2.ParticipantReflection.Descriptor, global::Google.Cloud.Dialogflow.V2.SessionReflection.Descriptor, global::Google.Rpc.StatusReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.V2.ConversationEvent), global::Google.Cloud.Dialogflow.V2.ConversationEvent.Parser, new[]{ "Conversation", "Type", "ErrorStatus", "NewMessagePayload" }, new[]{ "Payload" }, new[]{ typeof(global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type) }, null, null)
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Dialogflow.V2.ConversationEvent), global::Google.Cloud.Dialogflow.V2.ConversationEvent.Parser, new[]{ "Conversation", "Type", "ErrorStatus", "NewMessagePayload", "NewRecognitionResultPayload" }, new[]{ "Payload" }, new[]{ typeof(global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type) }, null, null)
}));
}
#endregion
Expand Down Expand Up @@ -96,6 +100,9 @@ public ConversationEvent(ConversationEvent other) : this() {
case PayloadOneofCase.NewMessagePayload:
NewMessagePayload = other.NewMessagePayload.Clone();
break;
case PayloadOneofCase.NewRecognitionResultPayload:
NewRecognitionResultPayload = other.NewRecognitionResultPayload.Clone();
break;
}

_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
Expand Down Expand Up @@ -170,11 +177,27 @@ public string Conversation {
}
}

/// <summary>Field number for the "new_recognition_result_payload" field.</summary>
public const int NewRecognitionResultPayloadFieldNumber = 5;
/// <summary>
/// Payload of NEW_RECOGNITION_RESULT event.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult NewRecognitionResultPayload {
get { return payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload ? (global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult) payload_ : null; }
set {
payload_ = value;
payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.NewRecognitionResultPayload;
}
}

private object payload_;
/// <summary>Enum of possible cases for the "payload" oneof.</summary>
public enum PayloadOneofCase {
None = 0,
NewMessagePayload = 4,
NewRecognitionResultPayload = 5,
}
private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Expand Down Expand Up @@ -209,6 +232,7 @@ public bool Equals(ConversationEvent other) {
if (Type != other.Type) return false;
if (!object.Equals(ErrorStatus, other.ErrorStatus)) return false;
if (!object.Equals(NewMessagePayload, other.NewMessagePayload)) return false;
if (!object.Equals(NewRecognitionResultPayload, other.NewRecognitionResultPayload)) return false;
if (PayloadCase != other.PayloadCase) return false;
return Equals(_unknownFields, other._unknownFields);
}
Expand All @@ -221,6 +245,7 @@ public override int GetHashCode() {
if (Type != global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type.Unspecified) hash ^= Type.GetHashCode();
if (errorStatus_ != null) hash ^= ErrorStatus.GetHashCode();
if (payloadCase_ == PayloadOneofCase.NewMessagePayload) hash ^= NewMessagePayload.GetHashCode();
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) hash ^= NewRecognitionResultPayload.GetHashCode();
hash ^= (int) payloadCase_;
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
Expand Down Expand Up @@ -256,6 +281,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(34);
output.WriteMessage(NewMessagePayload);
}
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) {
output.WriteRawTag(42);
output.WriteMessage(NewRecognitionResultPayload);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -282,6 +311,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(34);
output.WriteMessage(NewMessagePayload);
}
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) {
output.WriteRawTag(42);
output.WriteMessage(NewRecognitionResultPayload);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -304,6 +337,9 @@ public int CalculateSize() {
if (payloadCase_ == PayloadOneofCase.NewMessagePayload) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(NewMessagePayload);
}
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(NewRecognitionResultPayload);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand Down Expand Up @@ -335,6 +371,12 @@ public void MergeFrom(ConversationEvent other) {
}
NewMessagePayload.MergeFrom(other.NewMessagePayload);
break;
case PayloadOneofCase.NewRecognitionResultPayload:
if (NewRecognitionResultPayload == null) {
NewRecognitionResultPayload = new global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult();
}
NewRecognitionResultPayload.MergeFrom(other.NewRecognitionResultPayload);
break;
}

_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
Expand Down Expand Up @@ -376,6 +418,15 @@ public void MergeFrom(pb::CodedInputStream input) {
NewMessagePayload = subBuilder;
break;
}
case 42: {
global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult subBuilder = new global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult();
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) {
subBuilder.MergeFrom(NewRecognitionResultPayload);
}
input.ReadMessage(subBuilder);
NewRecognitionResultPayload = subBuilder;
break;
}
}
}
#endif
Expand Down Expand Up @@ -415,6 +466,15 @@ public void MergeFrom(pb::CodedInputStream input) {
NewMessagePayload = subBuilder;
break;
}
case 42: {
global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult subBuilder = new global::Google.Cloud.Dialogflow.V2.StreamingRecognitionResult();
if (payloadCase_ == PayloadOneofCase.NewRecognitionResultPayload) {
subBuilder.MergeFrom(NewRecognitionResultPayload);
}
input.ReadMessage(subBuilder);
NewRecognitionResultPayload = subBuilder;
break;
}
}
}
}
Expand Down Expand Up @@ -455,6 +515,13 @@ public enum Type {
/// </summary>
[pbr::OriginalName("NEW_MESSAGE")] NewMessage = 5,
/// <summary>
/// An existing conversation has received a new speech recognition result.
/// This is mainly for delivering intermediate transcripts. The notification
/// is configured in
/// [ConversationProfile.new_recognition_event_notification_config][].
/// </summary>
[pbr::OriginalName("NEW_RECOGNITION_RESULT")] NewRecognitionResult = 7,
/// <summary>
/// Unrecoverable error during a telephone call.
///
/// In general non-recoverable errors only occur if something was
Expand Down
Loading

0 comments on commit b94ea2a

Please sign in to comment.