예제 #1
0
 public void MergeFrom(WebhookRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Session.Length != 0)
     {
         Session = other.Session;
     }
     if (other.ResponseId.Length != 0)
     {
         ResponseId = other.ResponseId;
     }
     if (other.queryResult_ != null)
     {
         if (queryResult_ == null)
         {
             QueryResult = new global::Google.Cloud.Dialogflow.V2.QueryResult();
         }
         QueryResult.MergeFrom(other.QueryResult);
     }
     if (other.originalDetectIntentRequest_ != null)
     {
         if (originalDetectIntentRequest_ == null)
         {
             OriginalDetectIntentRequest = new global::Google.Cloud.Dialogflow.V2.OriginalDetectIntentRequest();
         }
         OriginalDetectIntentRequest.MergeFrom(other.OriginalDetectIntentRequest);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    ResponseId = input.ReadString();
                    break;
                }

                case 18: {
                    if (queryResult_ == null)
                    {
                        QueryResult = new global::Google.Cloud.Dialogflow.V2.QueryResult();
                    }
                    input.ReadMessage(QueryResult);
                    break;
                }

                case 26: {
                    if (originalDetectIntentRequest_ == null)
                    {
                        OriginalDetectIntentRequest = new global::Google.Cloud.Dialogflow.V2.OriginalDetectIntentRequest();
                    }
                    input.ReadMessage(OriginalDetectIntentRequest);
                    break;
                }

                case 34: {
                    Session = input.ReadString();
                    break;
                }
                }
            }
        }