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.Interaction: if (Interaction == null) { Interaction = new global::Ubii.Interactions.Interaction(); } Interaction.MergeFrom(other.Interaction); break; case TypeOneofCase.InteractionList: if (InteractionList == null) { InteractionList = new global::Ubii.Interactions.InteractionList(); } InteractionList.MergeFrom(other.InteractionList); 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; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(ServiceReply other) { if (other == null) { return; } switch (other.TypeCase) { case TypeOneofCase.Success: if (Success == null) { Success = new global::Ubii.General.Success(); } Success.MergeFrom(other.Success); break; case TypeOneofCase.Error: if (Error == null) { Error = new global::Ubii.General.Error(); } Error.MergeFrom(other.Error); break; 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.Server: if (Server == null) { Server = new global::Ubii.Servers.Server(); } Server.MergeFrom(other.Server); 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.Interaction: if (Interaction == null) { Interaction = new global::Ubii.Interactions.Interaction(); } Interaction.MergeFrom(other.Interaction); break; case TypeOneofCase.InteractionList: if (InteractionList == null) { InteractionList = new global::Ubii.Interactions.InteractionList(); } InteractionList.MergeFrom(other.InteractionList); break; case TypeOneofCase.StringList: if (StringList == null) { StringList = new global::Ubii.General.StringList(); } StringList.MergeFrom(other.StringList); 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; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }