public override int GetHashCode() { int hash = 1; if (primaryActionDetail_ != null) { hash ^= PrimaryActionDetail.GetHashCode(); } hash ^= actors_.GetHashCode(); hash ^= actions_.GetHashCode(); hash ^= targets_.GetHashCode(); if (timeCase_ == TimeOneofCase.Timestamp) { hash ^= Timestamp.GetHashCode(); } if (timeCase_ == TimeOneofCase.TimeRange) { hash ^= TimeRange.GetHashCode(); } hash ^= (int)timeCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(DriveActivity other) { if (other == null) { return; } if (other.primaryActionDetail_ != null) { if (primaryActionDetail_ == null) { PrimaryActionDetail = new global::Google.Apps.Drive.Activity.V2.ActionDetail(); } PrimaryActionDetail.MergeFrom(other.PrimaryActionDetail); } actors_.Add(other.actors_); actions_.Add(other.actions_); targets_.Add(other.targets_); switch (other.TimeCase) { case TimeOneofCase.Timestamp: if (Timestamp == null) { Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } Timestamp.MergeFrom(other.Timestamp); break; case TimeOneofCase.TimeRange: if (TimeRange == null) { TimeRange = new global::Google.Apps.Drive.Activity.V2.TimeRange(); } TimeRange.MergeFrom(other.TimeRange); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }