예제 #1
0
        public void MergeFrom(ConversationEvent other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Conversation.Length != 0)
            {
                Conversation = other.Conversation;
            }
            if (other.Type != global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type.Unspecified)
            {
                Type = other.Type;
            }
            if (other.errorStatus_ != null)
            {
                if (errorStatus_ == null)
                {
                    ErrorStatus = new global::Google.Rpc.Status();
                }
                ErrorStatus.MergeFrom(other.ErrorStatus);
            }
            switch (other.PayloadCase)
            {
            case PayloadOneofCase.NewMessagePayload:
                if (NewMessagePayload == null)
                {
                    NewMessagePayload = new global::Google.Cloud.Dialogflow.V2.Message();
                }
                NewMessagePayload.MergeFrom(other.NewMessagePayload);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
예제 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

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

                case 16: {
                    Type = (global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type)input.ReadEnum();
                    break;
                }

                case 26: {
                    if (errorStatus_ == null)
                    {
                        ErrorStatus = new global::Google.Rpc.Status();
                    }
                    input.ReadMessage(ErrorStatus);
                    break;
                }

                case 34: {
                    global::Google.Cloud.Dialogflow.V2.Message subBuilder = new global::Google.Cloud.Dialogflow.V2.Message();
                    if (payloadCase_ == PayloadOneofCase.NewMessagePayload)
                    {
                        subBuilder.MergeFrom(NewMessagePayload);
                    }
                    input.ReadMessage(subBuilder);
                    NewMessagePayload = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
예제 #3
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

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

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

                case 16: {
                    Type = (global::Google.Cloud.Dialogflow.V2.ConversationEvent.Types.Type)input.ReadEnum();
                    break;
                }

                case 26: {
                    if (errorStatus_ == null)
                    {
                        ErrorStatus = new global::Google.Rpc.Status();
                    }
                    input.ReadMessage(ErrorStatus);
                    break;
                }

                case 34: {
                    global::Google.Cloud.Dialogflow.V2.Message subBuilder = new global::Google.Cloud.Dialogflow.V2.Message();
                    if (payloadCase_ == PayloadOneofCase.NewMessagePayload)
                    {
                        subBuilder.MergeFrom(NewMessagePayload);
                    }
                    input.ReadMessage(subBuilder);
                    NewMessagePayload = subBuilder;
                    break;
                }
                }
            }
        }