Beispiel #1
0
        public void MergeFrom(BehaviorControlResponse other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.ResponseTypeCase)
            {
            case ResponseTypeOneofCase.ControlGrantedResponse:
                if (ControlGrantedResponse == null)
                {
                    ControlGrantedResponse = new global::Anki.Vector.ExternalInterface.ControlGrantedResponse();
                }
                ControlGrantedResponse.MergeFrom(other.ControlGrantedResponse);
                break;

            case ResponseTypeOneofCase.ControlLostEvent:
                if (ControlLostEvent == null)
                {
                    ControlLostEvent = new global::Anki.Vector.ExternalInterface.ControlLostResponse();
                }
                ControlLostEvent.MergeFrom(other.ControlLostEvent);
                break;

            case ResponseTypeOneofCase.KeepAlive:
                if (KeepAlive == null)
                {
                    KeepAlive = new global::Anki.Vector.ExternalInterface.KeepAlivePing();
                }
                KeepAlive.MergeFrom(other.KeepAlive);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (responseTypeCase_ == ResponseTypeOneofCase.ControlGrantedResponse)
            {
                hash ^= ControlGrantedResponse.GetHashCode();
            }
            if (responseTypeCase_ == ResponseTypeOneofCase.ControlLostEvent)
            {
                hash ^= ControlLostEvent.GetHashCode();
            }
            if (responseTypeCase_ == ResponseTypeOneofCase.KeepAlive)
            {
                hash ^= KeepAlive.GetHashCode();
            }
            hash ^= (int)responseTypeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }