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.status_ != null) { if (status_ == null) { status_ = new global::Google.Cloud.Tasks.V2Beta2.TaskStatus(); } Status.MergeFrom(other.Status); } if (other.View != 0) { View = other.View; } switch (other.PayloadTypeCase) { case PayloadTypeOneofCase.AppEngineHttpRequest: if (AppEngineHttpRequest == null) { AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2Beta2.AppEngineHttpRequest(); } AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest); break; case PayloadTypeOneofCase.PullMessage: if (PullMessage == null) { PullMessage = new global::Google.Cloud.Tasks.V2Beta2.PullMessage(); } PullMessage.MergeFrom(other.PullMessage); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 26: { global::Google.Cloud.Tasks.V2Beta2.AppEngineHttpRequest subBuilder = new global::Google.Cloud.Tasks.V2Beta2.AppEngineHttpRequest(); if (payloadTypeCase_ == PayloadTypeOneofCase.AppEngineHttpRequest) { subBuilder.MergeFrom(AppEngineHttpRequest); } input.ReadMessage(subBuilder); AppEngineHttpRequest = subBuilder; break; } case 34: { global::Google.Cloud.Tasks.V2Beta2.PullMessage subBuilder = new global::Google.Cloud.Tasks.V2Beta2.PullMessage(); if (payloadTypeCase_ == PayloadTypeOneofCase.PullMessage) { subBuilder.MergeFrom(PullMessage); } input.ReadMessage(subBuilder); PullMessage = subBuilder; break; } case 42: { if (scheduleTime_ == null) { scheduleTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(scheduleTime_); break; } case 50: { if (createTime_ == null) { createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(createTime_); break; } case 58: { if (status_ == null) { status_ = new global::Google.Cloud.Tasks.V2Beta2.TaskStatus(); } input.ReadMessage(status_); break; } case 64: { view_ = (global::Google.Cloud.Tasks.V2Beta2.Task.Types.View)input.ReadEnum(); break; } } } }