public void MergeFrom(Task other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.scheduleTime_ != null) { if (scheduleTime_ == null) { scheduleTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } ScheduleTime.MergeFrom(other.ScheduleTime); } if (other.createTime_ != null) { if (createTime_ == null) { createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.DispatchCount != 0) { DispatchCount = other.DispatchCount; } if (other.ResponseCount != 0) { ResponseCount = other.ResponseCount; } if (other.firstAttempt_ != null) { if (firstAttempt_ == null) { firstAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt(); } FirstAttempt.MergeFrom(other.FirstAttempt); } if (other.lastAttempt_ != null) { if (lastAttempt_ == null) { lastAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt(); } LastAttempt.MergeFrom(other.LastAttempt); } if (other.View != 0) { View = other.View; } switch (other.PayloadTypeCase) { case PayloadTypeOneofCase.AppEngineHttpRequest: if (AppEngineHttpRequest == null) { AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2Beta3.AppEngineHttpRequest(); } AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(Task other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.scheduleTime_ != null) { if (scheduleTime_ == null) { ScheduleTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } ScheduleTime.MergeFrom(other.ScheduleTime); } if (other.createTime_ != null) { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.dispatchDeadline_ != null) { if (dispatchDeadline_ == null) { DispatchDeadline = new global::Google.Protobuf.WellKnownTypes.Duration(); } DispatchDeadline.MergeFrom(other.DispatchDeadline); } if (other.DispatchCount != 0) { DispatchCount = other.DispatchCount; } if (other.ResponseCount != 0) { ResponseCount = other.ResponseCount; } if (other.firstAttempt_ != null) { if (firstAttempt_ == null) { FirstAttempt = new global::Google.Cloud.Tasks.V2.Attempt(); } FirstAttempt.MergeFrom(other.FirstAttempt); } if (other.lastAttempt_ != null) { if (lastAttempt_ == null) { LastAttempt = new global::Google.Cloud.Tasks.V2.Attempt(); } LastAttempt.MergeFrom(other.LastAttempt); } if (other.View != global::Google.Cloud.Tasks.V2.Task.Types.View.Unspecified) { View = other.View; } switch (other.MessageTypeCase) { case MessageTypeOneofCase.AppEngineHttpRequest: if (AppEngineHttpRequest == null) { AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2.AppEngineHttpRequest(); } AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest); break; case MessageTypeOneofCase.HttpRequest: if (HttpRequest == null) { HttpRequest = new global::Google.Cloud.Tasks.V2.HttpRequest(); } HttpRequest.MergeFrom(other.HttpRequest); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }