예제 #1
0
 public void MergeFrom(WebhookResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.FulfillmentText.Length != 0)
     {
         FulfillmentText = other.FulfillmentText;
     }
     fulfillmentMessages_.Add(other.fulfillmentMessages_);
     if (other.Source.Length != 0)
     {
         Source = other.Source;
     }
     if (other.payload_ != null)
     {
         if (payload_ == null)
         {
             Payload = new global::Google.Protobuf.WellKnownTypes.Struct();
         }
         Payload.MergeFrom(other.Payload);
     }
     outputContexts_.Add(other.outputContexts_);
     if (other.followupEventInput_ != null)
     {
         if (followupEventInput_ == null)
         {
             FollowupEventInput = new global::Google.Cloud.Dialogflow.V2.EventInput();
         }
         FollowupEventInput.MergeFrom(other.FollowupEventInput);
     }
     sessionEntityTypes_.Add(other.sessionEntityTypes_);
     _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: {
                    FulfillmentText = input.ReadString();
                    break;
                }

                case 18: {
                    fulfillmentMessages_.AddEntriesFrom(input, _repeated_fulfillmentMessages_codec);
                    break;
                }

                case 26: {
                    Source = input.ReadString();
                    break;
                }

                case 34: {
                    if (payload_ == null)
                    {
                        Payload = new global::Google.Protobuf.WellKnownTypes.Struct();
                    }
                    input.ReadMessage(Payload);
                    break;
                }

                case 42: {
                    outputContexts_.AddEntriesFrom(input, _repeated_outputContexts_codec);
                    break;
                }

                case 50: {
                    if (followupEventInput_ == null)
                    {
                        FollowupEventInput = new global::Google.Cloud.Dialogflow.V2.EventInput();
                    }
                    input.ReadMessage(FollowupEventInput);
                    break;
                }

                case 82: {
                    sessionEntityTypes_.AddEntriesFrom(input, _repeated_sessionEntityTypes_codec);
                    break;
                }
                }
            }
        }