Example #1
0
        public void MergeFrom(ServiceRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Topic.Length != 0)
            {
                Topic = other.Topic;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Client:
                if (Client == null)
                {
                    Client = new global::Ubii.Clients.Client();
                }
                Client.MergeFrom(other.Client);
                break;

            case TypeOneofCase.Device:
                if (Device == null)
                {
                    Device = new global::Ubii.Devices.Device();
                }
                Device.MergeFrom(other.Device);
                break;

            case TypeOneofCase.TopicSubscription:
                if (TopicSubscription == null)
                {
                    TopicSubscription = new global::Ubii.Services.Request.TopicSubscription();
                }
                TopicSubscription.MergeFrom(other.TopicSubscription);
                break;

            case TypeOneofCase.Session:
                if (Session == null)
                {
                    Session = new global::Ubii.Sessions.Session();
                }
                Session.MergeFrom(other.Session);
                break;

            case TypeOneofCase.SessionList:
                if (SessionList == null)
                {
                    SessionList = new global::Ubii.Sessions.SessionList();
                }
                SessionList.MergeFrom(other.SessionList);
                break;

            case TypeOneofCase.ProcessingModule:
                if (ProcessingModule == null)
                {
                    ProcessingModule = new global::Ubii.Processing.ProcessingModule();
                }
                ProcessingModule.MergeFrom(other.ProcessingModule);
                break;

            case TypeOneofCase.ProcessingModuleList:
                if (ProcessingModuleList == null)
                {
                    ProcessingModuleList = new global::Ubii.Processing.ProcessingModuleList();
                }
                ProcessingModuleList.MergeFrom(other.ProcessingModuleList);
                break;

            case TypeOneofCase.TopicMux:
                if (TopicMux == null)
                {
                    TopicMux = new global::Ubii.Devices.TopicMux();
                }
                TopicMux.MergeFrom(other.TopicMux);
                break;

            case TypeOneofCase.TopicMuxList:
                if (TopicMuxList == null)
                {
                    TopicMuxList = new global::Ubii.Devices.TopicMuxList();
                }
                TopicMuxList.MergeFrom(other.TopicMuxList);
                break;

            case TypeOneofCase.TopicDemux:
                if (TopicDemux == null)
                {
                    TopicDemux = new global::Ubii.Devices.TopicDemux();
                }
                TopicDemux.MergeFrom(other.TopicDemux);
                break;

            case TypeOneofCase.TopicDemuxList:
                if (TopicDemuxList == null)
                {
                    TopicDemuxList = new global::Ubii.Devices.TopicDemuxList();
                }
                TopicDemuxList.MergeFrom(other.TopicDemuxList);
                break;

            case TypeOneofCase.ClientList:
                if (ClientList == null)
                {
                    ClientList = new global::Ubii.Clients.ClientList();
                }
                ClientList.MergeFrom(other.ClientList);
                break;

            case TypeOneofCase.DeviceList:
                if (DeviceList == null)
                {
                    DeviceList = new global::Ubii.Devices.DeviceList();
                }
                DeviceList.MergeFrom(other.DeviceList);
                break;

            case TypeOneofCase.LockstepProcessingRequest:
                if (LockstepProcessingRequest == null)
                {
                    LockstepProcessingRequest = new global::Ubii.Processing.LockstepProcessingRequest();
                }
                LockstepProcessingRequest.MergeFrom(other.LockstepProcessingRequest);
                break;
            }

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

            if (Topic.Length != 0)
            {
                hash ^= Topic.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Client)
            {
                hash ^= Client.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Device)
            {
                hash ^= Device.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.TopicSubscription)
            {
                hash ^= TopicSubscription.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Session)
            {
                hash ^= Session.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.SessionList)
            {
                hash ^= SessionList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.ProcessingModule)
            {
                hash ^= ProcessingModule.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.ProcessingModuleList)
            {
                hash ^= ProcessingModuleList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.TopicMux)
            {
                hash ^= TopicMux.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.TopicMuxList)
            {
                hash ^= TopicMuxList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.TopicDemux)
            {
                hash ^= TopicDemux.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.TopicDemuxList)
            {
                hash ^= TopicDemuxList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.ClientList)
            {
                hash ^= ClientList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.DeviceList)
            {
                hash ^= DeviceList.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.LockstepProcessingRequest)
            {
                hash ^= LockstepProcessingRequest.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }